| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/download/drag_download_item.h" | 5 #include "chrome/browser/download/drag_download_item.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "content/public/browser/download_item.h" | 10 #include "content/public/browser/download_item.h" |
| 11 #include "net/base/mime_util.h" | 11 #include "net/base/mime_util.h" |
| 12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
| 13 #include "ui/base/dragdrop/drag_drop_types.h" | 13 #include "ui/base/dragdrop/drag_drop_types.h" |
| 14 #include "ui/base/dragdrop/drag_utils.h" | 14 #include "ui/base/dragdrop/drag_utils.h" |
| 15 #include "ui/base/dragdrop/os_exchange_data.h" | 15 #include "ui/base/dragdrop/os_exchange_data.h" |
| 16 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
| 17 #include "ui/gfx/point.h" | 17 #include "ui/gfx/point.h" |
| 18 #include "ui/gfx/screen.h" | 18 #include "ui/gfx/screen.h" |
| 19 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 #if defined(OS_WIN) && !defined(USE_AURA) | |
| 23 #include "ui/base/dragdrop/drag_source_win.h" | |
| 24 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" | |
| 25 #endif | |
| 26 | |
| 27 #if defined(USE_AURA) | 22 #if defined(USE_AURA) |
| 28 #include "ui/aura/client/drag_drop_client.h" | 23 #include "ui/aura/client/drag_drop_client.h" |
| 29 #include "ui/aura/root_window.h" | 24 #include "ui/aura/root_window.h" |
| 30 #include "ui/aura/window.h" | 25 #include "ui/aura/window.h" |
| 31 #endif | 26 #endif |
| 32 | 27 |
| 33 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 34 #include "chrome/browser/chromeos/drive/download_handler.h" | 29 #include "chrome/browser/chromeos/drive/download_handler.h" |
| 35 #endif | 30 #endif |
| 36 | 31 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 96 |
| 102 views::NativeWidgetGtk* widget = static_cast<views::NativeWidgetGtk*>( | 97 views::NativeWidgetGtk* widget = static_cast<views::NativeWidgetGtk*>( |
| 103 views::Widget::GetWidgetForNativeView(root)->native_widget()); | 98 views::Widget::GetWidgetForNativeView(root)->native_widget()); |
| 104 if (!widget) | 99 if (!widget) |
| 105 return; | 100 return; |
| 106 | 101 |
| 107 widget->DoDrag(data, | 102 widget->DoDrag(data, |
| 108 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK); | 103 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK); |
| 109 #endif // TOOLKIT_GTK | 104 #endif // TOOLKIT_GTK |
| 110 } | 105 } |
| OLD | NEW |