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_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 bool MaybeLoadLazyBackgroundPageToDispatchEvent( | 213 bool MaybeLoadLazyBackgroundPageToDispatchEvent( |
214 Profile* profile, | 214 Profile* profile, |
215 const Extension* extension, | 215 const Extension* extension, |
216 const linked_ptr<Event>& event); | 216 const linked_ptr<Event>& event); |
217 | 217 |
218 // Track of the number of dispatched events that have not yet sent an | 218 // Track of the number of dispatched events that have not yet sent an |
219 // ACK from the renderer. | 219 // ACK from the renderer. |
220 void IncrementInFlightEvents(Profile* profile, | 220 void IncrementInFlightEvents(Profile* profile, |
221 const Extension* extension); | 221 const Extension* extension); |
222 | 222 |
| 223 // static |
| 224 static void IncrementInFlightEventsOnUI( |
| 225 void* profile_id, |
| 226 const std::string& extension_id); |
| 227 |
223 void DispatchPendingEvent(const linked_ptr<Event>& event, | 228 void DispatchPendingEvent(const linked_ptr<Event>& event, |
224 ExtensionHost* host); | 229 ExtensionHost* host); |
225 | 230 |
226 // Implementation of EventListenerMap::Delegate. | 231 // Implementation of EventListenerMap::Delegate. |
227 virtual void OnListenerAdded(const EventListener* listener) OVERRIDE; | 232 virtual void OnListenerAdded(const EventListener* listener) OVERRIDE; |
228 virtual void OnListenerRemoved(const EventListener* listener) OVERRIDE; | 233 virtual void OnListenerRemoved(const EventListener* listener) OVERRIDE; |
229 | 234 |
230 Profile* profile_; | 235 Profile* profile_; |
231 | 236 |
232 content::NotificationRegistrar registrar_; | 237 content::NotificationRegistrar registrar_; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 EventListenerInfo(const std::string& event_name, | 307 EventListenerInfo(const std::string& event_name, |
303 const std::string& extension_id); | 308 const std::string& extension_id); |
304 | 309 |
305 const std::string event_name; | 310 const std::string event_name; |
306 const std::string extension_id; | 311 const std::string extension_id; |
307 }; | 312 }; |
308 | 313 |
309 } // namespace extensions | 314 } // namespace extensions |
310 | 315 |
311 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 316 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
OLD | NEW |