diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-25 17:06:12 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-25 17:06:12 +0000 |
commit | e160e832bc9801b211772a6fb4fca49145a64f76 (patch) | |
tree | fd2856c6d57c8751b9b9ca7af087d6d344d66266 /chrome/browser/bookmarks/bookmark_utils.h | |
parent | 060217d15f3b1b204f930b6c08329b8c353d1928 (diff) | |
download | chromium_src-e160e832bc9801b211772a6fb4fca49145a64f76.zip chromium_src-e160e832bc9801b211772a6fb4fca49145a64f76.tar.gz chromium_src-e160e832bc9801b211772a6fb4fca49145a64f76.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_utils.h')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
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<std::pair<GURL, std::wstring> >* 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<const BookmarkNode*>& selection, + int* index); + // Number of bookmarks we'll open before prompting the user to see if they // really want to open all. // |