Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1865)

Unified Diff: chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc

Issue 25007002: Add GTK support for global Extension Commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc
diff --git a/chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc
index ccb02561afeac1e141559ed15d34d2f2ba7b729d..ba9c65ced2afa7375f6db93a46534908d405726d 100644
--- a/chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.cc
@@ -64,6 +64,7 @@ void ExtensionKeybindingRegistryGtk::AddExtensionKeybinding(
command_service->GetNamedCommands(
extension->id(),
extensions::CommandService::ACTIVE_ONLY,
+ extensions::CommandService::REGULAR,
&commands);
for (extensions::CommandMap::const_iterator iter = commands.begin();
@@ -149,6 +150,11 @@ void ExtensionKeybindingRegistryGtk::RemoveExtensionKeybinding(
EventTargets::iterator old = iter++;
event_targets_.erase(old);
+
+ // If a specific command_name was requested, it has now been deleted so
+ // no further work is required.
+ if (!command_name.empty())
+ break;
}
}

Powered by Google App Engine
This is Rietveld 408576698