diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 20:54:30 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 20:54:30 +0000 |
commit | 119e95edbf4ad150b67c2ac2cfa5b5db0221fd16 (patch) | |
tree | 09510b82cfd5c2ffaace1a3980ee1071fa0559de /chrome/plugin | |
parent | f46fdbd4f0cc74401cd9a52f54f0f4c52df6547c (diff) | |
download | chromium_src-119e95edbf4ad150b67c2ac2cfa5b5db0221fd16.zip chromium_src-119e95edbf4ad150b67c2ac2cfa5b5db0221fd16.tar.gz chromium_src-119e95edbf4ad150b67c2ac2cfa5b5db0221fd16.tar.bz2 |
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
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/plugin_main.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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(); |