diff options
author | mfomitchev@chromium.org <mfomitchev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-05 22:06:16 +0000 |
---|---|---|
committer | mfomitchev@chromium.org <mfomitchev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-05 22:06:16 +0000 |
commit | 1ece0b6bc17519c50fd3c15df95060953c082894 (patch) | |
tree | 7c39fa11c19b7c54fc24fa283b6734a3e37714c2 /ash/drag_drop | |
parent | 7aa9682d0500b2f8e8db0f80c7d9e32d490e22ee (diff) | |
download | chromium_src-1ece0b6bc17519c50fd3c15df95060953c082894.zip chromium_src-1ece0b6bc17519c50fd3c15df95060953c082894.tar.gz chromium_src-1ece0b6bc17519c50fd3c15df95060953c082894.tar.bz2 |
Moving coordinate conversion methods from ash/wm to ui/wm.
Moving ConvertPointToScreen and ConvertPointFromScreen from ash::wm into
aura::Window. The suggestion to do this was made here:
https://codereview.chromium.org/420603011/diff/1/athena/wm/coordinate_conversion.h
BUG=NONE
Review URL: https://codereview.chromium.org/425363002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop')
-rw-r--r-- | ash/drag_drop/drag_drop_controller.cc | 8 | ||||
-rw-r--r-- | ash/drag_drop/drag_drop_tracker.cc | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index 2ff526f..004298c 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -7,7 +7,6 @@ #include "ash/drag_drop/drag_drop_tracker.h" #include "ash/drag_drop/drag_image_view.h" #include "ash/shell.h" -#include "ash/wm/coordinate_conversion.h" #include "base/bind.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" @@ -28,6 +27,7 @@ #include "ui/gfx/rect_conversions.h" #include "ui/views/views_delegate.h" #include "ui/views/widget/native_widget_aura.h" +#include "ui/wm/core/coordinate_conversion.h" #include "ui/wm/public/drag_drop_delegate.h" namespace ash { @@ -198,7 +198,7 @@ int DragDropController::StartDragAndDrop( drag_image_vertical_offset = kTouchDragImageVerticalOffset; } gfx::Point start_location = root_location; - ash::wm::ConvertPointToScreen(root_window, &start_location); + ::wm::ConvertPointToScreen(root_window, &start_location); drag_image_final_bounds_for_cancel_animation_ = gfx::Rect( start_location - provider->GetDragImageOffset(), provider->GetDragImage().size()); @@ -292,8 +292,8 @@ void DragDropController::DragUpdate(aura::Window* target, DCHECK(drag_image_.get()); if (drag_image_->visible()) { gfx::Point root_location_in_screen = event.root_location(); - ash::wm::ConvertPointToScreen(target->GetRootWindow(), - &root_location_in_screen); + ::wm::ConvertPointToScreen(target->GetRootWindow(), + &root_location_in_screen); drag_image_->SetScreenPosition( root_location_in_screen - drag_image_offset_); drag_image_->SetTouchDragOperation(op); diff --git a/ash/drag_drop/drag_drop_tracker.cc b/ash/drag_drop/drag_drop_tracker.cc index 193dc62..c1ec244 100644 --- a/ash/drag_drop/drag_drop_tracker.cc +++ b/ash/drag_drop/drag_drop_tracker.cc @@ -12,6 +12,7 @@ #include "ui/aura/window_event_dispatcher.h" #include "ui/events/event.h" #include "ui/gfx/screen.h" +#include "ui/wm/core/coordinate_conversion.h" #include "ui/wm/public/activation_delegate.h" namespace ash { @@ -68,12 +69,11 @@ void DragDropTracker::TakeCapture() { aura::Window* DragDropTracker::GetTarget(const ui::LocatedEvent& event) { DCHECK(capture_window_.get()); gfx::Point location_in_screen = event.location(); - wm::ConvertPointToScreen(capture_window_.get(), - &location_in_screen); + ::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen); 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); + ::wm::ConvertPointFromScreen(root_window_at_point, &location_in_root); return root_window_at_point->GetEventHandlerForPoint(location_in_root); } @@ -85,7 +85,7 @@ ui::LocatedEvent* DragDropTracker::ConvertEvent( aura::Window::ConvertPointToTarget(capture_window_.get(), target, &target_location); gfx::Point location_in_screen = event.location(); - ash::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen); + ::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen); gfx::Point target_root_location = event.root_location(); aura::Window::ConvertPointToTarget( capture_window_->GetRootWindow(), |