summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 14:51:10 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 14:51:10 +0000
commit0f45ad9fcb012f986db63fad604ff30976168434 (patch)
tree28f957e304782a4bf6bb88516113fa725fcd4da6 /chrome/browser/cocoa/bookmark_bar_folder_controller.mm
parent173e5e807c62bb789ad46598e46367e019180568 (diff)
downloadchromium_src-0f45ad9fcb012f986db63fad604ff30976168434.zip
chromium_src-0f45ad9fcb012f986db63fad604ff30976168434.tar.gz
chromium_src-0f45ad9fcb012f986db63fad604ff30976168434.tar.bz2
Share pasteboard population code between the BookmarkBarController and the BookmarkBarFolderController. Now all bookmarks can be dragged to the desktop, the tab strip, or other windows to load, even ones in folders.
BUG=40834 TEST=see bug. Test bookmarks on the bookmark bar didn't regress. Review URL: http://codereview.chromium.org/1549037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_folder_controller.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_folder_controller.mm23
1 files changed, 2 insertions, 21 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_folder_controller.mm b/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
index bb904e2..a7353f2 100644
--- a/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_folder_controller.mm
@@ -450,29 +450,10 @@ const CGFloat kBookmarkBarFolderScrollAmount =
return parentButton_.get();
}
-// Ugh... copied from bookmark_bar_controller.mm
-// Is it worth it to factor out for, essentially, 2 lines?
-// TODO(jrg): answer is probably yes.
-// http://crbug.com/35966
+// Delegate method. Shared implementation with BookmarkBarController.
- (void)fillPasteboard:(NSPasteboard*)pboard
forDragOfButton:(BookmarkButton*)button {
- const BookmarkNode* node = [button bookmarkNode];
- if (node) {
- // Put the bookmark information into the pasteboard, and then write our own
- // data for |kBookmarkButtonDragType|.
-
- /* // TODO(jrg): combine code
- -[BookmarkBarController copyBookmarkNode:node
- toPasteboard:pboard];
- */
- [pboard declareTypes:[NSArray arrayWithObject:kBookmarkButtonDragType]
- owner:button];
- [pboard setData:[NSData dataWithBytes:&button length:sizeof(button)]
- forType:kBookmarkButtonDragType];
-
- } else {
- NOTREACHED();
- }
+ [[self folderTarget] fillPasteboard:pboard forDragOfButton:button];
}
// Find something like std::is_between<T>? I can't believe one doesn't exist.