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