| 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // Ensures that all lazy background pages that are interested in the given | 207 // Ensures that all lazy background pages that are interested in the given |
| 208 // event are loaded, and queues the event if the page is not ready yet. | 208 // event are loaded, and queues the event if the page is not ready yet. |
| 209 void DispatchLazyEvent(const std::string& extension_id, | 209 void DispatchLazyEvent(const std::string& extension_id, |
| 210 const linked_ptr<ExtensionEvent>& event); | 210 const linked_ptr<ExtensionEvent>& event); |
| 211 | 211 |
| 212 // Dispatches the event to the specified extension running in |process|. | 212 // Dispatches the event to the specified extension running in |process|. |
| 213 void DispatchEventToProcess(const std::string& extension_id, | 213 void DispatchEventToProcess(const std::string& extension_id, |
| 214 content::RenderProcessHost* process, | 214 content::RenderProcessHost* process, |
| 215 const linked_ptr<ExtensionEvent>& event); | 215 const linked_ptr<ExtensionEvent>& event); |
| 216 | 216 |
| 217 // Prevents the given extension from being suspended. |
| 218 void CancelSuspend(Profile* profile, const extensions::Extension* extension); |
| 219 |
| 217 // Returns false when the event is scoped to a profile and the listening | 220 // Returns false when the event is scoped to a profile and the listening |
| 218 // extension does not have access to events from that profile. Also fills | 221 // extension does not have access to events from that profile. Also fills |
| 219 // |event_args| with the proper arguments to send, which may differ if | 222 // |event_args| with the proper arguments to send, which may differ if |
| 220 // the event crosses the incognito boundary. | 223 // the event crosses the incognito boundary. |
| 221 bool CanDispatchEventToProfile( | 224 bool CanDispatchEventToProfile( |
| 222 Profile* profile, | 225 Profile* profile, |
| 223 const extensions::Extension* extension, | 226 const extensions::Extension* extension, |
| 224 const linked_ptr<ExtensionEvent>& event, | 227 const linked_ptr<ExtensionEvent>& event, |
| 225 const base::Value** event_args); | 228 const base::Value** event_args); |
| 226 | 229 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 const GURL& event_url, | 289 const GURL& event_url, |
| 287 Profile* restrict_to_profile, | 290 Profile* restrict_to_profile, |
| 288 ExtensionEventRouter::UserGestureState user_gesture, | 291 ExtensionEventRouter::UserGestureState user_gesture, |
| 289 const extensions::EventFilteringInfo& info); | 292 const extensions::EventFilteringInfo& info); |
| 290 | 293 |
| 291 ~ExtensionEvent(); | 294 ~ExtensionEvent(); |
| 292 }; | 295 }; |
| 293 | 296 |
| 294 | 297 |
| 295 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ | 298 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ |
| OLD | NEW |