| 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/events.h" | 9 #include "ui/base/events.h" |
| 10 #include "ui/base/keycodes/keyboard_codes.h" | |
| 11 | 10 |
| 12 namespace browser { | 11 namespace chrome { |
| 13 | 12 |
| 14 // NOTE: Keep this list in the same (mostly-alphabetical) order as | 13 // NOTE: Keep this list in the same (mostly-alphabetical) order as |
| 15 // the Windows accelerators in ../../app/chrome_dll.rc. | 14 // the Windows accelerators in ../../app/chrome_dll.rc. |
| 16 // Do not use Ctrl-Alt as a shortcut modifier, as it is used by i18n keyboards: | 15 // Do not use Ctrl-Alt as a shortcut modifier, as it is used by i18n keyboards: |
| 17 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx | 16 // http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx |
| 18 const AcceleratorMapping kAcceleratorMap[] = { | 17 const AcceleratorMapping kAcceleratorMap[] = { |
| 19 { ui::VKEY_LEFT, ui::EF_ALT_DOWN, IDC_BACK }, | 18 { ui::VKEY_LEFT, ui::EF_ALT_DOWN, IDC_BACK }, |
| 20 { ui::VKEY_BACK, ui::EF_NONE, IDC_BACK }, | 19 { ui::VKEY_BACK, ui::EF_NONE, IDC_BACK }, |
| 21 { ui::VKEY_D, ui::EF_CONTROL_DOWN, IDC_BOOKMARK_PAGE }, | 20 { ui::VKEY_D, ui::EF_CONTROL_DOWN, IDC_BOOKMARK_PAGE }, |
| 22 { ui::VKEY_D, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 21 { ui::VKEY_D, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 { ui::VKEY_T, ui::EF_CONTROL_DOWN, IDC_NEW_TAB }, | 142 { ui::VKEY_T, ui::EF_CONTROL_DOWN, IDC_NEW_TAB }, |
| 144 { ui::VKEY_N, ui::EF_CONTROL_DOWN, IDC_NEW_WINDOW }, | 143 { ui::VKEY_N, ui::EF_CONTROL_DOWN, IDC_NEW_WINDOW }, |
| 145 { ui::VKEY_O, ui::EF_CONTROL_DOWN, IDC_OPEN_FILE }, | 144 { ui::VKEY_O, ui::EF_CONTROL_DOWN, IDC_OPEN_FILE }, |
| 146 { ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_RESTORE_TAB }, | 145 { ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_RESTORE_TAB }, |
| 147 { ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, IDC_TASK_MANAGER }, | 146 { ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, IDC_TASK_MANAGER }, |
| 148 #endif | 147 #endif |
| 149 }; | 148 }; |
| 150 | 149 |
| 151 const size_t kAcceleratorMapLength = arraysize(kAcceleratorMap); | 150 const size_t kAcceleratorMapLength = arraysize(kAcceleratorMap); |
| 152 | 151 |
| 153 } // namespace browser | 152 } // namespace chrome |
| OLD | NEW |