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 PrefServiceBase; | 20 class PrefServiceSyncable; |
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // is explicitly being added, returns a pointer to the new node that was | 157 // is explicitly being added, returns a pointer to the new node that was |
158 // created. Otherwise the return value is identically |node|. | 158 // created. Otherwise the return value is identically |node|. |
159 const BookmarkNode* ApplyEditsWithPossibleFolderChange( | 159 const BookmarkNode* ApplyEditsWithPossibleFolderChange( |
160 BookmarkModel* model, | 160 BookmarkModel* model, |
161 const BookmarkNode* new_parent, | 161 const BookmarkNode* new_parent, |
162 const BookmarkEditor::EditDetails& details, | 162 const BookmarkEditor::EditDetails& details, |
163 const string16& new_title, | 163 const string16& new_title, |
164 const GURL& new_url); | 164 const GURL& new_url); |
165 | 165 |
166 // Register user preferences for BookmarksBar. | 166 // Register user preferences for BookmarksBar. |
167 void RegisterUserPrefs(PrefServiceBase* prefs); | 167 void RegisterUserPrefs(PrefServiceSyncable* prefs); |
168 | 168 |
169 // Returns the parent for newly created folders/bookmarks. If |selection| has | 169 // Returns the parent for newly created folders/bookmarks. If |selection| has |
170 // one element and it is a folder, |selection[0]| is returned, otherwise | 170 // one element and it is a folder, |selection[0]| is returned, otherwise |
171 // |parent| is returned. If |index| is non-null it is set to the index newly | 171 // |parent| is returned. If |index| is non-null it is set to the index newly |
172 // added nodes should be added at. | 172 // added nodes should be added at. |
173 const BookmarkNode* GetParentForNewNodes( | 173 const BookmarkNode* GetParentForNewNodes( |
174 const BookmarkNode* parent, | 174 const BookmarkNode* parent, |
175 const std::vector<const BookmarkNode*>& selection, | 175 const std::vector<const BookmarkNode*>& selection, |
176 int* index); | 176 int* index); |
177 | 177 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 void RecordBookmarkLaunch(BookmarkLaunchLocation location); | 222 void RecordBookmarkLaunch(BookmarkLaunchLocation location); |
223 | 223 |
224 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(USE_AURA) | 224 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(USE_AURA) |
225 void DisableBookmarkBarViewAnimationsForTesting(bool disabled); | 225 void DisableBookmarkBarViewAnimationsForTesting(bool disabled); |
226 bool IsBookmarkBarViewAnimationsDisabled(); | 226 bool IsBookmarkBarViewAnimationsDisabled(); |
227 #endif | 227 #endif |
228 | 228 |
229 } // namespace bookmark_utils | 229 } // namespace bookmark_utils |
230 | 230 |
231 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 231 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |