diff options
Diffstat (limited to 'src/core/content_main_delegate_qt.cpp')
-rw-r--r-- | src/core/content_main_delegate_qt.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index 52895e312..dc32bb8c1 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -45,6 +45,7 @@ #include "base/path_service.h" #include "base/strings/string_number_conversions.h" #include "chrome/grit/generated_resources.h" +#include "content/public/browser/browser_main_runner.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "ui/base/l10n/l10n_util.h" @@ -72,6 +73,10 @@ #include <QtCore/qcoreapplication.h> +namespace content { +ContentClient *GetContentClient(); +} + namespace QtWebEngineCore { // The logic of this function is based on chrome/common/net/net_resource_provider.cc @@ -228,7 +233,8 @@ bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code) #if QT_CONFIG(webengine_spellchecker) SafeOverridePath(base::DIR_APP_DICTIONARIES, WebEngineLibraryInfo::getPath(base::DIR_APP_DICTIONARIES)); #endif - SetContentClient(new ContentClientQt); + if (!content::GetContentClient()) + content::SetContentClient(new ContentClientQt); url::CustomScheme::LoadSchemes(base::CommandLine::ForCurrentProcess()); |