From e160e832bc9801b211772a6fb4fca49145a64f76 Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Thu, 25 Mar 2010 17:06:12 +0000 Subject: Makes adding a new folder from the bookmark context menu add the folder right after the selected item (when possible) rather than as the last element. BUG=9240 TEST=see bug Review URL: http://codereview.chromium.org/1253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42628 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/bookmarks/bookmark_utils.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome/browser/bookmarks/bookmark_utils.h') diff --git a/chrome/browser/bookmarks/bookmark_utils.h b/chrome/browser/bookmarks/bookmark_utils.h index db1bfda..ed7f850 100644 --- a/chrome/browser/bookmarks/bookmark_utils.h +++ b/chrome/browser/bookmarks/bookmark_utils.h @@ -200,6 +200,15 @@ void GetURLAndTitleToBookmark(TabContents* tab_contents, void GetURLsForOpenTabs(Browser* browser, std::vector >* urls); +// Returns the parent for newly created folders/bookmarks. If |selection| has +// one element and it is a folder, |selection[0]| is returned, otherwise +// |parent| is returned. If |index| is non-null it is set to the index newly +// added nodes should be added at. +const BookmarkNode* GetParentForNewNodes( + const BookmarkNode* parent, + const std::vector& selection, + int* index); + // Number of bookmarks we'll open before prompting the user to see if they // really want to open all. // -- cgit v1.1