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

Side by Side Diff: chrome/browser/global_keyboard_shortcuts_cocoa_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: GetWindowKeyboardShortcutTable is now shared between Cocoa and MacViews. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/macros.h"
6 #include "chrome/app/chrome_command_ids.h"
7 #include "chrome/browser/global_keyboard_shortcuts_mac.h"
8
9 // Basically, there are two kinds of keyboard shortcuts: Ones that should work
10 // only if the tab contents is focused (BrowserKeyboardShortcut), and ones that
11 // should work in all other cases (WindowKeyboardShortcut). In the latter case,
12 // we differentiate between shortcuts that are checked before any other view
13 // gets the chance to handle them (WindowKeyboardShortcut) or after all views
14 // had a chance but did not handle the keypress event
15 // (DelayedWindowKeyboardShortcut).
16
17 const std::vector<KeyboardShortcutData>&
18 GetDelayedWindowKeyboardShortcutTable() {
19 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({
20 //cmd shift cntrl option
21 //--- ----- ----- ------
22 {false, false, false, false, kVK_Escape, 0, IDC_STOP},
23 }));
24 return result;
25 }
26
27 const std::vector<KeyboardShortcutData>& GetBrowserKeyboardShortcutTable() {
28 CR_DEFINE_STATIC_LOCAL(std::vector<KeyboardShortcutData>, result, ({
29 //cmd shift cntrl option
30 //--- ----- ----- ------
31 {true, false, false, false, kVK_LeftArrow, 0, IDC_BACK},
32 {true, false, false, false, kVK_RightArrow, 0, IDC_FORWARD},
33 {false, false, false, false, kVK_Delete, 0, IDC_BACKSPACE_BACK},
34 {false, true, false, false, kVK_Delete, 0, IDC_BACKSPACE_FORWARD},
35 {true, true, false, false, 0, 'c', IDC_DEV_TOOLS_INSPECT},
36 }));
37 return result;
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698