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

Unified Diff: ui/wm/core/accelerator_filter.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
« no previous file with comments | « ui/wm/core/accelerator_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/accelerator_filter.cc
diff --git a/ui/wm/core/accelerator_filter.cc b/ui/wm/core/accelerator_filter.cc
index 51c6106d91e3b6a0745bb8ba11445874505406ab..12e91316d21ce81ce0c8906c851bf13f24cedf83 100644
--- a/ui/wm/core/accelerator_filter.cc
+++ b/ui/wm/core/accelerator_filter.cc
@@ -5,6 +5,7 @@
#include "ui/wm/core/accelerator_filter.h"
#include "ui/base/accelerators/accelerator.h"
+#include "ui/base/accelerators/accelerator_history.h"
#include "ui/events/event.h"
#include "ui/wm/core/accelerator_delegate.h"
@@ -37,8 +38,12 @@ bool IsSystemKey(ui::KeyboardCode key_code) {
////////////////////////////////////////////////////////////////////////////////
// AcceleratorFilter, public:
-AcceleratorFilter::AcceleratorFilter(scoped_ptr<AcceleratorDelegate> delegate)
- : delegate_(delegate.Pass()) {
+AcceleratorFilter::AcceleratorFilter(
+ scoped_ptr<AcceleratorDelegate> delegate,
+ ui::AcceleratorHistory* accelerator_history)
+ : delegate_(delegate.Pass()),
+ accelerator_history_(accelerator_history) {
+ DCHECK(accelerator_history);
}
AcceleratorFilter::~AcceleratorFilter() {
@@ -56,6 +61,7 @@ void AcceleratorFilter::OnKeyEvent(ui::KeyEvent* event) {
}
ui::Accelerator accelerator = CreateAcceleratorFromKeyEvent(*event);
+ accelerator_history_->StoreCurrentAccelerator(accelerator);
AcceleratorDelegate::KeyType key_type =
IsSystemKey(event->key_code()) ? AcceleratorDelegate::KEY_TYPE_SYSTEM
« no previous file with comments | « ui/wm/core/accelerator_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698