Chromium Code Reviews| Index: chrome/browser/global_keyboard_shortcuts_views_mac.mm |
| diff --git a/chrome/browser/global_keyboard_shortcuts_views_mac.mm b/chrome/browser/global_keyboard_shortcuts_views_mac.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..35b62001f9fed62cffb7a12e5a8949f7440fc783 |
| --- /dev/null |
| +++ b/chrome/browser/global_keyboard_shortcuts_views_mac.mm |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/macros.h" |
| +#include "chrome/app/chrome_command_ids.h" |
| +#include "chrome/browser/global_keyboard_shortcuts_mac.h" |
| + |
| +// Lists shortcuts that are impossible to migrate to accelerator_table.cc |
| +// (crbug.com/25946). |
| + |
| +const KeyboardShortcutData* GetWindowKeyboardShortcutTable( |
|
Peter Kasting
2016/10/31 18:07:32
Nit: Out of scope for this CL, but consider modify
themblsha
2016/11/01 14:36:24
Not sure what you mean by C++11: move semantics? B
Peter Kasting
2016/11/01 18:20:58
I simply mean that the combination of things like
themblsha
2016/11/02 17:31:37
Will the std::vector just wrap the initializer lis
Peter Kasting
2016/11/02 17:51:28
I see. In that case you might indeed want to avoi
|
| + size_t* num_entries) { |
| + static const KeyboardShortcutData keyboard_shortcuts[] = { |
| + // cmd shift cntrl option |
| + // --- ----- ----- ------ |
| + // '{' / '}' characters should be matched earlier than virtual key code |
| + // (therefore we can match alt-8 as '{' on german keyboards). |
| + {true, false, false, false, 0, '}', IDC_SELECT_NEXT_TAB}, |
| + {true, false, false, false, 0, '{', IDC_SELECT_PREVIOUS_TAB}, |
| + }; |
| + |
| + *num_entries = arraysize(keyboard_shortcuts); |
| + |
| + return keyboard_shortcuts; |
| +} |
| + |
| +const KeyboardShortcutData* GetDelayedWindowKeyboardShortcutTable( |
| + size_t* num_entries) { |
| + static const KeyboardShortcutData keyboard_shortcuts[] = {}; |
| + *num_entries = 0; |
| + return keyboard_shortcuts; |
| +} |
| + |
| +const KeyboardShortcutData* GetBrowserKeyboardShortcutTable( |
| + size_t* num_entries) { |
| + static const KeyboardShortcutData keyboard_shortcuts[] = {}; |
| + *num_entries = 0; |
| + return keyboard_shortcuts; |
| +} |