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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const BookmarkNode* node) OVERRIDE; | 53 const BookmarkNode* node) OVERRIDE; |
54 virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, | 54 virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, |
55 const BookmarkNode* node) OVERRIDE; | 55 const BookmarkNode* node) OVERRIDE; |
56 virtual void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) OVERRIDE; | 56 virtual void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) OVERRIDE; |
57 virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) OVERRIDE; | 57 virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) OVERRIDE; |
58 | 58 |
59 private: | 59 private: |
60 // Helper to actually dispatch an event to extension listeners. | 60 // Helper to actually dispatch an event to extension listeners. |
61 void DispatchEvent(Profile* profile, | 61 void DispatchEvent(Profile* profile, |
62 const char* event_name, | 62 const char* event_name, |
63 const std::string& json_args); | 63 scoped_ptr<base::ListValue> event_args); |
64 | 64 |
65 BookmarkModel* model_; | 65 BookmarkModel* model_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(BookmarkExtensionEventRouter); | 67 DISALLOW_COPY_AND_ASSIGN(BookmarkExtensionEventRouter); |
68 }; | 68 }; |
69 | 69 |
70 class BookmarksFunction : public AsyncExtensionFunction, | 70 class BookmarksFunction : public AsyncExtensionFunction, |
71 public content::NotificationObserver { | 71 public content::NotificationObserver { |
72 public: | 72 public: |
73 // AsyncExtensionFunction: | 73 // AsyncExtensionFunction: |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 OVERRIDE; | 288 OVERRIDE; |
289 | 289 |
290 private: | 290 private: |
291 virtual ~ExportBookmarksFunction() {} | 291 virtual ~ExportBookmarksFunction() {} |
292 | 292 |
293 // ExtensionFunction: | 293 // ExtensionFunction: |
294 virtual bool RunImpl() OVERRIDE; | 294 virtual bool RunImpl() OVERRIDE; |
295 }; | 295 }; |
296 | 296 |
297 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ | 297 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ |
OLD | NEW |