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

Unified Diff: extensions/browser/event_router.h

Issue 155183002: Add ApiActivityMonitor to decouple ActivityLog from low-level extensions code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase3 (activity_log) Created 6 years, 10 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
« no previous file with comments | « extensions/browser/api_activity_monitor.h ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_router.h
diff --git a/extensions/browser/event_router.h b/extensions/browser/event_router.h
index a42aa680d2ece4c5fd8ba455e14452d5700ad162..467e7f396ae21729ec89f52da81891a043be9d34 100644
--- a/extensions/browser/event_router.h
+++ b/extensions/browser/event_router.h
@@ -68,13 +68,6 @@ class EventRouter : public content::NotificationObserver,
virtual void OnListenerRemoved(const EventListenerInfo& details) {}
};
- // The EventDispatchObserver is notified on the UI thread whenever
- // an event is dispatched. There can be only one EventDispatchObserver.
- class EventDispatchObserver {
- public:
- virtual void OnWillDispatchEvent(scoped_ptr<EventDispatchInfo> details) = 0;
- };
-
// Converts event names like "foo.onBar/123" into "foo.onBar". Event names
// without a "/" are returned unchanged.
static std::string GetBaseEventName(const std::string& full_event_name);
@@ -117,10 +110,6 @@ class EventRouter : public content::NotificationObserver,
// Unregisters an observer from all events.
void UnregisterObserver(Observer* observer);
- // Sets the observer to be notified whenever an event is dispatched to an
- // extension.
- void SetEventDispatchObserver(EventDispatchObserver* observer);
-
// Add or remove the extension as having a lazy background page that listens
// to the event. The difference from the above methods is that these will be
// remembered even after the process goes away. We use this list to decide
@@ -192,12 +181,6 @@ class EventRouter : public content::NotificationObserver,
typedef std::pair<const content::BrowserContext*, std::string>
EventDispatchIdentifier;
- // Sends a notification about an event to the event dispatch observer on the
- // UI thread. Can be called from any thread.
- static void NotifyExtensionDispatchObserverOnUIThread(
- void* browser_context_id,
- scoped_ptr<EventDispatchInfo> details);
-
// TODO(gdk): Document this.
static void DispatchExtensionMessage(
IPC::Sender* ipc_sender,
@@ -300,8 +283,6 @@ class EventRouter : public content::NotificationObserver,
typedef base::hash_map<std::string, Observer*> ObserverMap;
ObserverMap observers_;
- EventDispatchObserver* event_dispatch_observer_;
-
DISALLOW_COPY_AND_ASSIGN(EventRouter);
};
@@ -377,17 +358,6 @@ struct EventListenerInfo {
content::BrowserContext* browser_context;
};
-struct EventDispatchInfo {
- EventDispatchInfo(const std::string& extension_id,
- const std::string& event_name,
- scoped_ptr<base::ListValue> event_args);
- ~EventDispatchInfo();
-
- const std::string extension_id;
- const std::string event_name;
- scoped_ptr<base::ListValue> event_args;
-};
-
} // namespace extensions
#endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_
« no previous file with comments | « extensions/browser/api_activity_monitor.h ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698