| 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 24 matching lines...) Expand all Loading... |
| 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 WebDragDestDelegate* delegate() const { return delegate_; } | 41 WebDragDestDelegate* delegate() const { return delegate_; } |
| 42 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } | 42 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 content::RenderViewHostImpl* GetRenderViewHost() const; | 45 RenderViewHostImpl* GetRenderViewHost() const; |
| 46 | 46 |
| 47 // Called when a system drag crosses over the render view. As there is no drag | 47 // 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) | 48 // enter event, we treat it as an enter event (and not a regular motion event) |
| 49 // when |context_| is NULL. | 49 // when |context_| is NULL. |
| 50 CHROMEGTK_CALLBACK_4(WebDragDestGtk, gboolean, OnDragMotion, GdkDragContext*, | 50 CHROMEGTK_CALLBACK_4(WebDragDestGtk, gboolean, OnDragMotion, GdkDragContext*, |
| 51 gint, gint, guint); | 51 gint, gint, guint); |
| 52 | 52 |
| 53 // We make a series of requests for the drag data when the drag first enters | 53 // We make a series of requests for the drag data when the drag first enters |
| 54 // the render view. This is the callback that is used to give us the data | 54 // the render view. This is the callback that is used to give us the data |
| 55 // for each individual target. When |data_requests_| reaches 0, we know we | 55 // for each individual target. When |data_requests_| reaches 0, we know we |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 WebDragDestDelegate* delegate_; | 100 WebDragDestDelegate* delegate_; |
| 101 | 101 |
| 102 base::WeakPtrFactory<WebDragDestGtk> method_factory_; | 102 base::WeakPtrFactory<WebDragDestGtk> method_factory_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); | 104 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace content | 107 } // namespace content |
| 108 | 108 |
| 109 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 109 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
| OLD | NEW |