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

Side by Side Diff: chrome/browser/ui/cocoa/accelerators_cocoa.mm

Issue 1543393002: Switch to standard integer types in chrome/browser/ui/cocoa/. (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/ui/cocoa/accelerators_cocoa.h" 5 #include "chrome/browser/ui/cocoa/accelerators_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <stddef.h>
8 9
9 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h"
10 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
11 #include "chrome/app/chrome_command_ids.h" 13 #include "chrome/app/chrome_command_ids.h"
12 #import "ui/base/accelerators/platform_accelerator_cocoa.h" 14 #import "ui/base/accelerators/platform_accelerator_cocoa.h"
13 #import "ui/events/cocoa/cocoa_event_utils.h" 15 #import "ui/events/cocoa/cocoa_event_utils.h"
14 #import "ui/events/keycodes/keyboard_code_conversion_mac.h" 16 #import "ui/events/keycodes/keyboard_code_conversion_mac.h"
15 17
16 namespace { 18 namespace {
17 19
18 // These accelerators are not associated with a command_id. 20 // These accelerators are not associated with a command_id.
19 const struct AcceleratorListing { 21 const struct AcceleratorListing {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 NSUInteger mask = platform_accelerator->modifier_mask(); 184 NSUInteger mask = platform_accelerator->modifier_mask();
183 BOOL maskEqual = 185 BOOL maskEqual =
184 (mask == modifiers) || ((mask & (~NSShiftKeyMask)) == modifiers); 186 (mask == modifiers) || ((mask & (~NSShiftKeyMask)) == modifiers);
185 NSString* string = [NSString stringWithFormat:@"%C", shifted_character]; 187 NSString* string = [NSString stringWithFormat:@"%C", shifted_character];
186 if ([string isEqual:key_equivalent] && maskEqual) 188 if ([string isEqual:key_equivalent] && maskEqual)
187 return &*it; 189 return &*it;
188 } 190 }
189 191
190 return NULL; 192 return NULL;
191 } 193 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/accelerators_cocoa.h ('k') | chrome/browser/ui/cocoa/app_menu/app_menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698