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

Unified Diff: ash/autoclick/autoclick_controller.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
« no previous file with comments | « ash/accelerators/nested_dispatcher_controller_unittest.cc ('k') | ash/autoclick/autoclick_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/autoclick/autoclick_controller.cc
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index 31dfe3f37206ead5a94171b4c066c1d76770e94a..17b25584b20347675eec4a0ea3534fb04e3d3d7e 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -154,13 +154,15 @@ void AutoclickControllerImpl::OnTouchEvent(ui::TouchEvent* event) {
void AutoclickControllerImpl::DoAutoclick() {
gfx::Point screen_location =
aura::Env::GetInstance()->last_mouse_location();
- aura::RootWindow* root_window = wm::GetRootWindowAt(screen_location);
+ aura::Window* root_window = wm::GetRootWindowAt(screen_location);
DCHECK(root_window) << "Root window not found while attempting autoclick.";
gfx::Point click_location(screen_location);
anchor_location_ = click_location;
wm::ConvertPointFromScreen(root_window, &click_location);
- root_window->ConvertPointToHost(&click_location);
+
+ aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher();
+ dispatcher->ConvertPointToHost(&click_location);
ui::MouseEvent press_event(ui::ET_MOUSE_PRESSED,
click_location,
@@ -171,8 +173,8 @@ void AutoclickControllerImpl::DoAutoclick() {
click_location,
mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON);
- root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&press_event);
- root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&release_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press_event);
+ dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release_event);
}
// static.
« no previous file with comments | « ash/accelerators/nested_dispatcher_controller_unittest.cc ('k') | ash/autoclick/autoclick_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698