summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@theqtcompany.com>2015-04-23 17:56:57 +0200
committerAndras Becsi <andras.becsi@theqtcompany.com>2015-04-23 17:57:59 +0200
commitbb2e06f828c2169f6853a7e8fd29b138bb469fe3 (patch)
tree79ec99f41ccce75bc8b8fa11a25365b502fe520e /src/core/content_browser_client_qt.cpp
parent2ba0e25a0c6fee7e2144f1fc8b577f73e1155e6d (diff)
parenta626e0e3ff1ab160855c7deee283d8eb004d47ce (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r--src/core/content_browser_client_qt.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 28b3f691c..16f0b00e3 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -48,8 +48,10 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/url_constants.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/gfx/screen.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
@@ -69,6 +71,7 @@
#include "resource_dispatcher_host_delegate_qt.h"
#include "user_script_controller_host.h"
#include "web_contents_delegate_qt.h"
+#include "web_engine_library_info.h"
#if defined(ENABLE_PLUGINS)
#include "content/public/browser/browser_ppapi_host.h"
@@ -338,7 +341,7 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost*
{
// FIXME: Add a settings variable to enable/disable the file scheme.
content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(host->GetID(), url::kFileScheme);
- static_cast<BrowserContextQt*>(host->GetBrowserContext())->m_adapter->userScriptController()->renderProcessHostCreated(host);
+ static_cast<BrowserContextQt*>(host->GetBrowserContext())->m_adapter->userScriptController()->renderProcessStartedWithHost(host);
}
void ContentBrowserClientQt::ResourceDispatcherHostCreated()
@@ -447,7 +450,16 @@ content::LocationProvider *ContentBrowserClientQt::OverrideSystemLocationProvide
std::string ContentBrowserClientQt::GetApplicationLocale()
{
- return QLocale().bcp47Name().toStdString();
+ return WebEngineLibraryInfo::getApplicationLocale();
+}
+
+void ContentBrowserClientQt::AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id)
+{
+ Q_UNUSED(child_process_id);
+
+ std::string processType = command_line->GetSwitchValueASCII(switches::kProcessType);
+ if (processType == switches::kZygoteProcess)
+ command_line->AppendSwitchASCII(switches::kLang, GetApplicationLocale());
}
#if defined(ENABLE_PLUGINS)