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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class WebContents; | 22 class WebContents; |
23 class WebDragDestDelegate; | 23 class WebDragDestDelegate; |
24 | 24 |
25 // A helper class that handles DnD for drops in the renderer. In GTK parlance, | 25 // A helper class that handles DnD for drops in the renderer. In GTK parlance, |
26 // this handles destination-side DnD, but not source-side DnD. | 26 // this handles destination-side DnD, but not source-side DnD. |
27 class CONTENT_EXPORT WebDragDestGtk { | 27 class CONTENT_EXPORT WebDragDestGtk { |
28 public: | 28 public: |
29 WebDragDestGtk(WebContents* web_contents, GtkWidget* widget); | 29 WebDragDestGtk(WebContents* web_contents, GtkWidget* widget); |
30 ~WebDragDestGtk(); | 30 ~WebDragDestGtk(); |
31 | 31 |
| 32 WebDropData* current_drop_data() const { return drop_data_.get(); } |
| 33 |
32 // This is called when the renderer responds to a drag motion event. We must | 34 // This is called when the renderer responds to a drag motion event. We must |
33 // update the system drag cursor. | 35 // update the system drag cursor. |
34 void UpdateDragStatus(WebKit::WebDragOperation operation); | 36 void UpdateDragStatus(WebKit::WebDragOperation operation); |
35 | 37 |
36 // Informs the renderer when a system drag has left the render view. | 38 // Informs the renderer when a system drag has left the render view. |
37 // See OnDragLeave(). | 39 // See OnDragLeave(). |
38 void DragLeave(); | 40 void DragLeave(); |
39 | 41 |
40 WebDragDestDelegate* delegate() const { return delegate_; } | 42 WebDragDestDelegate* delegate() const { return delegate_; } |
41 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } | 43 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 WebDragDestDelegate* delegate_; | 101 WebDragDestDelegate* delegate_; |
100 | 102 |
101 base::WeakPtrFactory<WebDragDestGtk> method_factory_; | 103 base::WeakPtrFactory<WebDragDestGtk> method_factory_; |
102 | 104 |
103 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); | 105 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); |
104 }; | 106 }; |
105 | 107 |
106 } // namespace content | 108 } // namespace content |
107 | 109 |
108 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 110 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
OLD | NEW |