OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "chrome/app/chrome_command_ids.h" | 6 #include "chrome/app/chrome_command_ids.h" |
7 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 7 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
8 | 8 |
9 // Lists shortcuts that are impossible to migrate to accelerator_table.cc | 9 // Lists shortcuts that are impossible to migrate to accelerator_table.cc |
10 // (crbug.com/25946). | 10 // (crbug.com/25946). |
11 | 11 |
12 const std::vector<KeyboardShortcutData>& GetWindowKeyboardShortcutTable() { | 12 const std::vector<KeyboardShortcutData>& GetWindowKeyboardShortcutTable() { |
| 13 // clang-format off |
13 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({ | 14 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({ |
14 // cmd shift cntrl option | 15 //cmd shift cntrl option vkeycode char command |
15 // --- ----- ----- ------ | 16 //--- ----- ----- ------ -------- ---- ------- |
16 // '{' / '}' characters should be matched earlier than virtual key code | 17 // '{' / '}' characters should be matched earlier than virtual key codes |
17 // (therefore we can match alt-8 as '{' on german keyboards). | 18 // (so we can match alt-8 as '{' on German keyboards). |
18 {true, false, false, false, 0, '}', IDC_SELECT_NEXT_TAB}, | 19 {true, false, false, false, 0, '}', IDC_SELECT_NEXT_TAB}, |
19 {true, false, false, false, 0, '{', IDC_SELECT_PREVIOUS_TAB}, | 20 {true, false, false, false, 0, '{', IDC_SELECT_PREVIOUS_TAB}, |
20 })); | 21 })); |
| 22 // clang-format on |
21 return result; | 23 return result; |
22 } | 24 } |
23 | 25 |
24 const std::vector<KeyboardShortcutData>& | 26 const std::vector<KeyboardShortcutData>& |
25 GetDelayedWindowKeyboardShortcutTable() { | 27 GetDelayedWindowKeyboardShortcutTable() { |
26 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({})); | 28 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({})); |
27 return result; | 29 return result; |
28 } | 30 } |
29 | 31 |
30 const std::vector<KeyboardShortcutData>& GetBrowserKeyboardShortcutTable() { | 32 const std::vector<KeyboardShortcutData>& GetBrowserKeyboardShortcutTable() { |
31 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({})); | 33 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({})); |
32 return result; | 34 return result; |
33 } | 35 } |
OLD | NEW |