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

Unified Diff: ui/base/accelerators/accelerator_history.cc

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 side-by-side diff with in-line comments
Download patch
Index: ui/base/accelerators/accelerator_history.cc
diff --git a/ui/base/accelerators/accelerator_history.cc b/ui/base/accelerators/accelerator_history.cc
new file mode 100644
index 0000000000000000000000000000000000000000..65ae0d12a8ed162e94628d7eb170ee034c72bd85
--- /dev/null
+++ b/ui/base/accelerators/accelerator_history.cc
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/base/accelerators/accelerator_history.h"
+#include "ui/events/event_constants.h"
+
+namespace ui {
+
+// ----------------------------------------------------------------------
+// Public Methods
+// ----------------------------------------------------------------------
+
+AcceleratorHistory::AcceleratorHistory()
+ : current_accelerator_(),
+ previous_accelerator_() {
+}
+
+AcceleratorHistory::~AcceleratorHistory() {
+}
+
+const Accelerator& AcceleratorHistory::GetCurrentAccelerator() const {
+ return current_accelerator_;
+}
+
+const Accelerator& AcceleratorHistory::GetPreviousAccelerator() const {
+ return previous_accelerator_;
+}
+
+void AcceleratorHistory::StoreCurrentAccelerator(
+ const Accelerator& accelerator) {
+ if (accelerator != current_accelerator_) {
+ previous_accelerator_ = current_accelerator_;
+ current_accelerator_ = accelerator;
+ }
+}
+
+}; // namespace ui
+
+

Powered by Google App Engine
This is Rietveld 408576698