| 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 | |
| 34 // This is called when the renderer responds to a drag motion event. We must | 32 // This is called when the renderer responds to a drag motion event. We must |
| 35 // update the system drag cursor. | 33 // update the system drag cursor. |
| 36 void UpdateDragStatus(WebKit::WebDragOperation operation); | 34 void UpdateDragStatus(WebKit::WebDragOperation operation); |
| 37 | 35 |
| 38 // Informs the renderer when a system drag has left the render view. | 36 // Informs the renderer when a system drag has left the render view. |
| 39 // See OnDragLeave(). | 37 // See OnDragLeave(). |
| 40 void DragLeave(); | 38 void DragLeave(); |
| 41 | 39 |
| 42 WebDragDestDelegate* delegate() const { return delegate_; } | 40 WebDragDestDelegate* delegate() const { return delegate_; } |
| 43 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } | 41 void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 WebDragDestDelegate* delegate_; | 99 WebDragDestDelegate* delegate_; |
| 102 | 100 |
| 103 base::WeakPtrFactory<WebDragDestGtk> method_factory_; | 101 base::WeakPtrFactory<WebDragDestGtk> method_factory_; |
| 104 | 102 |
| 105 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); | 103 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); |
| 106 }; | 104 }; |
| 107 | 105 |
| 108 } // namespace content | 106 } // namespace content |
| 109 | 107 |
| 110 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 108 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
| OLD | NEW |