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

Unified Diff: chrome/plugin/plugin_main.cc

Issue 5306002: Disable IME for sandboxed flash (windows)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/plugin_main.cc
===================================================================
--- chrome/plugin/plugin_main.cc (revision 67010)
+++ chrome/plugin/plugin_main.cc (working copy)
@@ -66,6 +66,14 @@
FilePath path = cmd_line.GetSwitchValuePath(switches::kPluginPath);
return (path.BaseName() == FilePath(L"gcswf32.dll"));
}
+
+// Disables Input method editor services for the whole process.
+void DisableIME() {
+ if (0 == ::GetSystemMetrics(SM_IMMENABLED))
+ return;
+ ::ImmDisableIME(-1);
+}
+
#endif
// main() routine for running as the plugin process.
@@ -135,6 +143,7 @@
// start elevated and it will call DelayedLowerToken(0) when it's ready.
if (IsPluginBuiltInFlash(parsed_command_line)) {
DVLOG(1) << "Sandboxing flash";
+ DisableIME();
DelayedLowerToken(target_services);
} else {
target_services->LowerToken();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698