| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_GTK_DOWNLOAD_ITEM_DRAG_H_ | |
| 6 #define CHROME_BROWSER_GTK_DOWNLOAD_ITEM_DRAG_H_ | |
| 7 | |
| 8 #include <gtk/gtk.h> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 | |
| 12 class DownloadItem; | |
| 13 class SkBitmap; | |
| 14 | |
| 15 class DownloadItemDrag { | |
| 16 public: | |
| 17 // Sets |widget| as a source for drags pertaining to |item|. No | |
| 18 // DownloadItemDrag object is created. | |
| 19 static void SetSource(GtkWidget* widget, DownloadItem* item); | |
| 20 | |
| 21 // Creates a new DownloadItemDrag, the lifetime of which is tied to the | |
| 22 // system drag. | |
| 23 static void BeginDrag(const DownloadItem* item, SkBitmap* icon); | |
| 24 | |
| 25 private: | |
| 26 explicit DownloadItemDrag(const DownloadItem* item, SkBitmap* icon); | |
| 27 ~DownloadItemDrag(); | |
| 28 | |
| 29 static void OnDragBegin(GtkWidget* widget, | |
| 30 GdkDragContext* drag_context, | |
| 31 DownloadItemDrag* drag); | |
| 32 | |
| 33 static void OnDragEnd(GtkWidget* widget, | |
| 34 GdkDragContext* drag_context, | |
| 35 DownloadItemDrag* drag); | |
| 36 | |
| 37 GtkWidget* drag_widget_; | |
| 38 GdkPixbuf* pixbuf_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(DownloadItemDrag); | |
| 41 }; | |
| 42 | |
| 43 #endif // CHROME_BROWSER_GTK_DOWNLOAD_ITEM_DRAG_H_ | |
| OLD | NEW |