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

Unified Diff: chrome/browser/ui/views/extensions/extension_keybinding_registry_views.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/views/extensions/extension_keybinding_registry_views.cc
diff --git a/chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc b/chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc
index 1531847118ccc1914d64dc2bafac94b97d16b4ba..322be1518d8982e152378e27c26f998a8c2be10b 100644
--- a/chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc
+++ b/chrome/browser/ui/views/extensions/extension_keybinding_registry_views.cc
@@ -47,7 +47,10 @@ void ExtensionKeybindingRegistryViews::AddExtensionKeybinding(
// which are handled elsewhere).
extensions::CommandMap commands;
if (!command_service->GetNamedCommands(
- extension->id(), extensions::CommandService::ACTIVE_ONLY, &commands))
+ extension->id(),
+ extensions::CommandService::ACTIVE_ONLY,
+ extensions::CommandService::REGULAR,
+ &commands))
return;
extensions::CommandMap::const_iterator iter = commands.begin();
for (; iter != commands.end(); ++iter) {
@@ -81,6 +84,11 @@ void ExtensionKeybindingRegistryViews::RemoveExtensionKeybinding(
EventTargets::iterator old = iter++;
event_targets_.erase(old);
+
+ // If a specific command_name was requested, it has now been deleted and
+ // no further work is required.
+ if (!command_name.empty())
+ break;
}
}
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/webui/extensions/command_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698