Index: chrome/browser/extensions/extension_event_router.h |
diff --git a/chrome/browser/extensions/extension_event_router.h b/chrome/browser/extensions/extension_event_router.h |
index 55831ed7a1d35effb1aff643903fe0c1ec8d20e8..05931e89d41ed23c26930d73aa60e84345cc9a8c 100644 |
--- a/chrome/browser/extensions/extension_event_router.h |
+++ b/chrome/browser/extensions/extension_event_router.h |
@@ -88,6 +88,12 @@ class ExtensionEventRouter : public content::NotificationObserver { |
const std::string& cross_incognito_args, |
const GURL& event_url); |
+ // Functions for tracking the number of events that have been dispatched and |
+ // not yet ACKed by the renderer. |
+ void IncrementInFlightEvents(const std::string& extension_id); |
Aaron Boodman
2011/10/31 17:46:08
Looks like Increment does not need to be public.
Tessa MacDuff
2011/10/31 19:01:29
Done.
|
+ void DecrementInFlightEvents(const std::string& extension_id); |
+ bool HasInFlightEvents(const std::string& extension_id); |
+ |
protected: |
// The details of an event to be dispatched. |
struct ExtensionEvent; |
@@ -132,6 +138,10 @@ class ExtensionEventRouter : public content::NotificationObserver { |
linked_ptr<PendingEventsList> > PendingEventsPerExtMap; |
PendingEventsPerExtMap pending_events_; |
+ // Track of the number of dispatched events that have not yet sent an |
+ // ACK from the renderer. |
+ std::map<std::string, int> in_flight_events_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExtensionEventRouter); |
}; |