summaryrefslogtreecommitdiffstats
path: root/src/core/browser_main_parts_qt.cpp
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2019-02-05 14:50:22 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2019-02-05 16:56:24 +0100
commit7aa06a1614b7ca6508d96ee2e8ef0f4c49038a6f (patch)
tree4331533a6c0fa7a843c831d66e62472a7f8a4d30 /src/core/browser_main_parts_qt.cpp
parent5e92adf5f85c4ec8340d5b7e92166a5e4f8e9883 (diff)
parentf17f815878d1d3f02f464347d2807555cab00a88 (diff)
Merge remote-tracking branch 'origin/dev' into 5.13
Conflicts: src/core/content_browser_client_qt.cpp src/core/content_browser_client_qt.h Change-Id: I3da791a82dab56fd7535ba1e4c0ab1d9ca74f547
Diffstat (limited to 'src/core/browser_main_parts_qt.cpp')
-rw-r--r--src/core/browser_main_parts_qt.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/browser_main_parts_qt.cpp b/src/core/browser_main_parts_qt.cpp
index cfe9ea8bb..e6c76fb4f 100644
--- a/src/core/browser_main_parts_qt.cpp
+++ b/src/core/browser_main_parts_qt.cpp
@@ -44,7 +44,16 @@
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/child_process_security_policy.h"
#include "content/public/common/service_manager_connection.h"
+#include "extensions/buildflags/buildflags.h"
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+#include "extensions/common/constants.h"
+#include "extensions/common/extensions_client.h"
+#include "extensions/extensions_browser_client_qt.h"
+#include "extensions/extension_system_factory_qt.h"
+#include "common/extensions/extensions_client_qt.h"
+#endif //BUILDFLAG(ENABLE_EXTENSIONS)
#include "services/resource_coordinator/public/cpp/process_resource_coordinator.h"
#include "services/resource_coordinator/public/cpp/resource_coordinator_features.h"
#include "services/service_manager/public/cpp/connector.h"
@@ -247,6 +256,9 @@ BrowserMainPartsQt::~BrowserMainPartsQt() = default;
int BrowserMainPartsQt::PreEarlyInitialization()
{
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+ content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme(extensions::kExtensionScheme);
+#endif //ENABLE_EXTENSIONS
base::MessageLoop::InitMessagePumpForUIFactory(messagePumpFactory);
return 0;
}
@@ -255,6 +267,15 @@ void BrowserMainPartsQt::PreMainMessageLoopStart()
{
}
+void BrowserMainPartsQt::PreMainMessageLoopRun()
+{
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+ extensions::ExtensionsClient::Set(new extensions::ExtensionsClientQt());
+ extensions::ExtensionsBrowserClient::Set(new extensions::ExtensionsBrowserClientQt());
+ extensions::ExtensionSystemFactoryQt::GetInstance();
+#endif //ENABLE_EXTENSIONS
+}
+
void BrowserMainPartsQt::PostMainMessageLoopRun()
{
// The ProfileQt's destructor uses the MessageLoop so it should be deleted