| 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 // 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 #pragma once | 10 #pragma once |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 const content::NotificationDetails& details) OVERRIDE; | 47 const content::NotificationDetails& details) OVERRIDE; |
| 48 | 48 |
| 49 // Handler for the COOKIE_CHANGED event. The method takes the details of such | 49 // Handler for the COOKIE_CHANGED event. The method takes the details of such |
| 50 // an event and constructs a suitable JSON formatted extension event from it. | 50 // an event and constructs a suitable JSON formatted extension event from it. |
| 51 void CookieChanged(Profile* profile, | 51 void CookieChanged(Profile* profile, |
| 52 ChromeCookieDetails* details); | 52 ChromeCookieDetails* details); |
| 53 | 53 |
| 54 // This method dispatches events to the extension message service. | 54 // This method dispatches events to the extension message service. |
| 55 void DispatchEvent(Profile* context, | 55 void DispatchEvent(Profile* context, |
| 56 const char* event_name, | 56 const char* event_name, |
| 57 const std::string& json_args, | 57 base::ListValue* event_args, |
| 58 GURL& cookie_domain); | 58 GURL& cookie_domain); |
| 59 | 59 |
| 60 // Used for tracking registrations to CookieMonster notifications. | 60 // Used for tracking registrations to CookieMonster notifications. |
| 61 content::NotificationRegistrar registrar_; | 61 content::NotificationRegistrar registrar_; |
| 62 | 62 |
| 63 Profile* profile_; | 63 Profile* profile_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(ExtensionCookiesEventRouter); | 65 DISALLOW_COPY_AND_ASSIGN(ExtensionCookiesEventRouter); |
| 66 }; | 66 }; |
| 67 | 67 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 // ExtensionFunction: | 210 // ExtensionFunction: |
| 211 // GetAllCookieStoresFunction is sync. | 211 // GetAllCookieStoresFunction is sync. |
| 212 virtual void Run() OVERRIDE; | 212 virtual void Run() OVERRIDE; |
| 213 virtual bool RunImpl() OVERRIDE; | 213 virtual bool RunImpl() OVERRIDE; |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 } // namespace extensions | 216 } // namespace extensions |
| 217 | 217 |
| 218 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ | 218 #endif // CHROME_BROWSER_EXTENSIONS_API_COOKIES_COOKIES_API_H_ |
| OLD | NEW |