| 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 CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 6 #define CONTENT_BROWSER_TAB_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 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
| 16 #include "ui/base/gtk/gtk_signal.h" | 16 #include "ui/base/gtk/gtk_signal.h" |
| 17 #include "webkit/glue/webdropdata.h" | 17 #include "webkit/glue/webdropdata.h" |
| 18 | 18 |
| 19 class TabContents; | 19 class TabContents; |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 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(TabContents* tab_contents, GtkWidget* widget); | 29 WebDragDestGtk(TabContents* tab_contents, GtkWidget* widget); |
| 30 virtual ~WebDragDestGtk(); | 30 ~WebDragDestGtk(); |
| 31 | 31 |
| 32 // 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 |
| 33 // update the system drag cursor. | 33 // update the system drag cursor. |
| 34 void UpdateDragStatus(WebKit::WebDragOperation operation); | 34 void UpdateDragStatus(WebKit::WebDragOperation operation); |
| 35 | 35 |
| 36 // 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. |
| 37 // See OnDragLeave(). | 37 // See OnDragLeave(). |
| 38 void DragLeave(); | 38 void DragLeave(); |
| 39 | 39 |
| 40 WebDragDestDelegate* delegate() const { return delegate_; } | 40 WebDragDestDelegate* delegate() const { return delegate_; } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 WebDragDestDelegate* delegate_; | 97 WebDragDestDelegate* delegate_; |
| 98 | 98 |
| 99 base::WeakPtrFactory<WebDragDestGtk> method_factory_; | 99 base::WeakPtrFactory<WebDragDestGtk> method_factory_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); | 101 DISALLOW_COPY_AND_ASSIGN(WebDragDestGtk); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace content | 104 } // namespace content |
| 105 | 105 |
| 106 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_GTK_H_ | 106 #endif // CONTENT_BROWSER_TAB_CONTENTS_WEB_DRAG_DEST_GTK_H_ |
| OLD | NEW |