Chromium Code Reviews| Index: chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm |
| diff --git a/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm b/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm |
| index 839635a1ff7a096a548f538226fd0dcc80e193d8..5d8fe906715489fbf4353b33a958a6f3feb583b5 100644 |
| --- a/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm |
| +++ b/chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.mm |
| @@ -84,6 +84,7 @@ void ExtensionKeybindingRegistryCocoa::AddExtensionKeybinding( |
| command_service->GetNamedCommands( |
| extension->id(), |
| extensions::CommandService::ACTIVE_ONLY, |
| + extensions::CommandService::REGULAR, |
| &commands); |
| for (extensions::CommandMap::const_iterator iter = commands.begin(); |
| @@ -142,7 +143,13 @@ void ExtensionKeybindingRegistryCocoa::RemoveExtensionKeybinding( |
| while (iter != event_targets_.end()) { |
| EventTargets::iterator old = iter++; |
| if (old->second.first == extension->id() && |
| - (command_name.empty() || (old->second.second == command_name))) |
| + (command_name.empty() || (old->second.second == command_name))) { |
| event_targets_.erase(old); |
| + |
| + // If a specific command_name was requested, it has now been deleted so |
| + // no further work is required. |
|
Nico
2013/10/03 16:48:53
This seems to be in every UI implementation. Is th
Finnur
2013/10/03 21:57:58
I'll take a closer look tomorrow morning.
Finnur
2013/10/04 17:57:02
I opted for moving this into the base class, which
Yoyo Zhou
2013/10/04 18:12:07
Looks fine to me.
|
| + if (!command_name.empty()) |
| + break; |
| + } |
| } |
| } |