| 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_EXTENSION_API_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class ListValue; | 23 class ListValue; |
| 24 } | 24 } |
| 25 | 25 |
| 26 // Observes BookmarkModel and then routes the notifications as events to | 26 // Observes BookmarkModel and then routes the notifications as events to |
| 27 // the extension system. | 27 // the extension system. |
| 28 class BookmarkExtensionEventRouter : public BookmarkModelObserver { | 28 class BookmarkExtensionEventRouter : public BookmarkModelObserver { |
| 29 public: | 29 public: |
| 30 explicit BookmarkExtensionEventRouter(BookmarkModel* model); | 30 explicit BookmarkExtensionEventRouter(BookmarkModel* model); |
| 31 virtual ~BookmarkExtensionEventRouter(); | 31 virtual ~BookmarkExtensionEventRouter(); |
| 32 | 32 |
| 33 void Init(); | |
| 34 | |
| 35 // BookmarkModelObserver: | 33 // BookmarkModelObserver: |
| 36 virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE; | 34 virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE; |
| 37 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE; | 35 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE; |
| 38 virtual void BookmarkNodeMoved(BookmarkModel* model, | 36 virtual void BookmarkNodeMoved(BookmarkModel* model, |
| 39 const BookmarkNode* old_parent, | 37 const BookmarkNode* old_parent, |
| 40 int old_index, | 38 int old_index, |
| 41 const BookmarkNode* new_parent, | 39 const BookmarkNode* new_parent, |
| 42 int new_index) OVERRIDE; | 40 int new_index) OVERRIDE; |
| 43 virtual void BookmarkNodeAdded(BookmarkModel* model, | 41 virtual void BookmarkNodeAdded(BookmarkModel* model, |
| 44 const BookmarkNode* parent, | 42 const BookmarkNode* parent, |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 OVERRIDE; | 286 OVERRIDE; |
| 289 | 287 |
| 290 private: | 288 private: |
| 291 virtual ~ExportBookmarksFunction() {} | 289 virtual ~ExportBookmarksFunction() {} |
| 292 | 290 |
| 293 // ExtensionFunction: | 291 // ExtensionFunction: |
| 294 virtual bool RunImpl() OVERRIDE; | 292 virtual bool RunImpl() OVERRIDE; |
| 295 }; | 293 }; |
| 296 | 294 |
| 297 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ | 295 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ |
| OLD | NEW |