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

Unified Diff: ash/accelerators/accelerator_dispatcher.cc

Issue 10446010: wip: Add ui::EventType parameter. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wip - views_unittests Created 8 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 | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/accelerators/accelerator_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_dispatcher.cc
diff --git a/ash/accelerators/accelerator_dispatcher.cc b/ash/accelerators/accelerator_dispatcher.cc
index cc531ef4b0aef71acab239ce007c5982dada633f..38d186fc60a8e2a72d18074955a24a1966d4f008 100644
--- a/ash/accelerators/accelerator_dispatcher.cc
+++ b/ash/accelerators/accelerator_dispatcher.cc
@@ -75,10 +75,10 @@ bool AcceleratorDispatcher::Dispatch(const base::NativeEvent& event) {
ash::AcceleratorController* accelerator_controller =
ash::Shell::GetInstance()->accelerator_controller();
if (accelerator_controller) {
- ui::Accelerator accelerator(ui::KeyboardCodeFromNative(event),
- ui::EventFlagsFromNative(event) & kModifierMask);
- if (IsKeyRelease(event))
- accelerator.set_type(ui::ET_KEY_RELEASED);
+ ui::Accelerator accelerator(
+ ui::KeyboardCodeFromNative(event),
+ ui::EventFlagsFromNative(event) & kModifierMask,
+ IsKeyRelease(event) ? ui::ET_KEY_RELEASED : ui::ET_KEY_PRESSED);
if (accelerator_controller->Process(accelerator))
return true;
}
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/accelerators/accelerator_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698