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

Side by Side Diff: chrome/browser/ui/gtk/accelerators_gtk.h

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_GTK_ACCELERATORS_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_ACCELERATORS_GTK_H_
7
8 #include <vector>
9
10 #include "base/containers/hash_tables.h"
11 #include "ui/base/accelerators/accelerator.h"
12
13 template <typename T> struct DefaultSingletonTraits;
14
15 class AcceleratorsGtk {
16 public:
17 typedef std::vector<std::pair<int, ui::Accelerator> > AcceleratorList;
18 typedef AcceleratorList::const_iterator const_iterator;
19
20 // Returns the singleton instance.
21 static AcceleratorsGtk* GetInstance();
22
23 const_iterator const begin() { return all_accelerators_.begin(); }
24 const_iterator const end() { return all_accelerators_.end(); }
25
26 // Returns NULL if there is no accelerator for the command.
27 const ui::Accelerator* GetPrimaryAcceleratorForCommand(int command_id);
28
29 private:
30 friend struct DefaultSingletonTraits<AcceleratorsGtk>;
31
32 AcceleratorsGtk();
33 ~AcceleratorsGtk();
34
35 typedef base::hash_map<int, ui::Accelerator> AcceleratorMap;
36 AcceleratorMap primary_accelerators_;
37
38 AcceleratorList all_accelerators_;
39 };
40
41 #endif // CHROME_BROWSER_UI_GTK_ACCELERATORS_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698