Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Unified Diff: chrome/browser/global_keyboard_shortcuts_views_mac.mm

Issue 2074643003: MacViews: Views accelerators table should match the Cocoa one. (Closed) Base URL: ssh://bitbucket.browser.yandex-team.ru/chromium/src.git@master
Patch Set: Split global_keyboard_shortcuts_mac.mm into two platform-specific ones, simplified code. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..38a6b0f0847239fa21e17e454720befa028beef2
--- /dev/null
+++ b/chrome/browser/global_keyboard_shortcuts_views_mac.mm
@@ -0,0 +1,41 @@
+// 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 "chrome/browser/global_keyboard_shortcuts_mac.h"
+
+#include "base/macros.h"
+#include "chrome/app/chrome_command_ids.h"
+
+// Lists shortcuts that are impossible to migrate to accelerator_table.cc
+// (crbug.com/25946).
+
+const KeyboardShortcutData* GetWindowKeyboardShortcutTable(
+ 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;
+}

Powered by Google App Engine
This is Rietveld 408576698