summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_utils.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_utils.h b/chrome/browser/bookmarks/bookmark_utils.h
index 9419731..26e60ef 100644
--- a/chrome/browser/bookmarks/bookmark_utils.h
+++ b/chrome/browser/bookmarks/bookmark_utils.h
@@ -17,6 +17,10 @@ class BookmarkNode;
class PageNavigator;
class Profile;
+namespace views {
+class DropTargetEvent;
+}
+
// A collection of bookmark utility functions used by various parts of the UI
// that show bookmarks: bookmark manager, bookmark bar view ...
namespace bookmark_utils {
@@ -26,6 +30,25 @@ namespace bookmark_utils {
// COPY, LINK then MOVE.
int PreferredDropOperation(int source_operations, int operations);
+// Returns the drag operations for the specified node.
+int BookmarkDragOperation(BookmarkNode* node);
+
+// Returns the preferred drop operation on a bookmark menu/bar.
+// |parent| is the parent node the drop is to occur on and |index| the index the
+// drop is over.
+int BookmarkDropOperation(Profile* profile,
+ const views::DropTargetEvent& event,
+ const BookmarkDragData& data,
+ BookmarkNode* parent,
+ int index);
+
+// Performs a drop of bookmark data onto |parent_node| at |index|. Returns the
+// type of drop the resulted.
+int PerformBookmarkDrop(Profile* profile,
+ const BookmarkDragData& data,
+ BookmarkNode* parent_node,
+ int index);
+
// Returns true if the bookmark data can be dropped on |drop_parent| at
// |index|. A drop from a separate profile is always allowed, where as
// a drop from the same profile is only allowed if none of the nodes in