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

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

Issue 4710001: Split out command IDs from chrome_dll_resource.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/accelerators_cocoa.h" 5 #include "chrome/browser/cocoa/accelerators_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_command_ids.h"
10 10
11 namespace { 11 namespace {
12 12
13 const struct AcceleratorMapping { 13 const struct AcceleratorMapping {
14 int command_id; 14 int command_id;
15 NSString* key; 15 NSString* key;
16 NSUInteger modifiers; 16 NSUInteger modifiers;
17 } kAcceleratorMap[] = { 17 } kAcceleratorMap[] = {
18 { IDC_CLEAR_BROWSING_DATA, @"\x8", NSCommandKeyMask | NSShiftKeyMask }, 18 { IDC_CLEAR_BROWSING_DATA, @"\x8", NSCommandKeyMask | NSShiftKeyMask },
19 { IDC_COPY, @"c", NSCommandKeyMask }, 19 { IDC_COPY, @"c", NSCommandKeyMask },
(...skipping 28 matching lines...) Expand all
48 } 48 }
49 } 49 }
50 50
51 const menus::AcceleratorCocoa* AcceleratorsCocoa::GetAcceleratorForCommand( 51 const menus::AcceleratorCocoa* AcceleratorsCocoa::GetAcceleratorForCommand(
52 int command_id) { 52 int command_id) {
53 AcceleratorCocoaMap::iterator it = accelerators_.find(command_id); 53 AcceleratorCocoaMap::iterator it = accelerators_.find(command_id);
54 if (it == accelerators_.end()) 54 if (it == accelerators_.end())
55 return NULL; 55 return NULL;
56 return &it->second; 56 return &it->second;
57 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698