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 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 WebDropData* current_drop_data() const { return drop_data_.get(); } | 31 WebDropData* current_drop_data() const { return drop_data_.get(); } |
32 | 32 |
33 // This is called when the renderer responds to a drag motion event. We must | 33 // This is called when the renderer responds to a drag motion event. We must |
34 // update the system drag cursor. | 34 // update the system drag cursor. |
35 void UpdateDragStatus(WebKit::WebDragOperation operation); | 35 void UpdateDragStatus(WebKit::WebDragOperation operation); |
36 | 36 |
37 // Informs the renderer when a system drag has left the render view. | 37 // Informs the renderer when a system drag has left the render view. |
38 // See OnDragLeave(). | 38 // See OnDragLeave(). |
39 void DragLeave(); | 39 void DragLeave(); |
40 | 40 |
| 41 GtkWidget* widget() const { return widget_; } |
| 42 |
41 WebDragDestDelegate* delegate() const { return delegate_; } | 43 WebDragDestDelegate* delegate() const { return delegate_; } |
42 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } | 44 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } |
43 | 45 |
44 private: | 46 private: |
45 RenderViewHostImpl* GetRenderViewHost() const; | 47 RenderViewHostImpl* GetRenderViewHost() const; |
46 | 48 |
47 // Called when a system drag crosses over the render view. As there is no drag | 49 // Called when a system drag crosses over the render view. As there is no drag |
48 // enter event, we treat it as an enter event (and not a regular motion event) | 50 // enter event, we treat it as an enter event (and not a regular motion event) |
49 // when |context_| is NULL. | 51 // when |context_| is NULL. |
50 CHROMEGTK_CALLBACK_4(WebDragDestGtk, gboolean, OnDragMotion, GdkDragContext*, | 52 CHROMEGTK_CALLBACK_4(WebDragDestGtk, gboolean, OnDragMotion, GdkDragContext*, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 WebDragDestDelegate* delegate_; | 102 WebDragDestDelegate* delegate_; |
101 | 103 |
102 base::WeakPtrFactory<WebDragDestGtk> method_factory_; | 104 base::WeakPtrFactory<WebDragDestGtk> method_factory_; |
103 | 105 |
104 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); | 106 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); |
105 }; | 107 }; |
106 | 108 |
107 } // namespace content | 109 } // namespace content |
108 | 110 |
109 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 111 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
OLD | NEW |