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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // Returns the dictionary of event filters that the given extension has | 242 // Returns the dictionary of event filters that the given extension has |
243 // registered. | 243 // registered. |
244 const base::DictionaryValue* GetFilteredEvents( | 244 const base::DictionaryValue* GetFilteredEvents( |
245 const std::string& extension_id); | 245 const std::string& extension_id); |
246 | 246 |
247 // Track of the number of dispatched events that have not yet sent an | 247 // Track of the number of dispatched events that have not yet sent an |
248 // ACK from the renderer. | 248 // ACK from the renderer. |
249 void IncrementInFlightEvents(Profile* profile, | 249 void IncrementInFlightEvents(Profile* profile, |
250 const Extension* extension); | 250 const Extension* extension); |
251 | 251 |
| 252 // static |
| 253 static void IncrementInFlightEventsOnUI( |
| 254 void* profile_id, |
| 255 const std::string& extension_id); |
| 256 |
252 void DispatchPendingEvent(const linked_ptr<Event>& event, | 257 void DispatchPendingEvent(const linked_ptr<Event>& event, |
253 ExtensionHost* host); | 258 ExtensionHost* host); |
254 | 259 |
255 // Implementation of EventListenerMap::Delegate. | 260 // Implementation of EventListenerMap::Delegate. |
256 virtual void OnListenerAdded(const EventListener* listener) OVERRIDE; | 261 virtual void OnListenerAdded(const EventListener* listener) OVERRIDE; |
257 virtual void OnListenerRemoved(const EventListener* listener) OVERRIDE; | 262 virtual void OnListenerRemoved(const EventListener* listener) OVERRIDE; |
258 | 263 |
259 Profile* profile_; | 264 Profile* profile_; |
260 | 265 |
261 content::NotificationRegistrar registrar_; | 266 content::NotificationRegistrar registrar_; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 EventListenerInfo(const std::string& event_name, | 336 EventListenerInfo(const std::string& event_name, |
332 const std::string& extension_id); | 337 const std::string& extension_id); |
333 | 338 |
334 const std::string event_name; | 339 const std::string event_name; |
335 const std::string extension_id; | 340 const std::string extension_id; |
336 }; | 341 }; |
337 | 342 |
338 } // namespace extensions | 343 } // namespace extensions |
339 | 344 |
340 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 345 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
OLD | NEW |