| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 7 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 *num_entries = arraysize(keyboard_shortcuts); | 33 *num_entries = arraysize(keyboard_shortcuts); |
| 34 | 34 |
| 35 return keyboard_shortcuts; | 35 return keyboard_shortcuts; |
| 36 } | 36 } |
| 37 | 37 |
| 38 const KeyboardShortcutData* GetBrowserKeyboardShortcutTable | 38 const KeyboardShortcutData* GetBrowserKeyboardShortcutTable |
| 39 (size_t* num_entries) { | 39 (size_t* num_entries) { |
| 40 static const KeyboardShortcutData keyboard_shortcuts[] = { | 40 static const KeyboardShortcutData keyboard_shortcuts[] = { |
| 41 {true, false, false, kVK_LeftArrow, IDC_BACK}, | 41 {true, false, false, kVK_LeftArrow, IDC_BACK}, |
| 42 {true, false, false, kVK_RightArrow, IDC_FORWARD}, | 42 {true, false, false, kVK_RightArrow, IDC_FORWARD}, |
| 43 {false, false, false, kVK_Delete, IDC_BACK}, |
| 44 {false, true, false, kVK_Delete, IDC_FORWARD}, |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 *num_entries = arraysize(keyboard_shortcuts); | 47 *num_entries = arraysize(keyboard_shortcuts); |
| 46 | 48 |
| 47 return keyboard_shortcuts; | 49 return keyboard_shortcuts; |
| 48 } | 50 } |
| 49 | 51 |
| 50 static int CommandForKeyboardShortcut( | 52 static int CommandForKeyboardShortcut( |
| 51 const KeyboardShortcutData* (*get_keyboard_shortcut_table)(size_t*), | 53 const KeyboardShortcutData* (*get_keyboard_shortcut_table)(size_t*), |
| 52 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { | 54 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 76 command_key, shift_key, | 78 command_key, shift_key, |
| 77 cntrl_key, vkey_code); | 79 cntrl_key, vkey_code); |
| 78 } | 80 } |
| 79 | 81 |
| 80 int CommandForBrowserKeyboardShortcut( | 82 int CommandForBrowserKeyboardShortcut( |
| 81 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { | 83 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { |
| 82 return CommandForKeyboardShortcut(GetBrowserKeyboardShortcutTable, | 84 return CommandForKeyboardShortcut(GetBrowserKeyboardShortcutTable, |
| 83 command_key, shift_key, | 85 command_key, shift_key, |
| 84 cntrl_key, vkey_code); | 86 cntrl_key, vkey_code); |
| 85 } | 87 } |
| OLD | NEW |