| Index: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc (revision 129600)
|
| +++ chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc (working copy)
|
| @@ -374,21 +374,15 @@
|
|
|
| // Connect the accelerator for the browser action popup.
|
| void ConnectBrowserActionPopupAccelerator() {
|
| - // Iterate through all the keybindings and see if one is assigned to the
|
| - // browserAction.
|
| - const std::vector<Extension::ExtensionKeybinding>& commands =
|
| - extension_->keybindings();
|
| - for (size_t i = 0; i < commands.size(); ++i) {
|
| - if (commands[i].command_name() !=
|
| - extension_manifest_values::kBrowserActionKeybindingEvent)
|
| - continue;
|
| -
|
| + const Extension::ExtensionKeybinding* command =
|
| + extension_->browser_action_command();
|
| + if (command) {
|
| // Found the browser action shortcut command, register it.
|
| keybinding_.reset(new ui::AcceleratorGtk(
|
| - commands[i].accelerator().key_code(),
|
| - commands[i].accelerator().IsShiftDown(),
|
| - commands[i].accelerator().IsCtrlDown(),
|
| - commands[i].accelerator().IsAltDown()));
|
| + command->accelerator().key_code(),
|
| + command->accelerator().IsShiftDown(),
|
| + command->accelerator().IsCtrlDown(),
|
| + command->accelerator().IsAltDown()));
|
|
|
| gfx::NativeWindow window =
|
| toolbar_->browser()->window()->GetNativeHandle();
|
| @@ -407,7 +401,6 @@
|
| registrar_.Add(this,
|
| chrome::NOTIFICATION_WINDOW_CLOSED,
|
| content::Source<GtkWindow>(window));
|
| - break;
|
| }
|
| }
|
|
|
|
|