From 119e95edbf4ad150b67c2ac2cfa5b5db0221fd16 Mon Sep 17 00:00:00 2001 From: "cpu@chromium.org" Date: Tue, 23 Nov 2010 20:54:30 +0000 Subject: Disable IME for sandboxed flash (windows) - Seeing a lot of crashes specially for korean IME - IME is more or less busted by the sandbox anyway. BUG=63352 TEST=see bug Review URL: http://codereview.chromium.org/5306002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67152 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/plugin_main.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome/plugin') diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc index e72c4e2..9d97ed9 100644 --- a/chrome/plugin/plugin_main.cc +++ b/chrome/plugin/plugin_main.cc @@ -66,6 +66,14 @@ bool IsPluginBuiltInFlash(const CommandLine& cmd_line) { 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 @@ int PluginMain(const MainFunctionParams& parameters) { // 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(); -- cgit v1.1