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

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

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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" 5 #include "chrome/browser/global_keyboard_shortcuts_mac.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include "base/basictypes.h"
10 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h" 12 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h"
13 13
14 namespace { 14 namespace {
15 15
16 // 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.
17 NSMenuItem* FindMenuItem(NSEvent* key, NSMenu* menu) { 17 NSMenuItem* FindMenuItem(NSEvent* key, NSMenu* menu) {
18 NSMenuItem* result = nil; 18 NSMenuItem* result = nil;
19 19
20 for (NSMenuItem* item in [menu itemArray]) { 20 for (NSMenuItem* item in [menu itemArray]) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 } 291 }
292 292
293 // opt/alt modifier is set (e.g. on german layout we want '{' for opt-8). 293 // opt/alt modifier is set (e.g. on german layout we want '{' for opt-8).
294 if ([event modifierFlags] & NSAlternateKeyMask) 294 if ([event modifierFlags] & NSAlternateKeyMask)
295 return rawChar; 295 return rawChar;
296 } 296 }
297 297
298 return noModifiersChar; 298 return noModifiersChar;
299 } 299 }
OLDNEW
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.h ('k') | chrome/browser/global_keyboard_shortcuts_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698