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

Side by Side Diff: chrome/browser/extensions/api/cookies/cookies_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 // Defines the Chrome Extensions Cookies API functions for accessing internet 5 // Defines the Chrome Extensions Cookies API functions for accessing internet
6 // cookies, as specified in the extension API JSON. 6 // cookies, as specified in the extension API JSON.
7 7
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_
9 #define CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ 9 #define CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const content::NotificationDetails& details) OVERRIDE; 48 const content::NotificationDetails& details) OVERRIDE;
49 49
50 // Handler for the COOKIE_CHANGED event. The method takes the details of such 50 // Handler for the COOKIE_CHANGED event. The method takes the details of such
51 // an event and constructs a suitable JSON formatted extension event from it. 51 // an event and constructs a suitable JSON formatted extension event from it.
52 void CookieChanged(Profile* profile, 52 void CookieChanged(Profile* profile,
53 ChromeCookieDetails* details); 53 ChromeCookieDetails* details);
54 54
55 // This method dispatches events to the extension message service. 55 // This method dispatches events to the extension message service.
56 void DispatchEvent(Profile* context, 56 void DispatchEvent(Profile* context,
57 const char* event_name, 57 const char* event_name,
58 const std::string& json_args, 58 scoped_ptr<base::ListValue> event_args,
59 GURL& cookie_domain); 59 GURL& cookie_domain);
60 60
61 // Used for tracking registrations to CookieMonster notifications. 61 // Used for tracking registrations to CookieMonster notifications.
62 content::NotificationRegistrar registrar_; 62 content::NotificationRegistrar registrar_;
63 63
64 Profile* profile_; 64 Profile* profile_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(ExtensionCookiesEventRouter); 66 DISALLOW_COPY_AND_ASSIGN(ExtensionCookiesEventRouter);
67 }; 67 };
68 68
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 // ExtensionFunction: 195 // ExtensionFunction:
196 // GetAllCookieStoresFunction is sync. 196 // GetAllCookieStoresFunction is sync.
197 virtual void Run() OVERRIDE; 197 virtual void Run() OVERRIDE;
198 virtual bool RunImpl() OVERRIDE; 198 virtual bool RunImpl() OVERRIDE;
199 }; 199 };
200 200
201 } // namespace extensions 201 } // namespace extensions
202 202
203 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ 203 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/app/app_api.cc ('k') | chrome/browser/extensions/api/cookies/cookies_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698