OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 chrome/common/extensions/api/extension_api.json. | 6 // cookies, as specified in chrome/common/extensions/api/extension_api.json. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_ |
9 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 19 matching lines...) Expand all Loading... |
30 // extension system. | 30 // extension system. |
31 class ExtensionCookiesEventRouter : public NotificationObserver { | 31 class ExtensionCookiesEventRouter : public NotificationObserver { |
32 public: | 32 public: |
33 explicit ExtensionCookiesEventRouter(Profile* profile); | 33 explicit ExtensionCookiesEventRouter(Profile* profile); |
34 virtual ~ExtensionCookiesEventRouter(); | 34 virtual ~ExtensionCookiesEventRouter(); |
35 | 35 |
36 void Init(); | 36 void Init(); |
37 | 37 |
38 private: | 38 private: |
39 // NotificationObserver implementation. | 39 // NotificationObserver implementation. |
40 virtual void Observe(NotificationType type, | 40 virtual void Observe(int type, |
41 const NotificationSource& source, | 41 const NotificationSource& source, |
42 const NotificationDetails& details); | 42 const NotificationDetails& details); |
43 | 43 |
44 // Handler for the COOKIE_CHANGED event. The method takes the details of such | 44 // Handler for the COOKIE_CHANGED event. The method takes the details of such |
45 // an event and constructs a suitable JSON formatted extension event from it. | 45 // an event and constructs a suitable JSON formatted extension event from it. |
46 void CookieChanged(Profile* profile, | 46 void CookieChanged(Profile* profile, |
47 ChromeCookieDetails* details); | 47 ChromeCookieDetails* details); |
48 | 48 |
49 // This method dispatches events to the extension message service. | 49 // This method dispatches events to the extension message service. |
50 void DispatchEvent(Profile* context, | 50 void DispatchEvent(Profile* context, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Implements the cookies.getAllCookieStores() extension function. | 172 // Implements the cookies.getAllCookieStores() extension function. |
173 class GetAllCookieStoresFunction : public CookiesFunction { | 173 class GetAllCookieStoresFunction : public CookiesFunction { |
174 public: | 174 public: |
175 virtual bool RunImpl(); | 175 virtual bool RunImpl(); |
176 // GetAllCookieStoresFunction is sync. | 176 // GetAllCookieStoresFunction is sync. |
177 virtual void Run(); | 177 virtual void Run(); |
178 DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores") | 178 DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores") |
179 }; | 179 }; |
180 | 180 |
181 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_ | 181 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_ |
OLD | NEW |