Commit 0b74c338 authored by brettw@chromium.org's avatar brettw@chromium.org

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
parent cd66eab2
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment