OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_contents/web_drag_source_win.h" | 5 #include "chrome/browser/tab_contents/web_drag_source_win.h" |
6 | 6 |
7 #include "base/task.h" | 7 #include "base/task.h" |
8 #include "chrome/browser/browser_thread.h" | 8 #include "chrome/browser/browser_thread.h" |
9 #include "chrome/browser/renderer_host/render_view_host.h" | 9 #include "chrome/browser/renderer_host/render_view_host.h" |
10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 client->SetPoint(cursor_pos.x, cursor_pos.y); | 25 client->SetPoint(cursor_pos.x, cursor_pos.y); |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
31 // WebDragSource, public: | 31 // WebDragSource, public: |
32 | 32 |
33 WebDragSource::WebDragSource(gfx::NativeWindow source_wnd, | 33 WebDragSource::WebDragSource(gfx::NativeWindow source_wnd, |
34 TabContents* tab_contents) | 34 TabContents* tab_contents) |
35 : app::win::DragSource(), | 35 : ui::DragSource(), |
36 source_wnd_(source_wnd), | 36 source_wnd_(source_wnd), |
37 render_view_host_(tab_contents->render_view_host()), | 37 render_view_host_(tab_contents->render_view_host()), |
38 effect_(DROPEFFECT_NONE) { | 38 effect_(DROPEFFECT_NONE) { |
39 registrar_.Add(this, NotificationType::TAB_CONTENTS_SWAPPED, | 39 registrar_.Add(this, NotificationType::TAB_CONTENTS_SWAPPED, |
40 Source<TabContents>(tab_contents)); | 40 Source<TabContents>(tab_contents)); |
41 registrar_.Add(this, NotificationType::TAB_CONTENTS_DISCONNECTED, | 41 registrar_.Add(this, NotificationType::TAB_CONTENTS_DISCONNECTED, |
42 Source<TabContents>(tab_contents)); | 42 Source<TabContents>(tab_contents)); |
43 } | 43 } |
44 | 44 |
45 WebDragSource::~WebDragSource() { | 45 WebDragSource::~WebDragSource() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // That's OK, we can continue the drag, we just can't send messages back to | 114 // That's OK, we can continue the drag, we just can't send messages back to |
115 // our drag source. | 115 // our drag source. |
116 render_view_host_ = NULL; | 116 render_view_host_ = NULL; |
117 } else if (NotificationType::TAB_CONTENTS_DISCONNECTED == type) { | 117 } else if (NotificationType::TAB_CONTENTS_DISCONNECTED == type) { |
118 // This could be possible when we close the tab and the source is still | 118 // This could be possible when we close the tab and the source is still |
119 // being used in DoDragDrop at the time that the virtual file is being | 119 // being used in DoDragDrop at the time that the virtual file is being |
120 // downloaded. | 120 // downloaded. |
121 render_view_host_ = NULL; | 121 render_view_host_ = NULL; |
122 } | 122 } |
123 } | 123 } |
OLD | NEW |