// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ #include #include "base/string16.h" #include "ui/gfx/native_widget_types.h" #include "webkit/glue/window_open_disposition.h" class BookmarkNode; class Browser; class GURL; namespace content { class PageNavigator; class WebContents; } namespace chrome { // Opens all the bookmarks in |nodes| that are of type url and all the child // bookmarks that are of type url for folders in |nodes|. |initial_disposition| // dictates how the first URL is opened, all subsequent URLs are opened as // background tabs. |navigator| is used to open the URLs. void OpenAll(gfx::NativeWindow parent, content::PageNavigator* navigator, const std::vector& nodes, WindowOpenDisposition initial_disposition); // Convenience for OpenAll() with a single BookmarkNode. void OpenAll(gfx::NativeWindow parent, content::PageNavigator* navigator, const BookmarkNode* node, WindowOpenDisposition initial_disposition); // Asks the user before deleting a non-empty bookmark folder. bool ConfirmDeleteBookmarkNode(const BookmarkNode* node, gfx::NativeWindow window); // Shows the bookmark all tabs dialog. void ShowBookmarkAllTabsDialog(Browser* browser); // Returns true if |selection| has at least one bookmark of type url. bool HasBookmarkURLs(const std::vector& selection); // Fills in the URL and title for a bookmark of |web_contents|. void GetURLAndTitleToBookmark(content::WebContents* web_contents, GURL* url, string16* title); } // namespace chrome #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_