OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "chrome/browser/bookmarks/bookmark_editor.h" | 12 #include "chrome/browser/bookmarks/bookmark_editor.h" |
13 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 13 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
14 #include "chrome/browser/history/snippet.h" | 14 #include "chrome/browser/history/snippet.h" |
15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
16 | 16 |
17 class BookmarkModel; | 17 class BookmarkModel; |
18 class BookmarkNode; | 18 class BookmarkNode; |
19 class Browser; | 19 class Browser; |
20 class PrefServiceSyncable; | 20 class PrefRegistrySyncable; |
21 class Profile; | 21 class Profile; |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 class BrowserContext; | 24 class BrowserContext; |
25 } | 25 } |
26 | 26 |
27 namespace ui { | 27 namespace ui { |
28 class DropTargetEvent; | 28 class DropTargetEvent; |
29 } | 29 } |
30 | 30 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // is explicitly being added, returns a pointer to the new node that was | 153 // is explicitly being added, returns a pointer to the new node that was |
154 // created. Otherwise the return value is identically |node|. | 154 // created. Otherwise the return value is identically |node|. |
155 const BookmarkNode* ApplyEditsWithPossibleFolderChange( | 155 const BookmarkNode* ApplyEditsWithPossibleFolderChange( |
156 BookmarkModel* model, | 156 BookmarkModel* model, |
157 const BookmarkNode* new_parent, | 157 const BookmarkNode* new_parent, |
158 const BookmarkEditor::EditDetails& details, | 158 const BookmarkEditor::EditDetails& details, |
159 const string16& new_title, | 159 const string16& new_title, |
160 const GURL& new_url); | 160 const GURL& new_url); |
161 | 161 |
162 // Register user preferences for BookmarksBar. | 162 // Register user preferences for BookmarksBar. |
163 void RegisterUserPrefs(PrefServiceSyncable* prefs); | 163 void RegisterUserPrefs(PrefRegistrySyncable* registry); |
164 | 164 |
165 // Returns the parent for newly created folders/bookmarks. If |selection| has | 165 // Returns the parent for newly created folders/bookmarks. If |selection| has |
166 // one element and it is a folder, |selection[0]| is returned, otherwise | 166 // one element and it is a folder, |selection[0]| is returned, otherwise |
167 // |parent| is returned. If |index| is non-null it is set to the index newly | 167 // |parent| is returned. If |index| is non-null it is set to the index newly |
168 // added nodes should be added at. | 168 // added nodes should be added at. |
169 const BookmarkNode* GetParentForNewNodes( | 169 const BookmarkNode* GetParentForNewNodes( |
170 const BookmarkNode* parent, | 170 const BookmarkNode* parent, |
171 const std::vector<const BookmarkNode*>& selection, | 171 const std::vector<const BookmarkNode*>& selection, |
172 int* index); | 172 int* index); |
173 | 173 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 void RecordBookmarkLaunch(BookmarkLaunchLocation location); | 218 void RecordBookmarkLaunch(BookmarkLaunchLocation location); |
219 | 219 |
220 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(USE_AURA) | 220 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(USE_AURA) |
221 void DisableBookmarkBarViewAnimationsForTesting(bool disabled); | 221 void DisableBookmarkBarViewAnimationsForTesting(bool disabled); |
222 bool IsBookmarkBarViewAnimationsDisabled(); | 222 bool IsBookmarkBarViewAnimationsDisabled(); |
223 #endif | 223 #endif |
224 | 224 |
225 } // namespace bookmark_utils | 225 } // namespace bookmark_utils |
226 | 226 |
227 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 227 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |