Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/accelerator_table.h" | 5 #include "chrome/browser/ui/views/accelerator_table.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "ui/base/accelerators/accelerator.h" | 9 #include "ui/base/accelerators/accelerator.h" |
| 10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 { ui::VKEY_F4, ui::EF_ALT_DOWN, IDC_CLOSE_WINDOW }, | 127 { ui::VKEY_F4, ui::EF_ALT_DOWN, IDC_CLOSE_WINDOW }, |
| 128 { ui::VKEY_F5, ui::EF_NONE, IDC_RELOAD }, | 128 { ui::VKEY_F5, ui::EF_NONE, IDC_RELOAD }, |
| 129 { ui::VKEY_F5, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, | 129 { ui::VKEY_F5, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, |
| 130 { ui::VKEY_F5, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, | 130 { ui::VKEY_F5, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, |
| 131 { ui::VKEY_F6, ui::EF_NONE, IDC_FOCUS_NEXT_PANE }, | 131 { ui::VKEY_F6, ui::EF_NONE, IDC_FOCUS_NEXT_PANE }, |
| 132 { ui::VKEY_F6, ui::EF_SHIFT_DOWN, IDC_FOCUS_PREVIOUS_PANE }, | 132 { ui::VKEY_F6, ui::EF_SHIFT_DOWN, IDC_FOCUS_PREVIOUS_PANE }, |
| 133 { ui::VKEY_F10, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, | 133 { ui::VKEY_F10, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, |
| 134 { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN }, | 134 { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN }, |
| 135 | 135 |
| 136 // Platform-specific key maps. | 136 // Platform-specific key maps. |
| 137 #if defined(OS_LINUX) | |
| 138 { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK }, | |
| 139 { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD }, | |
| 140 #endif // defined(OS_LINUX) | |
| 141 | |
| 137 #if defined(OS_CHROMEOS) | 142 #if defined(OS_CHROMEOS) |
| 138 // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash. | 143 // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash. |
| 139 { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK }, | |
| 140 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 144 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| 141 IDC_CLEAR_BROWSING_DATA }, | 145 IDC_CLEAR_BROWSING_DATA }, |
| 142 { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD }, | |
| 143 { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN, IDC_HELP_PAGE_VIA_KEYBOARD }, | 146 { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN, IDC_HELP_PAGE_VIA_KEYBOARD }, |
| 144 { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 147 { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| 145 IDC_HELP_PAGE_VIA_KEYBOARD }, | 148 IDC_HELP_PAGE_VIA_KEYBOARD }, |
| 146 { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME }, | 149 { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME }, |
|
sky
2014/01/29 16:45:39
Are any of these other ones useful on non-chromeos
| |
| 147 { ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD }, | 150 { ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD }, |
| 148 { ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, | 151 { ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, |
| 149 { ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, | 152 { ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, |
| 150 { ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_MANAGER }, | 153 { ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_MANAGER }, |
| 151 { ui::VKEY_BROWSER_STOP, ui::EF_NONE, IDC_STOP }, | 154 { ui::VKEY_BROWSER_STOP, ui::EF_NONE, IDC_STOP }, |
| 152 // Not implemented inside Ash to allow web pages to capture the key. | 155 // Not implemented inside Ash to allow web pages to capture the key. |
| 153 { ui::VKEY_M, ui::EF_CONTROL_DOWN, IDC_MINIMIZE_WINDOW }, | 156 { ui::VKEY_M, ui::EF_CONTROL_DOWN, IDC_MINIMIZE_WINDOW }, |
| 154 #else // OS_CHROMEOS | 157 #else // OS_CHROMEOS |
| 155 { ui::VKEY_DELETE, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 158 { ui::VKEY_DELETE, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| 156 IDC_CLEAR_BROWSING_DATA }, | 159 IDC_CLEAR_BROWSING_DATA }, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); | 250 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); |
| 248 return true; | 251 return true; |
| 249 case IDC_PASTE: | 252 case IDC_PASTE: |
| 250 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); | 253 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); |
| 251 return true; | 254 return true; |
| 252 } | 255 } |
| 253 return false; | 256 return false; |
| 254 } | 257 } |
| 255 | 258 |
| 256 } // namespace chrome | 259 } // namespace chrome |
| OLD | NEW |