summaryrefslogtreecommitdiffstats
path: root/third_party/mach_override/mach_override.gyp
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 23:00:35 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 23:00:35 +0000
commit3283493de7e7c36971ee091cb75fe7629272198a (patch)
treedf7fae5dd99e4c0262bbdd601ccfcb0d1244e837 /third_party/mach_override/mach_override.gyp
parent690bda8807a97827d72abf6ac2b350cf44de135e (diff)
downloadchromium_src-3283493de7e7c36971ee091cb75fe7629272198a.zip
chromium_src-3283493de7e7c36971ee091cb75fe7629272198a.tar.gz
chromium_src-3283493de7e7c36971ee091cb75fe7629272198a.tar.bz2
Mac: Let chrome coexist with the Chinese Handwriting IME.
The renderer sandbox breaks the Chinese Handwriting shortcut while Chrome is running, even when Chrome is not active: In a nutshell, Carbon tries to load the IME in every process, and if that fails, it uninstalls the toggle shorcut. It fails in the renderer process due to the sandbox. See the bug for details. Prewarming (patch set 1) doesn't work because that opens up clipboard access to the renderer – the IME doesn't load correctly if it doesn't have clipboard access. dyld __interpose based interposing (patch set 2) doesn't work because TISCreateInputSourceList and its broken caller are in the same framework (HIToolbox). Hence, use binary rewriting to return an arbitrary array with size > 0 to make HIToolbox believe that the IME loads correctly, so that it doesn't uninstall the global handwriting keyboard shortcut (only on >= 10.6). BUG=31225 TEST=Enable Chinese in the input menu. Make sure Chrome's not running. Note that ctrl-shift-space opens and dismisses the Handwriting IME (you need a multitouch trackpad for that). Open Chrome, note that the IME still works. (If you run Chrome without this patch, the IME will be broken until you do ps aux | grep Chinese and then kill $CHINESE_HANDWRITING_PID and then toggle the IME once through the Menu Extra menu.) It is a good idea to have a Terminal open during testing, because killing the task is the only way to dismiss the IME with the keyboard without this CL. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81308 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81332 Review URL: http://codereview.chromium.org/6801056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/mach_override/mach_override.gyp')
-rw-r--r--third_party/mach_override/mach_override.gyp28
1 files changed, 28 insertions, 0 deletions
diff --git a/third_party/mach_override/mach_override.gyp b/third_party/mach_override/mach_override.gyp
new file mode 100644
index 0000000..3dbb1d1
--- /dev/null
+++ b/third_party/mach_override/mach_override.gyp
@@ -0,0 +1,28 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ ],
+ 'conditions': [
+ ['OS=="mac"', {
+ 'targets' : [
+ {
+ 'target_name' : 'mach_override',
+ 'type': '<(library)',
+ 'sources': [
+ 'mach_override.c',
+ 'mach_override.h',
+ ],
+ },
+ ],
+ }],
+ ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2: