| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 10 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 BookmarkNode* drop_parent, | 35 BookmarkNode* drop_parent, |
| 36 int index); | 36 int index); |
| 37 | 37 |
| 38 // Clones drag data, adding newly created nodes to |parent| starting at | 38 // Clones drag data, adding newly created nodes to |parent| starting at |
| 39 // |index_to_add_at|. | 39 // |index_to_add_at|. |
| 40 void CloneDragData(BookmarkModel* model, | 40 void CloneDragData(BookmarkModel* model, |
| 41 const std::vector<BookmarkDragData::Element>& elements, | 41 const std::vector<BookmarkDragData::Element>& elements, |
| 42 BookmarkNode* parent, | 42 BookmarkNode* parent, |
| 43 int index_to_add_at); | 43 int index_to_add_at); |
| 44 | 44 |
| 45 #if defined(OS_WIN) |
| 46 // TODO(port): Make OpenAll portable (remove HWND). |
| 47 |
| 45 // Recursively opens all bookmarks. |initial_disposition| dictates how the | 48 // Recursively opens all bookmarks. |initial_disposition| dictates how the |
| 46 // first URL is opened, all subsequent URLs are opened as background tabs. | 49 // first URL is opened, all subsequent URLs are opened as background tabs. |
| 47 // |navigator| is used to open the URLs. If |navigator| is NULL the last | 50 // |navigator| is used to open the URLs. If |navigator| is NULL the last |
| 48 // tabbed browser with the profile |profile| is used. If there is no browser | 51 // tabbed browser with the profile |profile| is used. If there is no browser |
| 49 // with the specified profile a new one is created. | 52 // with the specified profile a new one is created. |
| 50 void OpenAll(HWND parent, | 53 void OpenAll(HWND parent, |
| 51 Profile* profile, | 54 Profile* profile, |
| 52 PageNavigator* navigator, | 55 PageNavigator* navigator, |
| 53 const std::vector<BookmarkNode*>& nodes, | 56 const std::vector<BookmarkNode*>& nodes, |
| 54 WindowOpenDisposition initial_disposition); | 57 WindowOpenDisposition initial_disposition); |
| 55 | 58 |
| 56 // Convenience for opening a single BookmarkNode. | 59 // Convenience for opening a single BookmarkNode. |
| 57 void OpenAll(HWND parent, | 60 void OpenAll(HWND parent, |
| 58 Profile* profile, | 61 Profile* profile, |
| 59 PageNavigator* navigator, | 62 PageNavigator* navigator, |
| 60 BookmarkNode* node, | 63 BookmarkNode* node, |
| 61 WindowOpenDisposition initial_disposition); | 64 WindowOpenDisposition initial_disposition); |
| 65 #endif // defined(OS_WIN) |
| 62 | 66 |
| 63 // Copies nodes onto the clipboard. If |remove_nodes| is true the nodes are | 67 // Copies nodes onto the clipboard. If |remove_nodes| is true the nodes are |
| 64 // removed after copied to the clipboard. The nodes are copied in such a way | 68 // removed after copied to the clipboard. The nodes are copied in such a way |
| 65 // that if pasted again copies are made. | 69 // that if pasted again copies are made. |
| 66 void CopyToClipboard(BookmarkModel* model, | 70 void CopyToClipboard(BookmarkModel* model, |
| 67 const std::vector<BookmarkNode*>& nodes, | 71 const std::vector<BookmarkNode*>& nodes, |
| 68 bool remove_nodes); | 72 bool remove_nodes); |
| 69 | 73 |
| 70 // Pastes from the clipboard. The new nodes are added to |parent|, unless | 74 // Pastes from the clipboard. The new nodes are added to |parent|, unless |
| 71 // |parent| is null in which case this does nothing. The nodes are inserted | 75 // |parent| is null in which case this does nothing. The nodes are inserted |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Number of bookmarks we'll open before prompting the user to see if they | 124 // Number of bookmarks we'll open before prompting the user to see if they |
| 121 // really want to open all. | 125 // really want to open all. |
| 122 // | 126 // |
| 123 // NOTE: treat this as a const. It is not const as various tests change the | 127 // NOTE: treat this as a const. It is not const as various tests change the |
| 124 // value. | 128 // value. |
| 125 extern int num_urls_before_prompting; | 129 extern int num_urls_before_prompting; |
| 126 | 130 |
| 127 } // namespace bookmark_utils | 131 } // namespace bookmark_utils |
| 128 | 132 |
| 129 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 133 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
| OLD | NEW |