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(USE_AURA) | 22 #if defined(USE_AURA) |
23 #include "ui/aura/client/drag_drop_client.h" | 23 #include "ui/aura/client/drag_drop_client.h" |
24 #include "ui/aura/root_window.h" | |
25 #include "ui/aura/window.h" | 24 #include "ui/aura/window.h" |
| 25 #include "ui/aura/window_event_dispatcher.h" |
26 #endif | 26 #endif |
27 | 27 |
28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
29 #include "chrome/browser/chromeos/drive/download_handler.h" | 29 #include "chrome/browser/chromeos/drive/download_handler.h" |
30 #endif | 30 #endif |
31 | 31 |
32 void DragDownloadItem(const content::DownloadItem* download, | 32 void DragDownloadItem(const content::DownloadItem* download, |
33 gfx::Image* icon, | 33 gfx::Image* icon, |
34 gfx::NativeView view) { | 34 gfx::NativeView view) { |
35 DCHECK(download); | 35 DCHECK(download); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 views::NativeWidgetGtk* widget = static_cast<views::NativeWidgetGtk*>( | 97 views::NativeWidgetGtk* widget = static_cast<views::NativeWidgetGtk*>( |
98 views::Widget::GetWidgetForNativeView(root)->native_widget()); | 98 views::Widget::GetWidgetForNativeView(root)->native_widget()); |
99 if (!widget) | 99 if (!widget) |
100 return; | 100 return; |
101 | 101 |
102 widget->DoDrag(data, | 102 widget->DoDrag(data, |
103 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK); | 103 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK); |
104 #endif // TOOLKIT_GTK | 104 #endif // TOOLKIT_GTK |
105 } | 105 } |
OLD | NEW |