diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-03 22:07:54 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-03 22:07:54 +0000 |
commit | 0b74c338bd286e51a004981e746cc212c2d5423c (patch) | |
tree | 0643d824d57f387a4443625427f22c58bca8f96d /content/ppapi_plugin | |
parent | cd66eab2bbf63591145f1bf7a723d3a09d6ee2a6 (diff) | |
download | chromium_src-0b74c338bd286e51a004981e746cc212c2d5423c.zip chromium_src-0b74c338bd286e51a004981e746cc212c2d5423c.tar.gz chromium_src-0b74c338bd286e51a004981e746cc212c2d5423c.tar.bz2 |
Set the default locale for ICU in the PPAPI process.
BUG=140432
Review URL: https://chromiumcodereview.appspot.com/10853007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r-- | content/ppapi_plugin/ppapi_plugin_main.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc index 4550e906..ed68977 100644 --- a/content/ppapi_plugin/ppapi_plugin_main.cc +++ b/content/ppapi_plugin/ppapi_plugin_main.cc @@ -4,6 +4,7 @@ #include "base/command_line.h" #include "base/debug/debugger.h" +#include "base/i18n/rtl.h" #include "base/message_loop.h" #include "base/threading/platform_thread.h" #include "build/build_config.h" @@ -12,6 +13,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "ppapi/proxy/proxy_module.h" +#include "ui/base/ui_base_switches.h" #if defined(OS_WIN) #include "sandbox/win/src/sandbox.h" @@ -45,6 +47,14 @@ int PpapiPluginMain(const content::MainFunctionParams& parameters) { ChildProcess::WaitForDebugger("Ppapi"); } + // Set the default locale to be the current UI language. WebKit uses ICU's + // default locale for some font settings (especially switching between + // Japanese and Chinese fonts for the same characters). + if (command_line.HasSwitch(switches::kLang)) { + std::string locale = command_line.GetSwitchValueASCII(switches::kLang); + base::i18n::SetICUDefaultLocale(locale); + } + MessageLoop main_message_loop; base::PlatformThread::SetName("CrPPAPIMain"); |