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

Unified Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h

Issue 388313002: mac: Allow WebContents key handling to supplant extension overrides of the bookmark shortcut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment from wittman. Created 6 years, 5 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/apps/native_app_window_cocoa.h
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h
index cea4db83ddd726d5e0605a5ae86829449de6b7cc..b99cacbddad4c182d2c6bd00b58182c0ce27f313 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h
@@ -15,6 +15,7 @@
#import "chrome/browser/ui/cocoa/browser_command_executor.h"
#include "content/public/browser/web_contents_observer.h"
#include "extensions/common/draggable_region.h"
+#include "ui/base/accelerators/accelerator_manager.h"
#include "ui/gfx/rect.h"
namespace apps {
@@ -39,7 +40,10 @@ class SkRegion;
// Consults the Command Registry to see if this |event| needs to be handled as
// an extension command and returns YES if so (NO otherwise).
-- (BOOL)handledByExtensionCommand:(NSEvent*)event;
+// Only extensions with the given |priority| are considered.
+- (BOOL)handledByExtensionCommand:(NSEvent*)event
+ priority:
+ (ui::AcceleratorManager::HandlerPriority)priority;
Scott Hess - ex-Googler 2014/07/15 19:20:59 Rather than split the line I'd just relax the colo
erikchen 2014/07/15 20:48:40 I dislike formatting that conflicts with both Chro
Scott Hess - ex-Googler 2014/07/15 21:30:43 Yeah, I'll probably pay for my opinion. "clang-fo
@end
@@ -108,7 +112,9 @@ class NativeAppWindowCocoa : public apps::NativeAppWindow,
void WindowDidExitFullscreen();
// Called to handle a key event.
- bool HandledByExtensionCommand(NSEvent* event);
+ bool HandledByExtensionCommand(
+ NSEvent* event,
+ ui::AcceleratorManager::HandlerPriority priority);
// Returns true if |point| in local Cocoa coordinate system falls within
// the draggable region.

Powered by Google App Engine
This is Rietveld 408576698