OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 #include "base/basictypes.h" | |
12 | |
13 class BookmarkModel; | |
14 class BookmarkNode; | |
15 | |
16 namespace base { | |
17 class DictionaryValue; | |
18 class ListValue; | |
19 } | |
20 | |
21 // Helper functions. | |
22 namespace extension_bookmark_helpers { | |
23 | |
24 base::DictionaryValue* GetNodeDictionary(const BookmarkNode* node, | |
25 bool recurse, | |
26 bool only_folders); | |
27 | |
28 // Add a JSON representation of |node| to the JSON |list|. | |
29 void AddNode(const BookmarkNode* node, base::ListValue* list, bool recurse); | |
30 | |
31 void AddNodeFoldersOnly(const BookmarkNode* node, | |
32 base::ListValue* list, | |
33 bool recurse); | |
34 | |
35 bool RemoveNode(BookmarkModel* model, | |
36 int64 id, | |
37 bool recursive, | |
38 std::string* error); | |
39 | |
40 } // namespace extension_bookmark_helpers | |
41 | |
42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BOOKMARK_HELPERS_H_ | |
OLD | NEW |