| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 12 #include "printing/features/features.h" |
| 12 #include "ui/base/accelerators/accelerator.h" | 13 #include "ui/base/accelerators/accelerator.h" |
| 13 #include "ui/events/event_constants.h" | 14 #include "ui/events/event_constants.h" |
| 14 | 15 |
| 15 #if defined(USE_ASH) | 16 #if defined(USE_ASH) |
| 16 #include "ash/common/accelerators/accelerator_table.h" // nogncheck | 17 #include "ash/common/accelerators/accelerator_table.h" // nogncheck |
| 17 #endif | 18 #endif |
| 18 | 19 |
| 19 namespace chrome { | 20 namespace chrome { |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 { ui::VKEY_RIGHT, ui::EF_ALT_DOWN, IDC_FORWARD }, | 55 { ui::VKEY_RIGHT, ui::EF_ALT_DOWN, IDC_FORWARD }, |
| 55 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN, IDC_BACKSPACE_FORWARD }, | 56 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN, IDC_BACKSPACE_FORWARD }, |
| 56 { ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_DEV_TOOLS }, | 57 { ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_DEV_TOOLS }, |
| 57 { ui::VKEY_F12, ui::EF_NONE, IDC_DEV_TOOLS_TOGGLE }, | 58 { ui::VKEY_F12, ui::EF_NONE, IDC_DEV_TOOLS_TOGGLE }, |
| 58 { ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 59 { ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| 59 IDC_DEV_TOOLS_CONSOLE }, | 60 IDC_DEV_TOOLS_CONSOLE }, |
| 60 { ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 61 { ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| 61 IDC_DEV_TOOLS_INSPECT }, | 62 IDC_DEV_TOOLS_INSPECT }, |
| 62 { ui::VKEY_O, ui::EF_CONTROL_DOWN, IDC_OPEN_FILE }, | 63 { ui::VKEY_O, ui::EF_CONTROL_DOWN, IDC_OPEN_FILE }, |
| 63 { ui::VKEY_P, ui::EF_CONTROL_DOWN, IDC_PRINT}, | 64 { ui::VKEY_P, ui::EF_CONTROL_DOWN, IDC_PRINT}, |
| 64 #if defined(ENABLE_BASIC_PRINTING) | 65 #if BUILDFLAG(ENABLE_BASIC_PRINTING) |
| 65 { ui::VKEY_P, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_BASIC_PRINT}, | 66 { ui::VKEY_P, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_BASIC_PRINT}, |
| 66 #endif // ENABLE_BASIC_PRINTING | 67 #endif // ENABLE_BASIC_PRINTING |
| 67 { ui::VKEY_R, ui::EF_CONTROL_DOWN, IDC_RELOAD }, | 68 { ui::VKEY_R, ui::EF_CONTROL_DOWN, IDC_RELOAD }, |
| 68 { ui::VKEY_R, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, | 69 { ui::VKEY_R, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, |
| 69 IDC_RELOAD_BYPASSING_CACHE }, | 70 IDC_RELOAD_BYPASSING_CACHE }, |
| 70 { ui::VKEY_HOME, ui::EF_ALT_DOWN, IDC_HOME }, | 71 { ui::VKEY_HOME, ui::EF_ALT_DOWN, IDC_HOME }, |
| 71 { ui::VKEY_S, ui::EF_CONTROL_DOWN, IDC_SAVE_PAGE }, | 72 { ui::VKEY_S, ui::EF_CONTROL_DOWN, IDC_SAVE_PAGE }, |
| 72 { ui::VKEY_9, kPlatformModifier, IDC_SELECT_LAST_TAB }, | 73 { ui::VKEY_9, kPlatformModifier, IDC_SELECT_LAST_TAB }, |
| 73 { ui::VKEY_NUMPAD9, kPlatformModifier, IDC_SELECT_LAST_TAB }, | 74 { ui::VKEY_NUMPAD9, kPlatformModifier, IDC_SELECT_LAST_TAB }, |
| 74 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 75 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 283 |
| 283 bool IsCommandRepeatable(int command_id) { | 284 bool IsCommandRepeatable(int command_id) { |
| 284 for (size_t i = 0; i < kRepeatableCommandIdsLength; ++i) { | 285 for (size_t i = 0; i < kRepeatableCommandIdsLength; ++i) { |
| 285 if (kRepeatableCommandIds[i] == command_id) | 286 if (kRepeatableCommandIds[i] == command_id) |
| 286 return true; | 287 return true; |
| 287 } | 288 } |
| 288 return false; | 289 return false; |
| 289 } | 290 } |
| 290 | 291 |
| 291 } // namespace chrome | 292 } // namespace chrome |
| OLD | NEW |