Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: chrome/browser/bookmarks/bookmark_extension_api.h

Issue 10694085: Refactor extension event distribution to use Values instead of JSON strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing memory leak in a test. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_extension_api.cc ('k') | chrome/browser/bookmarks/bookmark_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698