chore: bump chromium to 94cc24d3bb17a7406ba6c6cc6dc29 (master) (#21485)

This commit is contained in:
Electron Bot 2019-12-13 15:13:12 -05:00 committed by Jeremy Apthorp
parent 19cd8f3a02
commit 0f2f9a580a
47 changed files with 285 additions and 256 deletions

View file

@ -5,13 +5,13 @@ Subject: command-ismediakey.patch
Override MediaKeysListener::IsMediaKeycode to also listen for Volume Up, Volume Down,
and Mute. We also need to patch out Chromium's usage of RemoteCommandCenterDelegate, as
it uses MPRemoteCommandCenter. MPRemoteCommandCenter makes it such that GlobalShortcuts
it uses MPRemoteCommandCenter. MPRemoteCommandCenter makes it such that GlobalShortcuts
in Electron will not work as intended, because by design an app does not receive remote
control events until it begins playing audio. This means that a media shortcut would not kick
into effect until you, for example, began playing a YouTube video which sort of defeats the
purpose of GlobalShortcuts.
At the moment there is no upstream possibility for this; but perhaps Chromium may
At the moment there is no upstream possibility for this; but perhaps Chromium may
consider some kind of switch, enabled by default, which would conditionally choose to avoid usage of
RemoteCommandCenterDelegate on macOS.
@ -76,7 +76,7 @@ index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc
} // namespace ui
diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..9b4d1895731f758c09e5cb8350d1f225ab0f8a71 100644
index 85378bb565de617b1bd611d28c8714361747a357..94a899e76586d2c7bb199828bfa4aa1ef9ccfcbc 100644
--- a/ui/base/accelerators/media_keys_listener_mac.mm
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
@@ -11,6 +11,7 @@
@ -86,8 +86,8 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..9b4d1895731f758c09e5cb8350d1f225
+#include "electron/buildflags/buildflags.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/system_media_controls_media_keys_listener.h"
@@ -33,6 +33,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
@@ -32,6 +33,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
case NX_KEYTYPE_NEXT:
case NX_KEYTYPE_FAST:
return VKEY_MEDIA_NEXT_TRACK;
@ -100,7 +100,7 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..9b4d1895731f758c09e5cb8350d1f225
}
return VKEY_UNKNOWN;
}
@@ -192,7 +198,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -192,7 +199,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 &&
@ -112,7 +112,7 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..9b4d1895731f758c09e5cb8350d1f225
return event;
}
@@ -223,12 +223,14 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -223,12 +233,14 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
// For Mac OS 10.12.2 or later, we want to use MPRemoteCommandCenter for
// getting media keys globally if there is a RemoteCommandCenterDelegate
// available.