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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Helper that checks if |node| can be modified. Returns false if |node| | 155 // Helper that checks if |node| can be modified. Returns false if |node| |
156 // is NULL, or a managed node, or the root node. In these cases the node | 156 // is NULL, or a managed node, or the root node. In these cases the node |
157 // can't be edited, can't have new child nodes appended, and its direct | 157 // can't be edited, can't have new child nodes appended, and its direct |
158 // children can't be moved or reordered. | 158 // children can't be moved or reordered. |
159 bool CanBeModified(const BookmarkNode* node); | 159 bool CanBeModified(const BookmarkNode* node); |
160 | 160 |
161 private: | 161 private: |
162 // BaseBookmarkModelObserver: | 162 // BaseBookmarkModelObserver: |
163 void BookmarkModelChanged() override; | 163 void BookmarkModelChanged() override; |
164 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; | 164 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; |
| 165 |
| 166 void RunAndSendResponse(); |
165 }; | 167 }; |
166 | 168 |
167 class BookmarksGetFunction : public BookmarksFunction { | 169 class BookmarksGetFunction : public BookmarksFunction { |
168 public: | 170 public: |
169 DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) | 171 DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) |
170 | 172 |
171 protected: | 173 protected: |
172 ~BookmarksGetFunction() override {} | 174 ~BookmarksGetFunction() override {} |
173 | 175 |
174 // BookmarksFunction: | 176 // BookmarksFunction: |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 private: | 352 private: |
351 ~BookmarksExportFunction() override {} | 353 ~BookmarksExportFunction() override {} |
352 | 354 |
353 // BookmarksFunction: | 355 // BookmarksFunction: |
354 bool RunOnReady() override; | 356 bool RunOnReady() override; |
355 }; | 357 }; |
356 | 358 |
357 } // namespace extensions | 359 } // namespace extensions |
358 | 360 |
359 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ | 361 #endif // CHROME_BROWSER_EXTENSIONS_API_BOOKMARKS_BOOKMARKS_API_H_ |
OLD | NEW |