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 "ui/base/accelerators/accelerator.h" | 12 #include "ui/base/accelerators/accelerator.h" |
13 #include "ui/events/event_constants.h" | 13 #include "ui/events/event_constants.h" |
14 | 14 |
15 #if defined(USE_ASH) | 15 #if defined(USE_ASH) |
16 #include "ash/accelerators/accelerator_table.h" | 16 #include "ash/common/accelerators/accelerator_table.h" |
17 #endif | 17 #endif |
18 | 18 |
19 namespace chrome { | 19 namespace chrome { |
20 namespace { | 20 namespace { |
21 | 21 |
22 // For many commands, the Mac equivalent uses Cmd instead of Ctrl. We only need | 22 // For many commands, the Mac equivalent uses Cmd instead of Ctrl. We only need |
23 // to list the ones that do not have a key equivalent in the main menu, i.e. | 23 // to list the ones that do not have a key equivalent in the main menu, i.e. |
24 // only the ones in global_keyboard_shortcuts_mac.mm. | 24 // only the ones in global_keyboard_shortcuts_mac.mm. |
25 // TODO(jackhou): If-def out the accelerators that should not be on Mac. | 25 // TODO(jackhou): If-def out the accelerators that should not be on Mac. |
26 #if defined(OS_MACOSX) | 26 #if defined(OS_MACOSX) |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); | 262 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); |
263 return true; | 263 return true; |
264 case IDC_PASTE: | 264 case IDC_PASTE: |
265 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); | 265 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); |
266 return true; | 266 return true; |
267 } | 267 } |
268 return false; | 268 return false; |
269 } | 269 } |
270 | 270 |
271 } // namespace chrome | 271 } // namespace chrome |
OLD | NEW |