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

Unified Diff: ui/views/focus/focus_manager.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 | « ui/views/controls/tabbed_pane/tabbed_pane.cc ('k') | ui/views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/focus/focus_manager.cc
diff --git a/ui/views/focus/focus_manager.cc b/ui/views/focus/focus_manager.cc
index 3c2c8d7ebd6137bac7110795b25803bf68c5100f..6aa2cc40e691e0c91dc2c74b422b3b238b9f9113 100644
--- a/ui/views/focus/focus_manager.cc
+++ b/ui/views/focus/focus_manager.cc
@@ -66,7 +66,7 @@ bool FocusManager::OnKeyEvent(const KeyEvent& event) {
(event.flags() & ~ui::EF_ALT_DOWN) == 0) {
// Trigger VKEY_MENU when only this key is pressed and released, and both
// press and release events are not handled by others.
- ui::Accelerator accelerator(ui::VKEY_MENU, ui::EF_NONE);
+ ui::Accelerator accelerator(ui::VKEY_MENU, ui::EF_NONE, ui::ET_KEY_PRESSED);
return ProcessAccelerator(accelerator);
} else if (event.type() != ui::ET_KEY_RELEASED) {
return false;
@@ -83,8 +83,7 @@ bool FocusManager::OnKeyEvent(const KeyEvent& event) {
modifiers |= ui::EF_CONTROL_DOWN;
if (event.IsAltDown())
modifiers |= ui::EF_ALT_DOWN;
- ui::Accelerator accelerator(event.key_code(), modifiers);
- accelerator.set_type(event.type());
+ ui::Accelerator accelerator(event.key_code(), modifiers, event.type());
if (event.type() == ui::ET_KEY_PRESSED) {
#if defined(OS_WIN)
« no previous file with comments | « ui/views/controls/tabbed_pane/tabbed_pane.cc ('k') | ui/views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698