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

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

Issue 2800019: [Mac] Give the Wrench menu keyboard shortcuts. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Split out keymap into new file Created 10 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COCOA_ACCELERATORS_COCOA_H_
6 #define CHROME_BROWSER_COCOA_ACCELERATORS_COCOA_H_
7
8 #include <map>
9
10 #include "app/menus/accelerator_cocoa.h"
11
12 // This class maintains a map of command_ids to AcceleratorCocoa objects (see
13 // chrome/app/chrome_dll_resource.h). Currently, this only lists the commands
14 // that are used in the Wrench menu.
15 //
16 // It is recommended that this class be used as a singleton so that the key map
17 // isn't created multiple places.
18 //
19 // #import "base/singleton.h"
20 // ...
21 // AcceleratorsCocoa* keymap = Singleton<AcceleratorsCocoa>::get();
22 // return keymap->GetAcceleratorForCommand(IDC_COPY);
23 //
24 class AcceleratorsCocoa {
25 public:
26 AcceleratorsCocoa();
27 ~AcceleratorsCocoa() {}
28
29 typedef std::map<int, menus::AcceleratorCocoa> AcceleratorCocoaMap;
30
31 // Returns NULL if there is no accelerator for the command.
32 const menus::AcceleratorCocoa* GetAcceleratorForCommand(int command_id);
33
34 private:
35 AcceleratorCocoaMap accelerators_;
pink (ping after 24hrs) 2010/06/21 19:21:56 DISALLOW_COPY_AND_ASSIGN(AcceleratorsCocoa)?
36 };
37
38 #endif // CHROME_BROWSER_COCOA_ACCELERATORS_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698