diff options
Diffstat (limited to 'ui/views/widget')
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 15 | ||||
-rw-r--r-- | ui/views/widget/native_widget_win.cc | 6 |
2 files changed, 7 insertions, 14 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index 19292d5..116d6f1 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -27,6 +27,7 @@ #include "ui/gfx/compositor/layer.h" #include "ui/gfx/font.h" #include "ui/gfx/screen.h" +#include "ui/views/drag_utils.h" #include "ui/views/ime/input_method_bridge.h" #include "ui/views/widget/drop_helper.h" #include "ui/views/widget/native_widget_delegate.h" @@ -622,16 +623,10 @@ bool NativeWidgetAura::IsAccessibleWidget() const { } void NativeWidgetAura::RunShellDrag(View* view, - const ui::OSExchangeData& data, - const gfx::Point& location, - int operation) { - gfx::Point root_location(location); - aura::RootWindow* root_window = window_->GetRootWindow(); - aura::Window::ConvertPointToWindow(window_, root_window, &root_location); - if (aura::client::GetDragDropClient(root_window)) { - aura::client::GetDragDropClient(root_window)->StartDragAndDrop(data, - root_location, operation); - } + const ui::OSExchangeData& data, + const gfx::Point& location, + int operation) { + views::RunShellDrag(window_, data, location, operation); } void NativeWidgetAura::SchedulePaintInRect(const gfx::Rect& rect) { diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc index 6887462..a128771 100644 --- a/ui/views/widget/native_widget_win.cc +++ b/ui/views/widget/native_widget_win.cc @@ -35,6 +35,7 @@ #include "ui/views/accessibility/native_view_accessibility_win.h" #include "ui/views/controls/native_control_win.h" #include "ui/views/controls/textfield/native_textfield_views.h" +#include "ui/views/drag_utils.h" #include "ui/views/focus/accelerator_handler.h" #include "ui/views/focus/view_storage.h" #include "ui/views/ime/input_method_win.h" @@ -1069,10 +1070,7 @@ void NativeWidgetWin::RunShellDrag(View* view, const ui::OSExchangeData& data, const gfx::Point& location, int operation) { - scoped_refptr<ui::DragSource> drag_source(new ui::DragSource); - DWORD effects; - DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data), drag_source, - ui::DragDropTypes::DragOperationToDropEffect(operation), &effects); + views::RunShellDrag(NULL, data, location, operation); } void NativeWidgetWin::SchedulePaintInRect(const gfx::Rect& rect) { |