summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authordtseng <dtseng@chromium.org>2014-09-17 09:10:49 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-17 16:11:02 +0000
commit4264d2c4b5d217e1c5dbc2ae80ab6ce595f9b6d3 (patch)
tree8ef7d8c1899872879873acd02fb32ca3293b7789 /ui/aura
parent39017e1de19051c3a3519c28ca980021ae098ee4 (diff)
downloadchromium_src-4264d2c4b5d217e1c5dbc2ae80ab6ce595f9b6d3.zip
chromium_src-4264d2c4b5d217e1c5dbc2ae80ab6ce595f9b6d3.tar.gz
chromium_src-4264d2c4b5d217e1c5dbc2ae80ab6ce595f9b6d3.tar.bz2
Track the active ExtensionKeybindingRegistry and make it available to EventRewriter.
Add the ability to query globally if a shortcut is registered by an extension and use that to avoid unnecessarily rewriting Chrome OS keys. BUG=410944 Review URL: https://codereview.chromium.org/553243002 Cr-Commit-Position: refs/heads/master@{#295284}
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/test/ui_controls_factory_aurax11.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc
index 06a9439..59db324 100644
--- a/ui/aura/test/ui_controls_factory_aurax11.cc
+++ b/ui/aura/test/ui_controls_factory_aurax11.cc
@@ -56,7 +56,6 @@ class UIControlsX11 : public UIControlsAura {
bool shift,
bool alt,
bool command) OVERRIDE {
- DCHECK(!command); // No command key on Aura
return SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, base::Closure());
}
@@ -68,7 +67,6 @@ class UIControlsX11 : public UIControlsAura {
bool alt,
bool command,
const base::Closure& closure) OVERRIDE {
- DCHECK(!command); // No command key on Aura
XEvent xevent = {0};
xevent.xkey.type = KeyPress;
if (control)
@@ -77,6 +75,8 @@ class UIControlsX11 : public UIControlsAura {
SetKeycodeAndSendThenMask(&xevent, XK_Shift_L, ShiftMask);
if (alt)
SetKeycodeAndSendThenMask(&xevent, XK_Alt_L, Mod1Mask);
+ if (command)
+ SetKeycodeAndSendThenMask(&xevent, XK_Meta_L, Mod4Mask);
xevent.xkey.keycode =
XKeysymToKeycode(gfx::GetXDisplay(),
ui::XKeysymForWindowsKeyCode(key, shift));
@@ -91,6 +91,8 @@ class UIControlsX11 : public UIControlsAura {
UnmaskAndSetKeycodeThenSend(&xevent, ShiftMask, XK_Shift_L);
if (control)
UnmaskAndSetKeycodeThenSend(&xevent, ControlMask, XK_Control_L);
+ if (command)
+ UnmaskAndSetKeycodeThenSend(&xevent, Mod4Mask, XK_Meta_L);
DCHECK(!xevent.xkey.state);
RunClosureAfterAllPendingUIEvents(closure);
return true;