| 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 CHROME_BROWSER_UI_GTK_CUSTOM_DRAG_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_CUSTOM_DRAG_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_CUSTOM_DRAG_H_ | 6 #define CHROME_BROWSER_UI_GTK_CUSTOM_DRAG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "ui/base/gtk/gtk_signal.h" | 13 #include "ui/base/gtk/gtk_signal.h" |
| 14 | 14 |
| 15 class BookmarkNode; | 15 class BookmarkNode; |
| 16 class DownloadItem; | 16 class DownloadItem; |
| 17 class Profile; | 17 class Profile; |
| 18 | 18 |
| 19 namespace gfx { | 19 namespace gfx { |
| 20 class Image; | 20 class Image; |
| 21 } | 21 } |
| 22 | 22 |
| 23 // Base class for programatically generated drags. | 23 // Base class for programatically generated drags. |
| 24 class CustomDrag { | 24 class CustomDrag { |
| 25 protected: | 25 protected: |
| 26 explicit CustomDrag(gfx::Image* icon, int code_mask, GdkDragAction action); | 26 CustomDrag(gfx::Image* icon, int code_mask, GdkDragAction action); |
| 27 virtual ~CustomDrag(); | 27 virtual ~CustomDrag(); |
| 28 | 28 |
| 29 virtual void OnDragDataGet(GtkWidget* widget, GdkDragContext* context, | 29 virtual void OnDragDataGet(GtkWidget* widget, GdkDragContext* context, |
| 30 GtkSelectionData* selection_data, | 30 GtkSelectionData* selection_data, |
| 31 guint target_type, guint time) = 0; | 31 guint target_type, guint time) = 0; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 CHROMEGTK_CALLBACK_1(CustomDrag, void, OnDragBegin, GdkDragContext*); | 34 CHROMEGTK_CALLBACK_1(CustomDrag, void, OnDragBegin, GdkDragContext*); |
| 35 CHROMEGTK_CALLBACK_1(CustomDrag, void, OnDragEnd, GdkDragContext*); | 35 CHROMEGTK_CALLBACK_1(CustomDrag, void, OnDragEnd, GdkDragContext*); |
| 36 | 36 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 GtkSelectionData* selection_data, | 98 GtkSelectionData* selection_data, |
| 99 guint target_type, guint time); | 99 guint target_type, guint time); |
| 100 | 100 |
| 101 Profile* profile_; | 101 Profile* profile_; |
| 102 std::vector<const BookmarkNode*> nodes_; | 102 std::vector<const BookmarkNode*> nodes_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(BookmarkDrag); | 104 DISALLOW_COPY_AND_ASSIGN(BookmarkDrag); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 #endif // CHROME_BROWSER_UI_GTK_CUSTOM_DRAG_H_ | 107 #endif // CHROME_BROWSER_UI_GTK_CUSTOM_DRAG_H_ |
| OLD | NEW |