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_SOURCE_GTK_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class SkBitmap; | 23 class SkBitmap; |
24 struct WebDropData; | 24 struct WebDropData; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 class RenderViewHostImpl; | 28 class RenderViewHostImpl; |
29 class WebContentsImpl; | 29 class WebContentsImpl; |
30 | 30 |
31 // WebDragSourceGtk takes care of managing the drag from a WebContents | 31 // WebDragSourceGtk takes care of managing the drag from a WebContents |
32 // with Gtk. | 32 // with Gtk. |
33 class CONTENT_EXPORT WebDragSourceGtk : public MessageLoopForUI::Observer { | 33 class CONTENT_EXPORT WebDragSourceGtk : |
| 34 public base::MessageLoopForUI::Observer { |
34 public: | 35 public: |
35 explicit WebDragSourceGtk(WebContents* web_contents); | 36 explicit WebDragSourceGtk(WebContents* web_contents); |
36 virtual ~WebDragSourceGtk(); | 37 virtual ~WebDragSourceGtk(); |
37 | 38 |
38 // Starts a drag for the WebContents this WebDragSourceGtk was created for. | 39 // Starts a drag for the WebContents this WebDragSourceGtk was created for. |
39 // Returns false if the drag could not be started. | 40 // Returns false if the drag could not be started. |
40 bool StartDragging(const WebDropData& drop_data, | 41 bool StartDragging(const WebDropData& drop_data, |
41 WebKit::WebDragOperationsMask allowed_ops, | 42 WebKit::WebDragOperationsMask allowed_ops, |
42 GdkEventButton* last_mouse_down, | 43 GdkEventButton* last_mouse_down, |
43 const SkBitmap& image, | 44 const SkBitmap& image, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 GtkWidget* drag_icon_; | 106 GtkWidget* drag_icon_; |
106 | 107 |
107 ui::GtkSignalRegistrar signals_; | 108 ui::GtkSignalRegistrar signals_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(WebDragSourceGtk); | 110 DISALLOW_COPY_AND_ASSIGN(WebDragSourceGtk); |
110 }; | 111 }; |
111 | 112 |
112 } // namespace content | 113 } // namespace content |
113 | 114 |
114 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ | 115 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ |
OLD | NEW |