| Index: ui/views/drag_utils.cc
|
| diff --git a/ui/views/drag_utils.cc b/ui/views/drag_utils.cc
|
| index a3307be40af024bac781972660ce8d4aa4b9d79f..27f6d58bc7bd761ac053c125561f202cefb5d2d9 100644
|
| --- a/ui/views/drag_utils.cc
|
| +++ b/ui/views/drag_utils.cc
|
| @@ -4,27 +4,17 @@
|
|
|
| #include "ui/views/drag_utils.h"
|
|
|
| -#include "ui/gfx/canvas.h"
|
| -#include "ui/gfx/size.h"
|
| -
|
| -#if defined(USE_AURA)
|
| #include "ui/aura/client/drag_drop_client.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_event_dispatcher.h"
|
| +#include "ui/gfx/canvas.h"
|
| #include "ui/gfx/display.h"
|
| #include "ui/gfx/screen.h"
|
| +#include "ui/gfx/size.h"
|
| #include "ui/views/widget/widget.h"
|
| -#elif defined(OS_WIN)
|
| -#include "ui/base/dragdrop/drag_drop_types.h"
|
| -#include "ui/base/dragdrop/drag_source_win.h"
|
| -#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
|
| -#else
|
| -#error
|
| -#endif
|
|
|
| float GetDeviceScaleForNativeView(views::Widget* widget) {
|
| float device_scale = 1.0f;
|
| -#if defined(USE_AURA)
|
| // The following code should work on other platforms as well. But we do not
|
| // yet care about device scale factor on other platforms. So to keep drag and
|
| // drop behavior on other platforms un-touched, we wrap this in the #if guard.
|
| @@ -34,7 +24,6 @@ float GetDeviceScaleForNativeView(views::Widget* widget) {
|
| GetDisplayNearestWindow(view);
|
| device_scale = display.device_scale_factor();
|
| }
|
| -#endif
|
| return device_scale;
|
| }
|
|
|
| @@ -45,7 +34,6 @@ void RunShellDrag(gfx::NativeView view,
|
| const gfx::Point& location,
|
| int operation,
|
| ui::DragDropTypes::DragEventSource source) {
|
| -#if defined(USE_AURA)
|
| gfx::Point root_location(location);
|
| aura::Window* root_window = view->GetRootWindow();
|
| aura::Window::ConvertPointToTarget(view, root_window, &root_location);
|
| @@ -53,14 +41,6 @@ void RunShellDrag(gfx::NativeView view,
|
| aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
|
| data, root_window, view, root_location, operation, source);
|
| }
|
| -#elif defined(OS_WIN)
|
| - scoped_refptr<ui::DragSourceWin> drag_source(new ui::DragSourceWin);
|
| - DWORD effects;
|
| - DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
|
| - drag_source,
|
| - ui::DragDropTypes::DragOperationToDropEffect(operation),
|
| - &effects);
|
| -#endif
|
| }
|
|
|
| gfx::Canvas* GetCanvasForDragImage(views::Widget* widget,
|
|
|