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

Side by Side Diff: chrome/browser/extensions/api/cookies/cookies_api.h

Issue 11366074: Coalesce event router Init calls into their constructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa Created 8 years, 1 month 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 16 matching lines...) Expand all
27 27
28 namespace extensions { 28 namespace extensions {
29 29
30 // Observes CookieMonster notifications and routes them as events to the 30 // Observes CookieMonster notifications and routes them as events to the
31 // extension system. 31 // extension system.
32 class ExtensionCookiesEventRouter : public content::NotificationObserver { 32 class ExtensionCookiesEventRouter : public content::NotificationObserver {
33 public: 33 public:
34 explicit ExtensionCookiesEventRouter(Profile* profile); 34 explicit ExtensionCookiesEventRouter(Profile* profile);
35 virtual ~ExtensionCookiesEventRouter(); 35 virtual ~ExtensionCookiesEventRouter();
36 36
37 void Init();
38
39 private: 37 private:
40 // content::NotificationObserver implementation. 38 // content::NotificationObserver implementation.
41 virtual void Observe(int type, 39 virtual void Observe(int type,
42 const content::NotificationSource& source, 40 const content::NotificationSource& source,
43 const content::NotificationDetails& details) OVERRIDE; 41 const content::NotificationDetails& details) OVERRIDE;
44 42
45 // Handler for the COOKIE_CHANGED event. The method takes the details of such 43 // Handler for the COOKIE_CHANGED event. The method takes the details of such
46 // an event and constructs a suitable JSON formatted extension event from it. 44 // an event and constructs a suitable JSON formatted extension event from it.
47 void CookieChanged(Profile* profile, ChromeCookieDetails* details); 45 void CookieChanged(Profile* profile, ChromeCookieDetails* details);
48 46
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 186
189 // ExtensionFunction: 187 // ExtensionFunction:
190 // GetAllCookieStoresFunction is sync. 188 // GetAllCookieStoresFunction is sync.
191 virtual void Run() OVERRIDE; 189 virtual void Run() OVERRIDE;
192 virtual bool RunImpl() OVERRIDE; 190 virtual bool RunImpl() OVERRIDE;
193 }; 191 };
194 192
195 } // namespace extensions 193 } // namespace extensions
196 194
197 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ 195 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_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