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

Unified Diff: ui/wm/core/nested_accelerator_controller_unittest.cc

Issue 312483002: More accelerator code leanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/wm/core/accelerator_filter.cc ('k') | ui/wm/core/nested_accelerator_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/nested_accelerator_controller_unittest.cc
diff --git a/ui/wm/core/nested_accelerator_controller_unittest.cc b/ui/wm/core/nested_accelerator_controller_unittest.cc
index fae9f8e41af5c644c1f24902dac2730ead4bf3df..9fa394ef5f6efc36ac4c259592b36be7e2202286 100644
--- a/ui/wm/core/nested_accelerator_controller_unittest.cc
+++ b/ui/wm/core/nested_accelerator_controller_unittest.cc
@@ -104,17 +104,10 @@ class MockNestedAcceleratorDelegate : public NestedAcceleratorDelegate {
virtual ~MockNestedAcceleratorDelegate() {}
// NestedAcceleratorDelegate:
- virtual bool ShouldProcessEventNow(const ui::KeyEvent& key_event) OVERRIDE {
- return true;
- }
- virtual bool ProcessEvent(const ui::KeyEvent& key_event) OVERRIDE {
- const int kModifierMask =
- (ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN);
- ui::Accelerator accelerator(key_event.key_code(),
- key_event.flags() & kModifierMask);
- if (key_event.type() == ui::ET_KEY_RELEASED)
- accelerator.set_type(ui::ET_KEY_RELEASED);
- return accelerator_manager_->Process(accelerator);
+ virtual Result ProcessAccelerator(
+ const ui::Accelerator& accelerator) OVERRIDE {
+ return accelerator_manager_->Process(accelerator) ?
+ RESULT_PROCESSED : RESULT_NOT_PROCESSED;
}
void Register(const ui::Accelerator& accelerator,
« no previous file with comments | « ui/wm/core/accelerator_filter.cc ('k') | ui/wm/core/nested_accelerator_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698