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

Unified Diff: trunk/src/ash/accelerators/accelerator_dispatcher.cc

Issue 167273003: Revert 251382 "event-rewrite: Clean up how events are rewritten." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 | « no previous file | trunk/src/ash/ash.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/accelerators/accelerator_dispatcher.cc
===================================================================
--- trunk/src/ash/accelerators/accelerator_dispatcher.cc (revision 251431)
+++ trunk/src/ash/accelerators/accelerator_dispatcher.cc (working copy)
@@ -15,6 +15,7 @@
#include "ash/accelerators/accelerator_controller.h"
#include "ash/shell.h"
+#include "ash/wm/event_rewriter_event_filter.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/base/accelerators/accelerator.h"
@@ -92,7 +93,16 @@
return POST_DISPATCH_PERFORM_DEFAULT;
if (IsKeyEvent(event)) {
+ // Modifiers can be changed by the user preference, so we need to rewrite
+ // the event explicitly.
ui::KeyEvent key_event(event, false);
+ ui::EventHandler* event_rewriter =
+ ash::Shell::GetInstance()->event_rewriter_filter();
+ DCHECK(event_rewriter);
+ event_rewriter->OnKeyEvent(&key_event);
+ if (key_event.stopped_propagation())
+ return POST_DISPATCH_NONE;
+
if (IsPossibleAcceleratorNotForMenu(key_event)) {
if (views::MenuController* menu_controller =
views::MenuController::GetActiveInstance()) {
« no previous file with comments | « no previous file | trunk/src/ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698