d32e6cc252
* chore: bump chromium in DEPS to 105.0.5147.0 * chore: update chromium/can_create_window.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3642216 fix minor code shear in patch * chore: update chromium/port_autofill_colors_to_the_color_pipeline.patch Xref: chromium/port_autofill_colors_to_the_color_pipeline.patch fix minor code shear in patch * chore: remove chromium/posix_replace_doubleforkandexec_with_forkandspawn.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3727368 Removing upstreamed patch * chore: update patches * chore: update patches * chore: add new enum kOffscreenDocument to switch statement Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3722498 * chore: add stub for new parent virtual method OnNewCropVersion() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3717305 * chore: remove download_schedule arg from DownloadTargetCallback invocation Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3711096 Clean up DownloadLater flags and prefs * chore: add stub for new parent virtual method OnNewCropVersion() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3717305 * chore: use base::List for extensions::Event Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3718366 Remove Event constructor overloads that take vector<base::Value> * refactor: replace ClearStorageDataOptions.origin with .storage_key Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3702946 Refactor ClearData to take StorageKey * chore: bump chromium in DEPS to 105.0.5149.0 * chore: update patches * refactor: migrate InspectableWebContents to base::Value::List Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3726326 Migrate DevToolsEmbedderMessageDispatcher to base::Value::List. * refactor: update electron_api_clipboard_mac Clipboard::ReadFindText() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3721398 Mac: Remove unused FindPasteboard C++ interface * chore: bump chromium in DEPS to 105.0.5151.0 * chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3714995 Move Cart DB proto to //components/commerce * Revert "chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch" This reverts commit f8de4605eb3d35152b186646fefd8e88d1df836b. * chore: fix code shear in chromium/build_do_not_depend_on_packed_resource_integrity.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3714995 Move Cart DB proto to //components/commerce * chore: update patches * chore: update ElectronAccessibilityUIMessageHandler to use base::Value::List Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3733367 Convert /chrome/browser/accessibility away from WebUI::RegisterDeprecatedMessageCallback * chore: bump chromium in DEPS to 105.0.5153.0 * chore: bump chromium in DEPS to 105.0.5155.0 * chore: bump chromium in DEPS to 105.0.5157.0 * chore: bump chromium in DEPS to 105.0.5159.0 * chore: update patches * chore: update CL reference * Replace ContentMainDelegate::InvokedIn with a variant https://chromium-review.googlesource.com/c/chromium/src/+/3705957 * Switch devtools_frontend.mojom to mojom.DictValue. https://chromium-review.googlesource.com/c/chromium/src/+/3726425 * webhid: Bind HID service with service workers https://chromium-review.googlesource.com/c/chromium/src/+/3680562 * chore: fix lint * Don't fire load-complete AX notification on macOS for unfocused windows https://chromium-review.googlesource.com/c/chromium/src/+/3695403 * chore: update patches * chore: bump chromium in DEPS to 105.0.5165.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5167.0 * chore: bump chromium in DEPS to 105.0.5169.0 * chore: bump chromium in DEPS to 105.0.5171.0 * chore: update patches * chore: bump chromium in DEPS to 105.0.5173.0 * chore: update patches * 3743346: Stop generating unsupported policies on macOS https://chromium-review.googlesource.com/c/chromium/src/+/3743346 * 3727612: [Bluetooth][Win] Refactor pairing prompt code https://chromium-review.googlesource.com/c/chromium/src/+/3727612 * 3737325: system-extensions: Move IsEnabled() out of SystemExtensionsProvider. https://chromium-review.googlesource.com/c/chromium/src/+/3737325 * 3748635: Remove RenderView from the public API. https://chromium-review.googlesource.com/c/chromium/src/+/3748635 * fixup: 3743346: Stop generating unsupported policies on macOS Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
364 lines
18 KiB
Diff
364 lines
18 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <jeremya@chromium.org>
|
|
Date: Wed, 10 Oct 2018 15:07:34 -0700
|
|
Subject: command-ismediakey.patch
|
|
|
|
Override MediaKeysListener::IsMediaKeycode and associated functions to also listen for
|
|
Volume Up, Volume Down, and Mute.
|
|
|
|
Also apply electron/electron@0f67b1866a9f00b852370e721affa4efda623f3a
|
|
and electron/electron@d2368d2d3b3de9eec4cc32b6aaf035cc89921bf1 as
|
|
patches.
|
|
|
|
diff --git a/chrome/browser/extensions/global_shortcut_listener_ozone.cc b/chrome/browser/extensions/global_shortcut_listener_ozone.cc
|
|
index ed2ac20679a9357c9493224ec5e08837c7860d6e..7f9a97e11395e5521e100694cd37bcd95bcd8e35 100644
|
|
--- a/chrome/browser/extensions/global_shortcut_listener_ozone.cc
|
|
+++ b/chrome/browser/extensions/global_shortcut_listener_ozone.cc
|
|
@@ -58,7 +58,8 @@ bool GlobalShortcutListenerOzone::RegisterAcceleratorImpl(
|
|
const bool registered =
|
|
platform_global_shortcut_listener_->RegisterAccelerator(
|
|
accelerator.key_code(), accelerator.IsAltDown(),
|
|
- accelerator.IsCtrlDown(), accelerator.IsShiftDown());
|
|
+ accelerator.IsCtrlDown(), accelerator.IsShiftDown(),
|
|
+ accelerator.IsCmdDown());
|
|
if (registered)
|
|
registered_hot_keys_.insert(accelerator);
|
|
return registered;
|
|
@@ -72,14 +73,15 @@ void GlobalShortcutListenerOzone::UnregisterAcceleratorImpl(
|
|
|
|
platform_global_shortcut_listener_->UnregisterAccelerator(
|
|
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
|
|
- accelerator.IsShiftDown());
|
|
+ accelerator.IsShiftDown(), accelerator.IsCmdDown());
|
|
registered_hot_keys_.erase(accelerator);
|
|
}
|
|
|
|
void GlobalShortcutListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
int modifiers = 0;
|
|
if (is_alt_down)
|
|
modifiers |= ui::EF_ALT_DOWN;
|
|
@@ -87,6 +89,8 @@ void GlobalShortcutListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
|
modifiers |= ui::EF_CONTROL_DOWN;
|
|
if (is_shift_down)
|
|
modifiers |= ui::EF_SHIFT_DOWN;
|
|
+ if (is_cmd_down)
|
|
+ modifiers |= ui::EF_COMMAND_DOWN;
|
|
|
|
NotifyKeyPressed(ui::Accelerator(key_code, modifiers));
|
|
}
|
|
diff --git a/chrome/browser/extensions/global_shortcut_listener_ozone.h b/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
|
index a2cec20e0ba434afa5e15bf60327c6a6f9b551f9..f58796ff2050883879225a22ed0b3f0c1aacf824 100644
|
|
--- a/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
|
+++ b/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
|
@@ -46,7 +46,8 @@ class GlobalShortcutListenerOzone
|
|
void OnKeyPressed(ui::KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) override;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) override;
|
|
void OnPlatformListenerDestroyed() override;
|
|
|
|
bool is_listening_ = false;
|
|
diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc
|
|
index 2778a18b6c28f3342c6b43d1de71fbbd46c72f06..85af551f87b8b0f9aed7a2a395ecf79f81f5a0a1 100644
|
|
--- a/chrome/browser/extensions/global_shortcut_listener_win.cc
|
|
+++ b/chrome/browser/extensions/global_shortcut_listener_win.cc
|
|
@@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd,
|
|
modifiers |= (LOWORD(lparam) & MOD_SHIFT) ? ui::EF_SHIFT_DOWN : 0;
|
|
modifiers |= (LOWORD(lparam) & MOD_ALT) ? ui::EF_ALT_DOWN : 0;
|
|
modifiers |= (LOWORD(lparam) & MOD_CONTROL) ? ui::EF_CONTROL_DOWN : 0;
|
|
+ modifiers |= (LOWORD(lparam) & MOD_WIN) ? ui::EF_COMMAND_DOWN : 0;
|
|
+
|
|
ui::Accelerator accelerator(
|
|
ui::KeyboardCodeForWindowsKeyCode(key_code), modifiers);
|
|
|
|
@@ -92,6 +94,7 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl(
|
|
modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0;
|
|
modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0;
|
|
modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0;
|
|
+ modifiers |= accelerator.IsCmdDown() ? MOD_WIN : 0;
|
|
|
|
// Create an observer that registers a hot key for |accelerator|.
|
|
std::unique_ptr<gfx::SingletonHwndHotKeyObserver> observer =
|
|
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
|
|
index 3f37f08ccc06137317164e96e8934a0202fa5550..b954f8dde00d4f5257223c464e9145a6bef48900 100644
|
|
--- a/content/browser/media/media_keys_listener_manager_impl.cc
|
|
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
|
|
@@ -297,6 +297,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
|
|
case ui::VKEY_MEDIA_STOP:
|
|
system_media_controls_->SetIsStopEnabled(should_enable);
|
|
break;
|
|
+ case ui::VKEY_VOLUME_DOWN:
|
|
+ case ui::VKEY_VOLUME_UP:
|
|
+ case ui::VKEY_VOLUME_MUTE:
|
|
+ // Do nothing.
|
|
+ break;
|
|
default:
|
|
NOTREACHED();
|
|
}
|
|
diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc
|
|
index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc7951d372 100644
|
|
--- a/ui/base/accelerators/media_keys_listener.cc
|
|
+++ b/ui/base/accelerators/media_keys_listener.cc
|
|
@@ -13,7 +13,8 @@ MediaKeysListener::~MediaKeysListener() = default;
|
|
// static
|
|
bool MediaKeysListener::IsMediaKeycode(KeyboardCode key_code) {
|
|
return key_code == VKEY_MEDIA_PLAY_PAUSE || key_code == VKEY_MEDIA_STOP ||
|
|
- key_code == VKEY_MEDIA_PREV_TRACK || key_code == VKEY_MEDIA_NEXT_TRACK;
|
|
+ key_code == VKEY_MEDIA_PREV_TRACK || key_code == VKEY_MEDIA_NEXT_TRACK ||
|
|
+ key_code == VKEY_VOLUME_UP || key_code == VKEY_VOLUME_DOWN || key_code == VKEY_VOLUME_MUTE;
|
|
}
|
|
|
|
} // namespace ui
|
|
diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
|
|
index 87a53282aa3afa3fe8469272d8b1ee37dcadf845..55c36da933165c8f86dd2ab440733f4b20bee378 100644
|
|
--- a/ui/base/accelerators/media_keys_listener_mac.mm
|
|
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
|
|
@@ -34,6 +34,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
|
|
case NX_KEYTYPE_NEXT:
|
|
case NX_KEYTYPE_FAST:
|
|
return VKEY_MEDIA_NEXT_TRACK;
|
|
+ case NX_KEYTYPE_SOUND_UP:
|
|
+ return VKEY_VOLUME_UP;
|
|
+ case NX_KEYTYPE_SOUND_DOWN:
|
|
+ return VKEY_VOLUME_DOWN;
|
|
+ case NX_KEYTYPE_MUTE:
|
|
+ return VKEY_VOLUME_MUTE;
|
|
}
|
|
return VKEY_UNKNOWN;
|
|
}
|
|
@@ -194,7 +200,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
|
|
int key_code = (data1 & 0xFFFF0000) >> 16;
|
|
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
|
|
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&
|
|
- key_code != NX_KEYTYPE_REWIND) {
|
|
+ key_code != NX_KEYTYPE_REWIND &&
|
|
+ key_code != NX_KEYTYPE_SOUND_UP &&
|
|
+ key_code != NX_KEYTYPE_SOUND_DOWN &&
|
|
+ key_code != NX_KEYTYPE_MUTE) {
|
|
return event;
|
|
}
|
|
|
|
diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc
|
|
index 898e15a25c99ad25221c41594803521565ff4432..664337941023e800c9605f987d0e1d65bb0a444d 100644
|
|
--- a/ui/base/x/x11_global_shortcut_listener.cc
|
|
+++ b/ui/base/x/x11_global_shortcut_listener.cc
|
|
@@ -31,11 +31,13 @@ const x11::ModMask kModifiersMasks[] = {
|
|
|
|
x11::ModMask GetNativeModifiers(bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
constexpr auto kNoMods = x11::ModMask{};
|
|
return (is_shift_down ? x11::ModMask::Shift : kNoMods) |
|
|
(is_ctrl_down ? x11::ModMask::Control : kNoMods) |
|
|
- (is_alt_down ? x11::ModMask::c_1 : kNoMods);
|
|
+ (is_alt_down ? x11::ModMask::c_1 : kNoMods) |
|
|
+ (is_cmd_down ? x11::ModMask::c_4 : kNoMods);
|
|
}
|
|
|
|
} // namespace
|
|
@@ -81,8 +83,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {
|
|
bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
- auto modifiers = GetNativeModifiers(is_alt_down, is_ctrl_down, is_shift_down);
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
+ auto modifiers = GetNativeModifiers(is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down);
|
|
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
|
|
auto keycode = connection_->KeysymToKeycode(keysym);
|
|
|
|
@@ -107,7 +110,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
|
}
|
|
|
|
registered_combinations_.insert(
|
|
- Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down));
|
|
+ Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down));
|
|
|
|
return true;
|
|
}
|
|
@@ -115,8 +118,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
|
|
void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
- auto modifiers = GetNativeModifiers(is_alt_down, is_ctrl_down, is_shift_down);
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
+ auto modifiers = GetNativeModifiers(is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down);
|
|
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
|
|
auto keycode = connection_->KeysymToKeycode(keysym);
|
|
|
|
@@ -124,7 +128,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
|
|
connection_->UngrabKey({keycode, x_root_window_, modifiers | mask});
|
|
|
|
registered_combinations_.erase(
|
|
- Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down));
|
|
+ Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down));
|
|
}
|
|
|
|
void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
|
|
@@ -134,14 +138,15 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
|
|
const bool is_alt_down = event.flags() & EF_ALT_DOWN;
|
|
const bool is_ctrl_down = event.flags() & EF_CONTROL_DOWN;
|
|
const bool is_shift_down = event.flags() & EF_SHIFT_DOWN;
|
|
+ const bool is_cmd_down = event.flags() & EF_COMMAND_DOWN;
|
|
|
|
if (!base::Contains(
|
|
registered_combinations_,
|
|
- Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down))) {
|
|
+ Accelerator(key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down))) {
|
|
return;
|
|
}
|
|
|
|
- OnKeyPressed(key_code, is_alt_down, is_ctrl_down, is_shift_down);
|
|
+ OnKeyPressed(key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down);
|
|
}
|
|
|
|
} // namespace ui
|
|
diff --git a/ui/base/x/x11_global_shortcut_listener.h b/ui/base/x/x11_global_shortcut_listener.h
|
|
index bfb82e38a9ccc7459ccb427d512df821517a328b..7f1d5876a51fa53e539b2bab8d2f020f26d39ceb 100644
|
|
--- a/ui/base/x/x11_global_shortcut_listener.h
|
|
+++ b/ui/base/x/x11_global_shortcut_listener.h
|
|
@@ -41,18 +41,21 @@ class COMPONENT_EXPORT(UI_BASE_X) XGlobalShortcutListener
|
|
virtual void OnKeyPressed(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) = 0;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) = 0;
|
|
|
|
void StartListening();
|
|
void StopListening();
|
|
bool RegisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down);
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down);
|
|
void UnregisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down);
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down);
|
|
|
|
private:
|
|
// Due to how system key grabbing works on X11, we have to be a bit greedy and
|
|
@@ -61,7 +64,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XGlobalShortcutListener
|
|
// and filter the incoming events against that registry before notifying the
|
|
// observer. This tuple describes the meaningful parts of the event; booleans
|
|
// 1, 2, and 3 hold states of Alt, Control, and Shift keys, respectively.
|
|
- using Accelerator = std::tuple<KeyboardCode, bool, bool, bool>;
|
|
+ using Accelerator = std::tuple<KeyboardCode, bool, bool, bool, bool>;
|
|
|
|
// Invoked when a global shortcut is pressed.
|
|
void OnKeyPressEvent(const KeyEvent& event);
|
|
diff --git a/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.cc b/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.cc
|
|
index 760dfc340601b7c1807fa750b008bcc79780c583..54f9817017c9fc0ebcd2f5825fb20b2fb8412b02 100644
|
|
--- a/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.cc
|
|
+++ b/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.cc
|
|
@@ -26,27 +26,30 @@ void X11GlobalShortcutListenerOzone::StopListening() {
|
|
bool X11GlobalShortcutListenerOzone::RegisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
return XGlobalShortcutListener::RegisterAccelerator(
|
|
- key_code, is_alt_down, is_ctrl_down, is_shift_down);
|
|
+ key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down);
|
|
}
|
|
|
|
void X11GlobalShortcutListenerOzone::UnregisterAccelerator(
|
|
KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
return XGlobalShortcutListener::UnregisterAccelerator(
|
|
- key_code, is_alt_down, is_ctrl_down, is_shift_down);
|
|
+ key_code, is_alt_down, is_ctrl_down, is_shift_down, is_cmd_down);
|
|
}
|
|
|
|
void X11GlobalShortcutListenerOzone::OnKeyPressed(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) {
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) {
|
|
if (delegate()) {
|
|
delegate()->OnKeyPressed(key_code, is_alt_down, is_ctrl_down,
|
|
- is_shift_down);
|
|
+ is_shift_down, is_cmd_down);
|
|
}
|
|
}
|
|
|
|
diff --git a/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.h b/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.h
|
|
index 0f1980abdcaf30e23f580b937ecb2c422bf2a357..112967622cb8a6263c7a88dd8d09f48f52448a45 100644
|
|
--- a/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.h
|
|
+++ b/ui/ozone/platform/x11/x11_global_shortcut_listener_ozone.h
|
|
@@ -28,17 +28,20 @@ class X11GlobalShortcutListenerOzone : public PlatformGlobalShortcutListener,
|
|
bool RegisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) override;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) override;
|
|
void UnregisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) override;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) override;
|
|
|
|
// ui::XGlobalShortcutListener:
|
|
void OnKeyPressed(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) override;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) override;
|
|
};
|
|
|
|
} // namespace ui
|
|
diff --git a/ui/ozone/public/platform_global_shortcut_listener.h b/ui/ozone/public/platform_global_shortcut_listener.h
|
|
index 5b6ceb2e23d306e446cad5a6b6e7adf37334410a..d4fbca17a11bd52deaf746e052eeeb12d8a4594e 100644
|
|
--- a/ui/ozone/public/platform_global_shortcut_listener.h
|
|
+++ b/ui/ozone/public/platform_global_shortcut_listener.h
|
|
@@ -20,7 +20,8 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformGlobalShortcutListenerDelegate {
|
|
virtual void OnKeyPressed(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) = 0;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) = 0;
|
|
// Called back when the platform implementation is destroyed.
|
|
virtual void OnPlatformListenerDestroyed() = 0;
|
|
|
|
@@ -52,11 +53,13 @@ class COMPONENT_EXPORT(OZONE_BASE) PlatformGlobalShortcutListener {
|
|
virtual bool RegisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) = 0;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) = 0;
|
|
virtual void UnregisterAccelerator(KeyboardCode key_code,
|
|
bool is_alt_down,
|
|
bool is_ctrl_down,
|
|
- bool is_shift_down) = 0;
|
|
+ bool is_shift_down,
|
|
+ bool is_cmd_down) = 0;
|
|
|
|
protected:
|
|
PlatformGlobalShortcutListenerDelegate* delegate() { return delegate_; }
|