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

Unified Diff: ui/aura/root_window.cc

Issue 9221014: aura: Gesture event plumbing (skeleton). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 11 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/aura/root_window.h ('k') | ui/aura/test/test_event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 3013790bd0e25db59be8f3bd46b197ff56bed90f..c714b9bcc2bb42ba80e62ad85cd1604680b6d656 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -213,9 +213,19 @@ bool RootWindow::DispatchTouchEvent(TouchEvent* event) {
touch_event_handler_ = NULL;
handled = status != ui::TOUCH_STATUS_UNKNOWN;
}
+
+ if (!handled) {
+ // TODO(sad): Send the touch to the gesture recognizer.
+ }
+
return handled;
}
+bool RootWindow::DispatchGestureEvent(GestureEvent* event) {
+ // TODO(sad):
+ return false;
+}
+
void RootWindow::OnHostResized(const gfx::Size& size) {
// The compositor should have the same size as the native root window host.
compositor_->WidgetSizeChanged(size);
@@ -439,6 +449,23 @@ ui::TouchStatus RootWindow::ProcessTouchEvent(Window* target,
return target->delegate()->OnTouchEvent(event);
}
+ui::GestureStatus RootWindow::ProcessGestureEvent(Window* target,
+ GestureEvent* event) {
+ if (!target->IsVisible())
+ return ui::GESTURE_STATUS_UNKNOWN;
+
+ EventFilters filters;
+ GetEventFiltersToNotify(target, &filters);
+ for (EventFilters::const_reverse_iterator it = filters.rbegin();
+ it != filters.rend(); ++it) {
+ ui::GestureStatus status = (*it)->PreHandleGestureEvent(target, event);
+ if (status != ui::GESTURE_STATUS_UNKNOWN)
+ return status;
+ }
+
+ return target->delegate()->OnGestureEvent(event);
+}
+
void RootWindow::ScheduleDraw() {
if (!schedule_paint_factory_.HasWeakPtrs()) {
MessageLoop::current()->PostTask(
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/test/test_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698