diff options
author | erikchen@chromium.org <erikchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-16 05:48:25 +0000 |
---|---|---|
committer | erikchen@chromium.org <erikchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-16 05:48:25 +0000 |
commit | fa4778faf09e179bde7f6806f79e3a98140b4354 (patch) | |
tree | 503a675b0577e43dcb12fd67def3dd95ca481f0e /chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h | |
parent | 6e963dbd55d251c862f7c636be7358cffe7affd1 (diff) | |
download | chromium_src-fa4778faf09e179bde7f6806f79e3a98140b4354.zip chromium_src-fa4778faf09e179bde7f6806f79e3a98140b4354.tar.gz chromium_src-fa4778faf09e179bde7f6806f79e3a98140b4354.tar.bz2 |
mac: Allow WebContents key handling to supplant extension overrides of the bookmark shortcut.
Use the same prioritization for accelerator processing for the bookmark
shortcut when overridden by an extension as for when it is built-in to
the browser. Namely, allow WebContents key processing to take place
before extension accelerator processing.
This is the Mac version of the fix. Views was fixed at:
https://codereview.chromium.org/360423002.
BUG=389340
Review URL: https://codereview.chromium.org/388313002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h')
-rw-r--r-- | chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 cea4db8..f4a86f1 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,9 @@ 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; @end @@ -108,7 +111,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. |