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

Unified Diff: ash/wm/key_rewriter_event_filter.cc

Issue 10756003: Apply Ash's key rewriter to an aura::MouseEvent so that Modifler+Click is handled correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/wm/key_rewriter_event_filter.cc
diff --git a/ash/wm/key_rewriter_event_filter.cc b/ash/wm/key_rewriter_event_filter.cc
index 30ba84da34db0b3bda5e4d74da55a37547909a5d..6e7ca2eb6f8a1ea310aef3ecda5dbeaca39b455e 100644
--- a/ash/wm/key_rewriter_event_filter.cc
+++ b/ash/wm/key_rewriter_event_filter.cc
@@ -44,7 +44,18 @@ bool KeyRewriterEventFilter::PreHandleKeyEvent(
bool KeyRewriterEventFilter::PreHandleMouseEvent(
aura::Window* target, aura::MouseEvent* event) {
- return false; // Not handled.
+ if (!delegate_.get())
+ return false;
+
+ switch (delegate_->RewriteOrFilterLocatedEvent(event)) {
+ case KeyRewriterDelegate::ACTION_REWRITE_EVENT:
+ return false;
+ case KeyRewriterDelegate::ACTION_DROP_EVENT:
+ return true;
+ }
+
+ NOTREACHED();
+ return false;
}
ui::TouchStatus KeyRewriterEventFilter::PreHandleTouchEvent(

Powered by Google App Engine
This is Rietveld 408576698