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

Side by Side Diff: ui/base/accelerators/accelerator_history.h

Issue 727583002: Regression: Search+Key pops up app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/accelerators/accelerator_history.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_
6 #define UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "ui/base/accelerators/accelerator.h"
10 #include "ui/base/ui_base_export.h"
11 #include "ui/events/event.h"
12 #include "ui/events/event_handler.h"
13
14 namespace ui {
15
16 // Keeps track of the system-wide current and the most recent previous
17 // key accelerators.
18 class UI_BASE_EXPORT AcceleratorHistory {
19 public:
20 AcceleratorHistory();
21 ~AcceleratorHistory();
22
23 // Returns the most recent recorded accelerator.
24 const Accelerator& current_accelerator() const {
25 return current_accelerator_;
26 }
27
28 // Returns the most recent previously recorded accelerator that is different
29 // than the current.
30 const Accelerator& previous_accelerator() const {
31 return previous_accelerator_;
32 }
33
34 // Stores the given |accelerator| only if it's different than the currently
35 // stored one.
36 void StoreCurrentAccelerator(const Accelerator& accelerator);
37
38 private:
39 Accelerator current_accelerator_;
40 Accelerator previous_accelerator_;
41
42 DISALLOW_COPY_AND_ASSIGN(AcceleratorHistory);
43 };
44
45 }; // namespace ui
46
47 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_HISTORY_H_
OLDNEW
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/accelerators/accelerator_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698