From dc95fa63764bc50bbfeac2f692b07cd4ba0f9ee8 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 9 Jul 2018 16:10:03 -0400 Subject: [PATCH] Fix passing of lang command-line flag to the renderer (issue #2468) --- libcef/browser/content_browser_client.cc | 5 +++++ libcef/browser/content_browser_client.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index bd6d03b0b..ba6e5616e 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -41,6 +41,7 @@ #include "base/json/json_reader.h" #include "base/path_service.h" #include "cef/grit/cef_resources.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_service.h" #include "chrome/browser/plugins/plugin_info_host_impl.h" #include "chrome/browser/profiles/profile.h" @@ -765,6 +766,10 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( } } +std::string CefContentBrowserClient::GetApplicationLocale() { + return g_browser_process->GetApplicationLocale(); +} + content::QuotaPermissionContext* CefContentBrowserClient::CreateQuotaPermissionContext() { return new CefQuotaPermissionContext(); diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 0ab1d4b88..c731fc068 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -62,6 +62,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { content::BrowserContext* context2) override; void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) override; + std::string GetApplicationLocale() override; content::QuotaPermissionContext* CreateQuotaPermissionContext() override; void GetQuotaSettings( content::BrowserContext* context,