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/aura/window.h" | 13 #include "ui/aura/window.h" |
14 #include "ui/aura/window_event_dispatcher.h" | 14 #include "ui/aura/window_event_dispatcher.h" |
15 #include "ui/base/dragdrop/drag_drop_types.h" | 15 #include "ui/base/dragdrop/drag_drop_types.h" |
16 #include "ui/base/dragdrop/drag_utils.h" | 16 #include "ui/base/dragdrop/drag_utils.h" |
17 #include "ui/base/dragdrop/file_info.h" | 17 #include "ui/base/dragdrop/file_info.h" |
18 #include "ui/base/dragdrop/os_exchange_data.h" | 18 #include "ui/base/dragdrop/os_exchange_data.h" |
| 19 #include "ui/gfx/geometry/point.h" |
19 #include "ui/gfx/image/image.h" | 20 #include "ui/gfx/image/image.h" |
20 #include "ui/gfx/image/image_skia.h" | 21 #include "ui/gfx/image/image_skia.h" |
21 #include "ui/gfx/point.h" | |
22 #include "ui/gfx/screen.h" | 22 #include "ui/gfx/screen.h" |
23 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
24 #include "ui/wm/public/drag_drop_client.h" | 24 #include "ui/wm/public/drag_drop_client.h" |
25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
26 | 26 |
27 #if defined(OS_CHROMEOS) | 27 #if defined(OS_CHROMEOS) |
28 #include "chrome/browser/chromeos/drive/download_handler.h" | 28 #include "chrome/browser/chromeos/drive/download_handler.h" |
29 #endif | 29 #endif |
30 | 30 |
31 void DragDownloadItem(const content::DownloadItem* download, | 31 void DragDownloadItem(const content::DownloadItem* download, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 gfx::Point location = gfx::Screen::GetScreenFor(view)->GetCursorScreenPoint(); | 64 gfx::Point location = gfx::Screen::GetScreenFor(view)->GetCursorScreenPoint(); |
65 // TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below. | 65 // TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below. |
66 aura::client::GetDragDropClient(root_window)->StartDragAndDrop( | 66 aura::client::GetDragDropClient(root_window)->StartDragAndDrop( |
67 data, | 67 data, |
68 root_window, | 68 root_window, |
69 view, | 69 view, |
70 location, | 70 location, |
71 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK, | 71 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK, |
72 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); | 72 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); |
73 } | 73 } |
OLD | NEW |