Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.h

Issue 6799017: Changes 'Open all' bookmarks to not recurse through nested folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void CloneBookmarkNode(BookmarkModel* model, 71 void CloneBookmarkNode(BookmarkModel* model,
72 const std::vector<BookmarkNodeData::Element>& elements, 72 const std::vector<BookmarkNodeData::Element>& elements,
73 const BookmarkNode* parent, 73 const BookmarkNode* parent,
74 int index_to_add_at); 74 int index_to_add_at);
75 75
76 // Begins dragging a folder of bookmarks. 76 // Begins dragging a folder of bookmarks.
77 void DragBookmarks(Profile* profile, 77 void DragBookmarks(Profile* profile,
78 const std::vector<const BookmarkNode*>& nodes, 78 const std::vector<const BookmarkNode*>& nodes,
79 gfx::NativeView view); 79 gfx::NativeView view);
80 80
81 // Recursively opens all bookmarks. |initial_disposition| dictates how the 81 // Opens all the bookmarks in |nodes| that are of type url and all the child
82 // first URL is opened, all subsequent URLs are opened as background tabs. 82 // bookmarks that are of type url for folders in |nodes|. |initial_disposition|
83 // |navigator| is used to open the URLs. If |navigator| is NULL the last 83 // dictates how the first URL is opened, all subsequent URLs are opened as
84 // tabbed browser with the profile |profile| is used. If there is no browser 84 // background tabs. |navigator| is used to open the URLs. If |navigator| is
85 // with the specified profile a new one is created. 85 // NULL the last tabbed browser with the profile |profile| is used. If there is
86 // no browser with the specified profile a new one is created.
86 void OpenAll(gfx::NativeWindow parent, 87 void OpenAll(gfx::NativeWindow parent,
87 Profile* profile, 88 Profile* profile,
88 PageNavigator* navigator, 89 PageNavigator* navigator,
89 const std::vector<const BookmarkNode*>& nodes, 90 const std::vector<const BookmarkNode*>& nodes,
90 WindowOpenDisposition initial_disposition); 91 WindowOpenDisposition initial_disposition);
91 92
92 // Convenience for opening a single BookmarkNode. 93 // Convenience for |OpenAll| with a single BookmarkNode.
93 void OpenAll(gfx::NativeWindow parent, 94 void OpenAll(gfx::NativeWindow parent,
94 Profile* profile, 95 Profile* profile,
95 PageNavigator* navigator, 96 PageNavigator* navigator,
96 const BookmarkNode* node, 97 const BookmarkNode* node,
97 WindowOpenDisposition initial_disposition); 98 WindowOpenDisposition initial_disposition);
98 99
99 // Copies nodes onto the clipboard. If |remove_nodes| is true the nodes are 100 // Copies nodes onto the clipboard. If |remove_nodes| is true the nodes are
100 // removed after copied to the clipboard. The nodes are copied in such a way 101 // removed after copied to the clipboard. The nodes are copied in such a way
101 // that if pasted again copies are made. 102 // that if pasted again copies are made.
102 void CopyToClipboard(BookmarkModel* model, 103 void CopyToClipboard(BookmarkModel* model,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Number of bookmarks we'll open before prompting the user to see if they 214 // Number of bookmarks we'll open before prompting the user to see if they
214 // really want to open all. 215 // really want to open all.
215 // 216 //
216 // NOTE: treat this as a const. It is not const as various tests change the 217 // NOTE: treat this as a const. It is not const as various tests change the
217 // value. 218 // value.
218 extern int num_urls_before_prompting; 219 extern int num_urls_before_prompting;
219 220
220 } // namespace bookmark_utils 221 } // namespace bookmark_utils
221 222
222 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 223 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698