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_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 // can't be created based on the given details, sets error_ and returns NULL. | 139 // can't be created based on the given details, sets error_ and returns NULL. |
140 const BookmarkNode* CreateBookmarkNode( | 140 const BookmarkNode* CreateBookmarkNode( |
141 BookmarkModel* model, | 141 BookmarkModel* model, |
142 const api::bookmarks::CreateDetails& details, | 142 const api::bookmarks::CreateDetails& details, |
143 const BookmarkNode::MetaInfoMap* meta_info); | 143 const BookmarkNode::MetaInfoMap* meta_info); |
144 | 144 |
145 // Helper that checks if bookmark editing is enabled. If it's not, this sets | 145 // Helper that checks if bookmark editing is enabled. If it's not, this sets |
146 // error_ to the appropriate error string. | 146 // error_ to the appropriate error string. |
147 bool EditBookmarksEnabled(); | 147 bool EditBookmarksEnabled(); |
148 | 148 |
149 // Helper that checks if |node| can be modified. Returns false if |node| | |
150 // is NULL, or a managed node, or the root node. In these cases the node | |
151 // can't be edited, can't have new child nodes appended, and its direct | |
152 // children can't be moved or reordered. | |
not at google - send to devlin
2014/06/03 18:09:16
I'm a little confused by this comment. Why does, f
Joao da Silva
2014/06/05 17:10:32
Note that there is _the_ root node, and there are
| |
153 bool CanBeModified(const BookmarkNode* node); | |
154 | |
149 private: | 155 private: |
150 // BaseBookmarkModelObserver: | 156 // BaseBookmarkModelObserver: |
151 virtual void BookmarkModelChanged() OVERRIDE; | 157 virtual void BookmarkModelChanged() OVERRIDE; |
152 virtual void BookmarkModelLoaded(BookmarkModel* model, | 158 virtual void BookmarkModelLoaded(BookmarkModel* model, |
153 bool ids_reassigned) OVERRIDE; | 159 bool ids_reassigned) OVERRIDE; |
154 }; | 160 }; |
155 | 161 |
156 class BookmarksGetFunction : public BookmarksFunction { | 162 class BookmarksGetFunction : public BookmarksFunction { |
157 public: | 163 public: |
158 DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) | 164 DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 private: | 360 private: |
355 virtual ~BookmarksExportFunction() {} | 361 virtual ~BookmarksExportFunction() {} |
356 | 362 |
357 // BookmarksFunction: | 363 // BookmarksFunction: |
358 virtual bool RunOnReady() OVERRIDE; | 364 virtual bool RunOnReady() OVERRIDE; |
359 }; | 365 }; |
360 | 366 |
361 } // namespace extensions | 367 } // namespace extensions |
362 | 368 |
363 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ | 369 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ |
OLD | NEW |