summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 22:10:44 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-03 22:10:44 +0000
commit24e9487d056fad435f75acb3ed48a7755d486a56 (patch)
treef8f41d565af2d295b3036d4db8e0c4c92d892280
parent924bc7e2a29299f6ef56177fbbdc5b6f31527294 (diff)
downloadchromium_src-24e9487d056fad435f75acb3ed48a7755d486a56.zip
chromium_src-24e9487d056fad435f75acb3ed48a7755d486a56.tar.gz
chromium_src-24e9487d056fad435f75acb3ed48a7755d486a56.tar.bz2
Merge 149937 - Set the default locale for ICU in the PPAPI process.
BUG=140432 Review URL: https://chromiumcodereview.appspot.com/10853007 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/10834166 git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@149939 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/ppapi_plugin/ppapi_plugin_main.cc10
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 7f79f48..f9690ee 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/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");