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

Unified Diff: chrome/browser/ui/cocoa/chrome_event_processing_window.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/chrome_event_processing_window.mm
===================================================================
--- chrome/browser/ui/cocoa/chrome_event_processing_window.mm (revision 151684)
+++ chrome/browser/ui/cocoa/chrome_event_processing_window.mm (working copy)
@@ -6,6 +6,7 @@
#include "base/logging.h"
#import "chrome/browser/ui/cocoa/browser_command_executor.h"
+#import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
#include "chrome/browser/global_keyboard_shortcuts_mac.h"
#import "content/public/browser/render_widget_host_view_mac_base.h"
@@ -63,6 +64,15 @@
if (redispatchingEvent_)
return NO;
+ NSWindow* window = event.window;
+ if (window) {
+ BrowserWindowController* controller = [window windowController];
+ if ([controller respondsToSelector:@selector(handledByExtensionCommand:)]) {
+ if ([controller handledByExtensionCommand:event])
+ return YES;
+ }
+ }
+
// Give the web site a chance to handle the event. If it doesn't want to
// handle it, it will call us back with one of the |handle*| methods above.
NSResponder* r = [self firstResponder];

Powered by Google App Engine
This is Rietveld 408576698