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