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

Side by Side Diff: chrome/browser/global_keyboard_shortcuts_mac.mm

Issue 1250533003: [Mac] Remove BrowserCommandExecutor protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/global_keyboard_shortcuts_mac.h"
6
5 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
6 #include <Carbon/Carbon.h>
7
8 #include "chrome/browser/global_keyboard_shortcuts_mac.h"
9 8
10 #include "base/basictypes.h" 9 #include "base/basictypes.h"
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
13 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h" 12 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h"
14 13
15 namespace { 14 namespace {
16 15
17 // Returns the menu item associated with |key| in |menu|, or nil if not found. 16 // Returns the menu item associated with |key| in |menu|, or nil if not found.
18 NSMenuItem* FindMenuItem(NSEvent* key, NSMenu* menu) { 17 NSMenuItem* FindMenuItem(NSEvent* key, NSMenu* menu) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 292 }
294 } 293 }
295 294
296 // opt/alt modifier is set (e.g. on german layout we want '{' for opt-8). 295 // opt/alt modifier is set (e.g. on german layout we want '{' for opt-8).
297 if ([event modifierFlags] & NSAlternateKeyMask) 296 if ([event modifierFlags] & NSAlternateKeyMask)
298 return rawChar; 297 return rawChar;
299 } 298 }
300 299
301 return noModifiersChar; 300 return noModifiersChar;
302 } 301 }
OLDNEW
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.h ('k') | chrome/browser/global_keyboard_shortcuts_mac_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698