Index: chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm |
diff --git a/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm b/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm |
index 6d3cd88777924595c3554a6767da7a36d40e2e66..67c762e445fe9c9e79ca6ab96cb5e76f0fc415f1 100644 |
--- a/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm |
+++ b/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm |
@@ -13,11 +13,25 @@ |
namespace { |
-// Type of functions listed in global_keyboard_shortcuts_mac.h. |
-typedef int (*KeyToCommandMapper)(bool, bool, bool, bool, int, unichar); |
+bool HandleExtraWindowKeyboardShortcut(NSEvent* event, NSWindow* window) { |
+ return command_dispatcher::HandleExtraKeyboardShortcut( |
+ event, window, CommandForWindowKeyboardShortcut); |
+} |
+ |
+bool HandleDelayedWindowKeyboardShortcut(NSEvent* event, NSWindow* window) { |
+ return command_dispatcher::HandleExtraKeyboardShortcut( |
+ event, window, CommandForDelayedWindowKeyboardShortcut); |
+} |
+ |
+bool HandleExtraBrowserKeyboardShortcut(NSEvent* event, NSWindow* window) { |
+ return command_dispatcher::HandleExtraKeyboardShortcut( |
+ event, window, CommandForBrowserKeyboardShortcut); |
+} |
+ |
+} // namespace |
+ |
+namespace command_dispatcher { |
-// If the event is for a Browser window, and the key combination has an |
-// associated command, execute the command. |
bool HandleExtraKeyboardShortcut( |
NSEvent* event, |
NSWindow* window, |
@@ -46,22 +60,7 @@ bool HandleExtraKeyboardShortcut( |
return true; |
} |
-bool HandleExtraWindowKeyboardShortcut(NSEvent* event, NSWindow* window) { |
- return HandleExtraKeyboardShortcut(event, window, |
- CommandForWindowKeyboardShortcut); |
-} |
- |
-bool HandleDelayedWindowKeyboardShortcut(NSEvent* event, NSWindow* window) { |
- return HandleExtraKeyboardShortcut(event, window, |
- CommandForDelayedWindowKeyboardShortcut); |
-} |
- |
-bool HandleExtraBrowserKeyboardShortcut(NSEvent* event, NSWindow* window) { |
- return HandleExtraKeyboardShortcut(event, window, |
- CommandForBrowserKeyboardShortcut); |
-} |
- |
-} // namespace |
+} // namespace command_dispatcher |
@implementation ChromeCommandDispatcherDelegate |