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

Unified Diff: ui/aura/root_window.cc

Issue 8907005: Add support for new scroll valuators coming from CMT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review nits Created 9 years 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/root_window_host_linux.cc » ('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 7396ad685054625324455ac300d3ea4bd5365f8a..059cee4ea49c3662f3e756210f9cf8bc358fa31d 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -196,6 +196,28 @@ bool RootWindow::DispatchKeyEvent(KeyEvent* event) {
return false;
}
+bool RootWindow::DispatchScrollEvent(ScrollEvent* event) {
+ event->UpdateForTransform(layer()->transform());
+
+ last_mouse_location_ = event->location();
+
+ Window* target =
+ mouse_pressed_handler_ ? mouse_pressed_handler_ : capture_window_;
+ if (!target)
+ target = GetEventHandlerForPoint(event->location());
+
+ if (target && target->delegate()) {
+ int flags = event->flags();
+ gfx::Point location_in_window = event->location();
+ Window::ConvertPointToWindow(this, target, &location_in_window);
+ if (IsNonClientLocation(target, location_in_window))
+ flags |= ui::EF_IS_NON_CLIENT;
+ ScrollEvent translated_event(*event, this, target, event->type(), flags);
+ return ProcessMouseEvent(target, &translated_event);
+ }
+ return false;
+}
+
bool RootWindow::DispatchTouchEvent(TouchEvent* event) {
event->UpdateForTransform(layer()->transform());
bool handled = false;
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698