| 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}, | |
| 45 }; | 43 }; |
| 46 | 44 |
| 47 *num_entries = arraysize(keyboard_shortcuts); | 45 *num_entries = arraysize(keyboard_shortcuts); |
| 48 | 46 |
| 49 return keyboard_shortcuts; | 47 return keyboard_shortcuts; |
| 50 } | 48 } |
| 51 | 49 |
| 52 static int CommandForKeyboardShortcut( | 50 static int CommandForKeyboardShortcut( |
| 53 const KeyboardShortcutData* (*get_keyboard_shortcut_table)(size_t*), | 51 const KeyboardShortcutData* (*get_keyboard_shortcut_table)(size_t*), |
| 54 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { | 52 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 78 command_key, shift_key, | 76 command_key, shift_key, |
| 79 cntrl_key, vkey_code); | 77 cntrl_key, vkey_code); |
| 80 } | 78 } |
| 81 | 79 |
| 82 int CommandForBrowserKeyboardShortcut( | 80 int CommandForBrowserKeyboardShortcut( |
| 83 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { | 81 bool command_key, bool shift_key, bool cntrl_key, int vkey_code) { |
| 84 return CommandForKeyboardShortcut(GetBrowserKeyboardShortcutTable, | 82 return CommandForKeyboardShortcut(GetBrowserKeyboardShortcutTable, |
| 85 command_key, shift_key, | 83 command_key, shift_key, |
| 86 cntrl_key, vkey_code); | 84 cntrl_key, vkey_code); |
| 87 } | 85 } |
| OLD | NEW |