diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-25 19:22:45 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-25 19:22:45 +0000 |
commit | bf9cdb36cc79becab099c9f37eb80284fb203f45 (patch) | |
tree | 4c9011f0aa08ac613027abd372cec3a3b613032b /ash/drag_drop | |
parent | fef72c1c9890633a237e06ccb0d0f4ce2ca6c9c1 (diff) | |
download | chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.zip chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.tar.gz chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.tar.bz2 |
Make GetRootWindow() return a Window instead of a RootWindow.
Also adds a typedef from RootWindow to WindowEventDispatcher, the eventual name of this type.
Adds a GetDispatcher() method that crawls up to the root Window and returns the WindowEventDispatcher.
R=sky@chromium.org
http://crbug.com/308843
Review URL: https://codereview.chromium.org/37733003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop')
-rw-r--r-- | ash/drag_drop/drag_drop_controller_unittest.cc | 7 | ||||
-rw-r--r-- | ash/drag_drop/drag_drop_tracker.cc | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index fd26f37..fa4f2bc 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -283,7 +283,8 @@ void DispatchGesture(ui::EventType gesture_type, gfx::Point location) { ui::EventTimeForNow(), ui::GestureEventDetails(gesture_type, 0, 0), 1); - Shell::GetPrimaryRootWindow()->DispatchGestureEvent(&gesture_event); + Shell::GetPrimaryRootWindow()->GetDispatcher()->DispatchGestureEvent( + &gesture_event); } bool IsGestureEventType(ui::EventType type) { @@ -762,8 +763,8 @@ TEST_F(DragDropControllerTest, SyntheticEventsDuringDragDrop) { gfx::Point mouse_move_location = drag_view->bounds().CenterPoint(); ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location, mouse_move_location, 0); - Shell::GetPrimaryRootWindow()->AsRootWindowHostDelegate()->OnHostMouseEvent( - &mouse_move); + Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()-> + OnHostMouseEvent(&mouse_move); } generator.ReleaseLeftButton(); diff --git a/ash/drag_drop/drag_drop_tracker.cc b/ash/drag_drop/drag_drop_tracker.cc index 72f0389..03ecf79 100644 --- a/ash/drag_drop/drag_drop_tracker.cc +++ b/ash/drag_drop/drag_drop_tracker.cc @@ -50,7 +50,7 @@ aura::Window* DragDropTracker::GetTarget(const ui::LocatedEvent& event) { gfx::Point location_in_screen = event.location(); wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen); - aura::RootWindow* root_window_at_point = + aura::Window* root_window_at_point = wm::GetRootWindowAt(location_in_screen); gfx::Point location_in_root = location_in_screen; wm::ConvertPointFromScreen(root_window_at_point, &location_in_root); |