| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // restrict_to_profile, send the event with cross_incognito_args to the | 114 // restrict_to_profile, send the event with cross_incognito_args to the |
| 115 // extensions in that profile that can't cross incognito. | 115 // extensions in that profile that can't cross incognito. |
| 116 void DispatchEventsToRenderersAcrossIncognito( | 116 void DispatchEventsToRenderersAcrossIncognito( |
| 117 const std::string& event_name, | 117 const std::string& event_name, |
| 118 const std::string& event_args, | 118 const std::string& event_args, |
| 119 Profile* restrict_to_profile, | 119 Profile* restrict_to_profile, |
| 120 const std::string& cross_incognito_args, | 120 const std::string& cross_incognito_args, |
| 121 const GURL& event_url); | 121 const GURL& event_url); |
| 122 | 122 |
| 123 // Record the Event Ack from the renderer. (One less event in-flight.) | 123 // Record the Event Ack from the renderer. (One less event in-flight.) |
| 124 void OnExtensionEventAck(Profile* profile, const std::string& extension_id); | 124 void OnEventAck(Profile* profile, const std::string& extension_id); |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 // The details of an event to be dispatched. | 127 // The details of an event to be dispatched. |
| 128 struct ExtensionEvent; | 128 struct ExtensionEvent; |
| 129 | 129 |
| 130 // The extension and process that contains the event listener for a given | 130 // The extension and process that contains the event listener for a given |
| 131 // event. | 131 // event. |
| 132 struct ListenerProcess; | 132 struct ListenerProcess; |
| 133 | 133 |
| 134 // A map between an event name and a set of extensions that are listening | 134 // A map between an event name and a set of extensions that are listening |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 // The list of all the lazy (non-persistent) background pages that are | 201 // The list of all the lazy (non-persistent) background pages that are |
| 202 // listening to events. This is just a cache of the real list, which is | 202 // listening to events. This is just a cache of the real list, which is |
| 203 // stored on disk in the extension prefs. | 203 // stored on disk in the extension prefs. |
| 204 ListenerMap lazy_listeners_; | 204 ListenerMap lazy_listeners_; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(ExtensionEventRouter); | 206 DISALLOW_COPY_AND_ASSIGN(ExtensionEventRouter); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ | 209 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ |
| OLD | NEW |