summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-11 18:10:37 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-11 18:10:37 +0000
commit2306303ade2ec3f85354623a55015ac674f0f947 (patch)
treee24d7b482009168e4ed67b14239a76ec7954aabc /content/ppapi_plugin
parent6b55aecf5481ebb66f6b93d8f34cca5a44197473 (diff)
downloadchromium_src-2306303ade2ec3f85354623a55015ac674f0f947.zip
chromium_src-2306303ade2ec3f85354623a55015ac674f0f947.tar.gz
chromium_src-2306303ade2ec3f85354623a55015ac674f0f947.tar.bz2
Propogate the UI language on the command line and expose to Flash.
This is just like the NPAPI plugin process and many of the other child processes we have. I wire the command line parameter up to a new Flash setting. TEST=manual BUG=none Review URL: https://chromiumcodereview.appspot.com/10541088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc6
-rw-r--r--content/ppapi_plugin/ppapi_thread.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index e5ae210..e106571 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -28,6 +28,7 @@
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/interface_list.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
+#include "ui/base/ui_base_switches.h"
#include "webkit/plugins/plugin_switches.h"
#if defined(OS_WIN)
@@ -161,6 +162,11 @@ bool PpapiThread::SendToBrowser(IPC::Message* msg) {
return sync_message_filter()->Send(msg);
}
+std::string PpapiThread::GetUILanguage() {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ return command_line->GetSwitchValueASCII(switches::kLang);
+}
+
void PpapiThread::PreCacheFont(const void* logfontw) {
#if defined(OS_WIN)
Send(new ChildProcessHostMsg_PreCacheFont(
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index 352650b..a7c6a3e 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -62,6 +62,7 @@ class PpapiThread : public ChildThread,
// SendToBrowser() is intended to be safe to use on another thread so
// long as the main PpapiThread outlives it.
virtual bool SendToBrowser(IPC::Message* msg) OVERRIDE;
+ virtual std::string GetUILanguage() OVERRIDE;
virtual void PreCacheFont(const void* logfontw) OVERRIDE;
// Message handlers.