diff options
Diffstat (limited to 'chrome/browser/cocoa/bookmark_button.h')
-rw-r--r-- | chrome/browser/cocoa/bookmark_button.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/bookmark_button.h b/chrome/browser/cocoa/bookmark_button.h index 62acadc..a40f23c 100644 --- a/chrome/browser/cocoa/bookmark_button.h +++ b/chrome/browser/cocoa/bookmark_button.h @@ -3,11 +3,13 @@ // found in the LICENSE file. #import <Cocoa/Cocoa.h> +#include <vector> #import "chrome/browser/cocoa/draggable_button.h" #include "webkit/glue/window_open_disposition.h" @class BookmarkBarFolderController; @class BookmarkButton; +class BookmarkDragData; class BookmarkModel; class BookmarkNode; @class BrowserWindowController; @@ -70,7 +72,7 @@ class ThemeProvider; // mode on the NTP. - (BOOL)dragShouldLockBarVisibility; -// Perform the actual DnD of a bookmark button. +// Perform the actual DnD of a bookmark or bookmark button. // |point| is in the base coordinate system of the destination window; // |it comes from an id<NSDraggingInfo>. |copy| is YES if a copy is to be @@ -81,6 +83,15 @@ class ThemeProvider; to:(NSPoint)point copy:(BOOL)copy; +// Determine if the pasteboard from |info| has dragging data containing +// bookmark(s) and perform the drag and return YES, otherwise return NO. +- (BOOL)dragBookmarkData:(id<NSDraggingInfo>)info; + +// Determine if the drag pasteboard has any drag data of type +// kBookmarkDictionaryListPboardType and, if so, return those elements +// otherwise return an empty vector. +- (std::vector<const BookmarkNode*>)retrieveBookmarkDragDataNodes; + // Return YES if we should show the drop indicator, else NO. In some // cases (e.g. hover open) we don't want to show the drop indicator. // |point| is in the base coordinate system of the destination window; @@ -94,8 +105,7 @@ class ThemeProvider; // |it comes from an id<NSDraggingInfo>. // TODO(viettrungluu,jrg): instead of this, make buttons move around. // http://crbug.com/35968 -- (CGFloat)indicatorPosForDragOfButton:(BookmarkButton*)sourceButton - toPoint:(NSPoint)point; +- (CGFloat)indicatorPosForDragToPoint:(NSPoint)point; // Return the theme provider associated with this browser window. - (ThemeProvider*)themeProvider; @@ -133,6 +143,15 @@ class ThemeProvider; - (void)addButtonForNode:(const BookmarkNode*)node atIndex:(NSInteger)buttonIndex; +// Given a list or |urls| and |titles|, create new bookmark nodes and add +// them to the bookmark model such that they will be 1) added to the folder +// represented by the button at |point| if it is a folder, or 2) inserted +// into the parent of the non-folder bookmark at |point| in front of that +// button. Returns YES if at least one bookmark was added. +// TODO(mrossetti): Change function to use a pair-like structure for +// URLs and titles. http://crbug.com/44411 +- (BOOL)addURLs:(NSArray*)urls withTitles:(NSArray*)titles at:(NSPoint)point; + // Move a button from one place in the menu to another. This is safe // to call when a folder menu window is open as that window will be updated. - (void)moveButtonFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex; |