Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
deermichel committed Nov 30, 2021
1 parent 0ae8184 commit 000e610
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions patches/chromium/fix_media_key_usage_with_globalshortcuts.patch
Expand Up @@ -59,7 +59,7 @@ index ad366d0fd4c3a637d75a102ab56984f0d01bfc04..d63eb133fd4bab1ea309bb8c742acf88
// true if register successfully, or false if 1) the specificied |accelerator|
// has been registered by another caller or other native applications, or
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
index 5938f75742b793868638e693a9a8c8dc686dfc46..fdf8dd6a0f4a63badf3aa55181835adc22e4d988 100644
index 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17ad729efb 100644
--- a/content/browser/media/media_keys_listener_manager_impl.cc
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
@@ -55,7 +55,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
Expand All @@ -76,12 +76,11 @@ index 5938f75742b793868638e693a9a8c8dc686dfc46..fdf8dd6a0f4a63badf3aa55181835adc
!media_keys_listener_->StartWatchingMediaKey(key_code)) {
return false;
}
@@ -231,19 +236,19 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
media::AudioManager::GetGlobalAppName());
@@ -232,18 +237,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
#endif

+ // This is required for proper functioning of MediaMetadata.
if (system_media_controls_) {
+ // This is required for proper functioning of MediaMetadata.
system_media_controls_->AddObserver(this);
system_media_controls_notifier_ =
std::make_unique<SystemMediaControlsNotifier>(
Expand All @@ -93,12 +92,11 @@ index 5938f75742b793868638e693a9a8c8dc686dfc46..fdf8dd6a0f4a63badf3aa55181835adc
- this, ui::MediaKeysListener::Scope::kGlobal);
- DCHECK(media_keys_listener_);
}

+ // Directly listen for media key keypresses when using GlobalShortcuts.
+ media_keys_listener_ = ui::MediaKeysListener::Create(
+ this, ui::MediaKeysListener::Scope::kGlobal);
+ DCHECK(media_keys_listener_);
+

EnsureAuxiliaryServices();
}

0 comments on commit 000e610

Please sign in to comment.