summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_controller.h
diff options
context:
space:
mode:
authormrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 17:11:02 +0000
committermrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 17:11:02 +0000
commit4ac884b18f10f3ae3a5daafbfa25f4545dd401ce (patch)
treedaca6e7903d29ccf169723a88265574f1fa90d29 /chrome/browser/cocoa/bookmark_bar_controller.h
parentb808eb6f0f47a7c4ad15dd8ec115404ce14b47b6 (diff)
downloadchromium_src-4ac884b18f10f3ae3a5daafbfa25f4545dd401ce.zip
chromium_src-4ac884b18f10f3ae3a5daafbfa25f4545dd401ce.tar.gz
chromium_src-4ac884b18f10f3ae3a5daafbfa25f4545dd401ce.tar.bz2
Implement drag from bookmark manager to bookmark bar or a folder thereof. Implement drag of other bookmark and URL sources such as from the Desktop or a text selection.
BUG=39884,44228 TEST=Note: For all drag operations verify that the appropriate drop indicator is presented while dragging. When dragging onto a bookmark bar folder the folder button should be highlighted and, after a short delay, open into a menu. When dragging between folders or on top of a non-folder bookmark an insertion bar (vertical when in the bookmark bar, horizontal when in a folder menu) should be presented. For 'copy' moves the drag image should be adorned with a plus sign in a green circle. A non-copy move should show no such tag. 1) Drag a non-folder bookmark from the bookmark manager to the bookmark bar such that it falls on a non-folder bookmark. Verify that the bookmark is moved to be on the bar just before the bookmark upon which is was dropped. 2) Drag a folder bookmark from the manager to the bookmark bar such that it falls on a non-folder bookmark. Verify that the folder (as a folder) is moved to be on the bar just before the bookmark upon which is was dropped. 3) Drag a bookmark from the manager to a folder on the bookmark bar. Verify that the bookmark is added to the folder at the end and removed from the old location in the manager. 4) Drag a bookmark from the manager to a folder on the bookmark bar and wait for the folder to open and then drag to within the folder. Verify that dropping places the bookmark and removes it from the old location in the manager. 5) Drag a bookmark from the bar to the manager and verify that the manager now shows the dragged bookmark. (Note that this should be a 'move' but is currently a 'copy'. See http://crbug.com/44039.) 6) Drag a bookmark clipping from the Finder Desktop to the bookmark bar. Verify that it is added to the bar as a new bookmark. 7) Drag a bookmark clipping from the Finder Desktop to a folder on the bookmark bar and drop it within the folder menu. Verify that it is added to the folder as a new bookmark. 8) Create a URL in TextEdit or Stickies, select it and drag to the bookmark bar. Verify that it is added to the bar. 9) Create a URL in TextEdit or Stickies, select it and drag to a folder on the bookmark bar and drop it within the folder menu. Verify that it is added to the folder. Review URL: http://codereview.chromium.org/2066001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.h')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.h b/chrome/browser/cocoa/bookmark_bar_controller.h
index 9804be3..bde2cc2 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.h
+++ b/chrome/browser/cocoa/bookmark_bar_controller.h
@@ -261,9 +261,6 @@ willAnimateFromState:(bookmarks::VisualState)oldState
// shouldn't be shown.
- (CGFloat)toolbarDividerOpacity;
-// Returns true if at least one bookmark was added.
-- (BOOL)addURLs:(NSArray*)urls withTitles:(NSArray*)titles at:(NSPoint)point;
-
// Updates the sizes and positions of the subviews.
// TODO(viettrungluu): I'm not convinced this should be public, but I currently
// need it for animations. Try not to propagate its use.
@@ -278,6 +275,16 @@ willAnimateFromState:(bookmarks::VisualState)oldState
// Provide a favIcon for a bookmark node. May return nil.
- (NSImage*)favIconForNode:(const BookmarkNode*)node;
+// Used for situations where the bookmark bar folder menus should no longer
+// be actively popping up. Called when the window loses focus, a click has
+// occured outside the menus or a bookmark has been activated. (Note that this
+// differs from the behavior of the -[BookmarkButtonControllerProtocol
+// closeAllBookmarkFolders] method in that the latter does not terminate menu
+// tracking since it may be being called in response to actions (such as
+// dragging) where a 'stale' menu presentation should first be collapsed before
+// presenting a new menu.)
+- (void)closeFolderAndStopTrackingMenus;
+
// Actions for manipulating bookmarks.
// Open a normal bookmark or folder from a button, ...
- (IBAction)openBookmark:(id)sender;
@@ -351,9 +358,4 @@ willAnimateFromState:(bookmarks::VisualState)oldState
@end
-// The (internal) |NSPasteboard| type string for bookmark button drags, used for
-// dragging buttons around the bookmark bar. The data for this type is just a
-// pointer to the |BookmarkButton| being dragged.
-extern NSString* kBookmarkButtonDragType;
-
#endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_