OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/common/content_export.h" |
10 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
12 #include "ui/base/dragdrop/drag_source.h" | 13 #include "ui/base/dragdrop/drag_source.h" |
13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
14 #include "ui/gfx/point.h" | 15 #include "ui/gfx/point.h" |
15 | 16 |
16 class RenderViewHost; | 17 class RenderViewHost; |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 class WebContents; | 20 class WebContents; |
20 } | 21 } |
21 | 22 |
22 // An IDropSource implementation for a TabContents. Handles notifications sent | 23 // An IDropSource implementation for a TabContents. Handles notifications sent |
23 // by an active drag-drop operation as the user mouses over other drop targets | 24 // by an active drag-drop operation as the user mouses over other drop targets |
24 // on their system. This object tells Windows whether or not the drag should | 25 // on their system. This object tells Windows whether or not the drag should |
25 // continue, and supplies the appropriate cursors. | 26 // continue, and supplies the appropriate cursors. |
26 class WebDragSource : public ui::DragSource, | 27 class CONTENT_EXPORT WebDragSource : public ui::DragSource, |
27 public content::NotificationObserver { | 28 public content::NotificationObserver { |
28 public: | 29 public: |
29 // Create a new DragSource for a given HWND and WebContents. | 30 // Create a new DragSource for a given HWND and WebContents. |
30 WebDragSource(gfx::NativeWindow source_wnd, | 31 WebDragSource(gfx::NativeWindow source_wnd, |
31 content::WebContents* web_contents); | 32 content::WebContents* web_contents); |
32 virtual ~WebDragSource(); | 33 virtual ~WebDragSource(); |
33 | 34 |
34 // content::NotificationObserver implementation. | 35 // content::NotificationObserver implementation. |
35 virtual void Observe(int type, | 36 virtual void Observe(int type, |
36 const content::NotificationSource& source, | 37 const content::NotificationSource& source, |
37 const content::NotificationDetails& details); | 38 const content::NotificationDetails& details); |
(...skipping 22 matching lines...) Expand all Loading... |
60 // initiated terminates). | 61 // initiated terminates). |
61 RenderViewHost* render_view_host_; | 62 RenderViewHost* render_view_host_; |
62 | 63 |
63 content::NotificationRegistrar registrar_; | 64 content::NotificationRegistrar registrar_; |
64 | 65 |
65 DWORD effect_; | 66 DWORD effect_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(WebDragSource); | 68 DISALLOW_COPY_AND_ASSIGN(WebDragSource); |
68 }; | 69 }; |
69 | 70 |
70 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ | 71 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_SOURCE_WIN_H_ |
OLD | NEW |