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

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

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: Comments from yoz and shess. 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.mm
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index 2260fc38535d21820f388ca86a3569d7da46417d..2a0c14a919c6fe53383ef6e9e428666dfb8f4035 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -191,9 +191,10 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
// No-op, swallow the event.
}
-- (BOOL)handledByExtensionCommand:(NSEvent*)event {
+- (BOOL)handledByExtensionCommand:(NSEvent*)event
+ priority:(ui::AcceleratorManager::HandlerPriority)priority {
if (appWindow_)
- return appWindow_->HandledByExtensionCommand(event);
+ return appWindow_->HandledByExtensionCommand(event, priority);
return NO;
}
@@ -912,9 +913,11 @@ void NativeAppWindowCocoa::WindowWillZoom() {
Maximize();
}
-bool NativeAppWindowCocoa::HandledByExtensionCommand(NSEvent* event) {
+bool NativeAppWindowCocoa::HandledByExtensionCommand(
+ NSEvent* event,
+ ui::AcceleratorManager::HandlerPriority priority) {
return extension_keybinding_registry_->ProcessKeyEvent(
- content::NativeWebKeyboardEvent(event));
+ content::NativeWebKeyboardEvent(event), priority);
}
void NativeAppWindowCocoa::ShowWithApp() {
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698