| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_drag_source_win.h" | 5 #include "content/browser/web_contents/web_drag_source_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/browser/web_contents/web_drag_utils_win.h" | 10 #include "content/browser/web_contents/web_drag_utils_win.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/browser/notification_source.h" | 12 #include "content/public/browser/notification_source.h" |
| 13 #include "content/public/browser/notification_types.h" | 13 #include "content/public/browser/notification_types.h" |
| 14 #include "ui/base/dragdrop/os_exchange_data.h" | 14 #include "ui/base/dragdrop/os_exchange_data.h" |
| 15 | 15 |
| 16 using WebKit::WebDragOperationNone; | 16 using blink::WebDragOperationNone; |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 static void GetCursorPositions(gfx::NativeWindow wnd, gfx::Point* client, | 21 static void GetCursorPositions(gfx::NativeWindow wnd, gfx::Point* client, |
| 22 gfx::Point* screen) { | 22 gfx::Point* screen) { |
| 23 POINT cursor_pos; | 23 POINT cursor_pos; |
| 24 GetCursorPos(&cursor_pos); | 24 GetCursorPos(&cursor_pos); |
| 25 screen->SetPoint(cursor_pos.x, cursor_pos.y); | 25 screen->SetPoint(cursor_pos.x, cursor_pos.y); |
| 26 ScreenToClient(wnd, &cursor_pos); | 26 ScreenToClient(wnd, &cursor_pos); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 web_contents_ = NULL; | 121 web_contents_ = NULL; |
| 122 } else if (type == NOTIFICATION_WEB_CONTENTS_DISCONNECTED) { | 122 } else if (type == NOTIFICATION_WEB_CONTENTS_DISCONNECTED) { |
| 123 // This could be possible when we close the tab and the source is still | 123 // This could be possible when we close the tab and the source is still |
| 124 // being used in DoDragDrop at the time that the virtual file is being | 124 // being used in DoDragDrop at the time that the virtual file is being |
| 125 // downloaded. | 125 // downloaded. |
| 126 web_contents_ = NULL; | 126 web_contents_ = NULL; |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace content | 130 } // namespace content |
| OLD | NEW |