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

Unified Diff: ash/accelerators/nested_accelerator_delegate.cc

Issue 308023002: Add EF_IS_REPEAT flag to KeyEvent to handle repeated accelerators correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
Index: ash/accelerators/nested_accelerator_delegate.cc
diff --git a/ash/accelerators/nested_accelerator_delegate.cc b/ash/accelerators/nested_accelerator_delegate.cc
index f83e1ebe083947ae43a93d6b6a7cef353527f3b2..0129e7a268baae342a1747b26601b4b5c04acaa0 100644
--- a/ash/accelerators/nested_accelerator_delegate.cc
+++ b/ash/accelerators/nested_accelerator_delegate.cc
@@ -63,12 +63,9 @@ bool NestedAcceleratorDelegate::ProcessEvent(const ui::KeyEvent& key_event) {
(ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN);
ui::Accelerator accelerator(key_event.key_code(),
key_event.flags() & kModifierMask);
+ accelerator.set_is_repeat(key_event.IsRepeat());
if (key_event.type() == ui::ET_KEY_RELEASED)
accelerator.set_type(ui::ET_KEY_RELEASED);
- // Fill out context object so AcceleratorController will know what
- // was the previous accelerator or if the current accelerator is repeated.
- Shell::GetInstance()->accelerator_controller()->context()->UpdateContext(
- accelerator);
return accelerator_controller->Process(accelerator);
}

Powered by Google App Engine
This is Rietveld 408576698