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

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

Issue 10381145: WIP: Always update ui::AcceleratorManager Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/accelerators/accelerator_manager.h ('k') | ui/views/focus/focus_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/accelerators/accelerator_manager.cc
diff --git a/ui/base/accelerators/accelerator_manager.cc b/ui/base/accelerators/accelerator_manager.cc
index 4ab14b5fc15595789979a48f78fc7581dbd2563b..655ac3903ab8032cb36c225f80cf2e5870f7ed3a 100644
--- a/ui/base/accelerators/accelerator_manager.cc
+++ b/ui/base/accelerators/accelerator_manager.cc
@@ -10,7 +10,7 @@
namespace ui {
-AcceleratorManager::AcceleratorManager() : last_event_type_(ET_KEY_PRESSED) {
+AcceleratorManager::AcceleratorManager() {
}
AcceleratorManager::~AcceleratorManager() {
@@ -91,7 +91,7 @@ bool AcceleratorManager::Process(const Accelerator& accelerator) {
}
}
}
- last_event_type_ = accelerator.type();
+ set_last_event(accelerator);
return result;
}
@@ -125,7 +125,7 @@ bool AcceleratorManager::ShouldHandle(const Accelerator& accelerator) const {
// This check is necessary e.g. not to process the Shift+Alt+ET_KEY_RELEASED
// Accelerator for Chrome OS (see ash/accelerators/accelerator_controller.cc)
// when Shift+Alt+Tab is pressed and then Tab is released.
- return last_event_type_ == ET_KEY_PRESSED;
+ return last_event_.type() == ET_KEY_PRESSED;
}
} // namespace ui
« no previous file with comments | « ui/base/accelerators/accelerator_manager.h ('k') | ui/views/focus/focus_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698