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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 10824307: Port Extension Commands to Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_controller.mm (revision 151684)
+++ chrome/browser/ui/cocoa/browser_window_controller.mm (working copy)
@@ -44,6 +44,7 @@
#import "chrome/browser/ui/cocoa/dev_tools_controller.h"
#import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
#import "chrome/browser/ui/cocoa/event_utils.h"
+#include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.h"
#import "chrome/browser/ui/cocoa/fast_resize_view.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h"
@@ -413,6 +414,10 @@
if ([self hasToolbar]) // Do not create the buttons in popups.
[toolbarController_ createBrowserActionButtons];
+ extension_keybinding_registry_.reset(
+ new ExtensionKeybindingRegistryCocoa(browser_->profile(),
+ [self window]));
+
// We are done initializing now.
initializing_ = NO;
}
@@ -1166,6 +1171,11 @@
chrome::ExecuteCommand(browser_.get(), command);
}
+- (BOOL)handledByExtensionCommand:(NSEvent*)event {
+ return extension_keybinding_registry_->ProcessKeyEvent(
+ content::NativeWebKeyboardEvent(event));
+}
+
// StatusBubble delegate method: tell the status bubble the frame it should
// position itself in.
- (NSRect)statusBubbleBaseFrame {

Powered by Google App Engine
This is Rietveld 408576698