Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 10541088: Propogate the UI language on the command line and expose to Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/content_ppapi_plugin.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/ppapi_plugin_process_host.cc
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index de2770af6dc5eea6371afec005aa803814bccd7e..92d7e4e5428ae9bade8ff556d23bd79a56a7a74c 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -16,12 +16,14 @@
#include "content/browser/renderer_host/render_message_filter.h"
#include "content/common/child_process_host_impl.h"
#include "content/common/child_process_messages.h"
+#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/pepper_plugin_info.h"
#include "content/public/common/process_type.h"
#include "ipc/ipc_switches.h"
#include "net/base/network_change_notifier.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ui/base/ui_base_switches.h"
#include "webkit/plugins/plugin_switches.h"
using content::ChildProcessHost;
@@ -189,6 +191,13 @@ bool PpapiPluginProcessHost::Init(const content::PepperPluginInfo& info) {
arraysize(kPluginForwardSwitches));
}
+ std::string locale =
+ content::GetContentClient()->browser()->GetApplicationLocale();
+ if (!locale.empty()) {
+ // Pass on the locale so the plugin will know what language we're using.
+ cmd_line->AppendSwitchASCII(switches::kLang, locale);
+ }
+
if (!plugin_launcher.empty())
cmd_line->PrependWrapper(plugin_launcher);
« no previous file with comments | « no previous file | content/content_ppapi_plugin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698