OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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_UI_GTK_BOOKMARKS_BOOKMARK_DRAG_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_DRAG_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/ui/gtk/custom_drag.h" |
| 13 |
| 14 class BookmarkNode; |
| 15 class Profile; |
| 16 |
| 17 // Encapsulates functionality for drags of one or more bookmarks. |
| 18 class BookmarkDrag : public CustomDrag { |
| 19 public: |
| 20 // Creates a new BookmarkDrag, the lifetime of which is tied to the system |
| 21 // drag. |
| 22 static void BeginDrag(Profile* profile, |
| 23 const std::vector<const BookmarkNode*>& nodes); |
| 24 |
| 25 private: |
| 26 BookmarkDrag(Profile* profile, const std::vector<const BookmarkNode*>& nodes); |
| 27 virtual ~BookmarkDrag(); |
| 28 |
| 29 virtual void OnDragDataGet(GtkWidget* widget, |
| 30 GdkDragContext* context, |
| 31 GtkSelectionData* selection_data, |
| 32 guint target_type, |
| 33 guint time) OVERRIDE; |
| 34 |
| 35 Profile* profile_; |
| 36 std::vector<const BookmarkNode*> nodes_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(BookmarkDrag); |
| 39 }; |
| 40 |
| 41 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_DRAG_H_ |
OLD | NEW |