| 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 21 matching lines...) Expand all Loading... |
| 32 // with Gtk. | 32 // with Gtk. |
| 33 class CONTENT_EXPORT WebDragSourceGtk : | 33 class CONTENT_EXPORT WebDragSourceGtk : |
| 34 public base::MessageLoopForUI::Observer { | 34 public base::MessageLoopForUI::Observer { |
| 35 public: | 35 public: |
| 36 explicit WebDragSourceGtk(WebContents* web_contents); | 36 explicit WebDragSourceGtk(WebContents* web_contents); |
| 37 virtual ~WebDragSourceGtk(); | 37 virtual ~WebDragSourceGtk(); |
| 38 | 38 |
| 39 // Starts a drag for the WebContents this WebDragSourceGtk was created for. | 39 // Starts a drag for the WebContents this WebDragSourceGtk was created for. |
| 40 // Returns false if the drag could not be started. | 40 // Returns false if the drag could not be started. |
| 41 bool StartDragging(const DropData& drop_data, | 41 bool StartDragging(const DropData& drop_data, |
| 42 WebKit::WebDragOperationsMask allowed_ops, | 42 blink::WebDragOperationsMask allowed_ops, |
| 43 GdkEventButton* last_mouse_down, | 43 GdkEventButton* last_mouse_down, |
| 44 const SkBitmap& image, | 44 const SkBitmap& image, |
| 45 const gfx::Vector2d& image_offset); | 45 const gfx::Vector2d& image_offset); |
| 46 | 46 |
| 47 // MessageLoop::Observer implementation: | 47 // MessageLoop::Observer implementation: |
| 48 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; | 48 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; |
| 49 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; | 49 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 CHROMEGTK_CALLBACK_2(WebDragSourceGtk, gboolean, OnDragFailed, | 52 CHROMEGTK_CALLBACK_2(WebDragSourceGtk, gboolean, OnDragFailed, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 GtkWidget* drag_icon_; | 106 GtkWidget* drag_icon_; |
| 107 | 107 |
| 108 ui::GtkSignalRegistrar signals_; | 108 ui::GtkSignalRegistrar signals_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(WebDragSourceGtk); | 110 DISALLOW_COPY_AND_ASSIGN(WebDragSourceGtk); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace content | 113 } // namespace content |
| 114 | 114 |
| 115 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ | 115 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_SOURCE_GTK_H_ |
| OLD | NEW |