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 "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #endif | 55 #endif |
56 std::vector<ui::FileInfo> file_infos; | 56 std::vector<ui::FileInfo> file_infos; |
57 file_infos.push_back( | 57 file_infos.push_back( |
58 ui::FileInfo(full_path, download->GetFileNameToReportUser())); | 58 ui::FileInfo(full_path, download->GetFileNameToReportUser())); |
59 data.SetFilenames(file_infos); | 59 data.SetFilenames(file_infos); |
60 | 60 |
61 aura::Window* root_window = view->GetRootWindow(); | 61 aura::Window* root_window = view->GetRootWindow(); |
62 if (!root_window || !aura::client::GetDragDropClient(root_window)) | 62 if (!root_window || !aura::client::GetDragDropClient(root_window)) |
63 return; | 63 return; |
64 | 64 |
65 gfx::Point location = gfx::Screen::GetScreenFor(view)->GetCursorScreenPoint(); | 65 gfx::Point location = gfx::Screen::GetScreen()->GetCursorScreenPoint(); |
66 // TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below. | 66 // TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below. |
67 aura::client::GetDragDropClient(root_window)->StartDragAndDrop( | 67 aura::client::GetDragDropClient(root_window)->StartDragAndDrop( |
68 data, | 68 data, |
69 root_window, | 69 root_window, |
70 view, | 70 view, |
71 location, | 71 location, |
72 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK, | 72 ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK, |
73 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); | 73 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); |
74 } | 74 } |
OLD | NEW |