Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2189)

Unified Diff: extensions/browser/event_router.h

Issue 823703004: Tracking push events for lucid sleep (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Version 2 with NotificationService Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/event_router.h
diff --git a/extensions/browser/event_router.h b/extensions/browser/event_router.h
index 15f0565d056a598b1c7dda8afc721d6a5be0d39b..ad8c24eb8013537a15e7feff24a48d253290d60c 100644
--- a/extensions/browser/event_router.h
+++ b/extensions/browser/event_router.h
@@ -71,6 +71,22 @@ class EventRouter : public content::NotificationObserver,
virtual void OnListenerRemoved(const EventListenerInfo& details) {}
};
+ // Struct that is sent along with a NOTIFICATION_EXTENSION_MESSAGE_DISPATCHED.
+ // |event_name_| is the name of the event being dispatched and |message_id_|
+ // is a unique identifier associated with the message sent to the extension
+ // renderer. |extension_id_| is the id of the extension that the message is
+ // being dispatched to.
+ struct DispatchDetails {
+ DispatchDetails(const std::string& extension_id,
+ const std::string& event_name,
+ int message_id);
+ ~DispatchDetails();
+
+ const std::string extension_id_;
+ const std::string event_name_;
+ const int message_id_;
+ };
+
// Gets the EventRouter for |browser_context|.
// Shorthand for ExtensionSystem::Get(browser_context)->event_router(); it's
// a very common operation.

Powered by Google App Engine
This is Rietveld 408576698