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: content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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: content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
diff --git a/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc b/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
index 5df932dfa3b7319a92c485674d18259d5ebe6d44..659cd99d4599d5233291ea0f9cf80420e9e0160c 100644
--- a/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
+++ b/content/browser/renderer_host/touch_smooth_scroll_gesture_aura.cc
@@ -16,16 +16,15 @@ void InjectTouchEvent(const gfx::Point& location,
ui::EventType type,
aura::Window* window) {
gfx::Point screen_location = location;
+ aura::Window* root_window = window->GetRootWindow();
// First convert the location from Window to RootWindow.
- aura::RootWindow* root_window = window->GetRootWindow();
aura::Window::ConvertPointToTarget(window, root_window, &screen_location);
// Then convert the location from RootWindow to screen.
- root_window->ConvertPointToHost(&screen_location);
+ aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
+ dispatcher->ConvertPointToHost(&screen_location);
ui::TouchEvent touch(type, screen_location, 0, 0, ui::EventTimeForNow(),
1.0f, 1.0f, 1.0f, 1.0f);
- aura::RootWindowHostDelegate* root_window_host_delegate =
- root_window->AsRootWindowHostDelegate();
- root_window_host_delegate->OnHostTouchEvent(&touch);
+ dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698