diff options
author | pkotwicz <pkotwicz@chromium.org> | 2015-02-24 13:16:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-24 21:17:05 +0000 |
commit | deb3f7248b8a7f7ed92b1cd4eaa7fb8df4645efc (patch) | |
tree | 8d245daf790fa78f98a033b774fb85fdc11e507c /ash/drag_drop | |
parent | c2c7d0fb617e4192ffc88e1634183354956bcc13 (diff) | |
download | chromium_src-deb3f7248b8a7f7ed92b1cd4eaa7fb8df4645efc.zip chromium_src-deb3f7248b8a7f7ed92b1cd4eaa7fb8df4645efc.tar.gz chromium_src-deb3f7248b8a7f7ed92b1cd4eaa7fb8df4645efc.tar.bz2 |
Pass location in screen coordinates to DragDropClient::StartDragAndDrop()
This CL:
- Avoids converting from screen coordinates in
WebContentsViewAura::StartDragging() and back to screen coordinates in
DragDropController::StartDragAndDrop()
- Passes the location in the correct coordinates to StartDragAndDrop() in
DragDownloadItem() in drag_download_item_views.cc
BUG=456619
TEST=Manual, see bug
Review URL: https://codereview.chromium.org/901563005
Cr-Commit-Position: refs/heads/master@{#317888}
Diffstat (limited to 'ash/drag_drop')
-rw-r--r-- | ash/drag_drop/drag_drop_controller.cc | 5 | ||||
-rw-r--r-- | ash/drag_drop/drag_drop_controller.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index dedfffd..b57b24c 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -149,7 +149,7 @@ int DragDropController::StartDragAndDrop( const ui::OSExchangeData& data, aura::Window* root_window, aura::Window* source_window, - const gfx::Point& root_location, + const gfx::Point& screen_location, int operation, ui::DragDropTypes::DragEventSource source) { if (IsDragDropInProgress()) @@ -194,8 +194,7 @@ int DragDropController::StartDragAndDrop( drag_image_scale = kTouchDragImageScale; drag_image_vertical_offset = kTouchDragImageVerticalOffset; } - gfx::Point start_location = root_location; - ::wm::ConvertPointToScreen(root_window, &start_location); + gfx::Point start_location = screen_location; drag_image_final_bounds_for_cancel_animation_ = gfx::Rect( start_location - provider->GetDragImageOffset(), provider->GetDragImage().size()); diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h index a9007f2..35b1d9a 100644 --- a/ash/drag_drop/drag_drop_controller.h +++ b/ash/drag_drop/drag_drop_controller.h @@ -46,7 +46,7 @@ class ASH_EXPORT DragDropController int StartDragAndDrop(const ui::OSExchangeData& data, aura::Window* root_window, aura::Window* source_window, - const gfx::Point& root_location, + const gfx::Point& screen_location, int operation, ui::DragDropTypes::DragEventSource source) override; void DragUpdate(aura::Window* target, const ui::LocatedEvent& event) override; |