| Index: chrome/browser/extensions/api/processes/processes_api.h
|
| diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h
|
| index c30169aed51717c69b3b54bb3fa9b01bad8fecc7..ab42c3221f991537a72935aa3dccbca1906826e8 100644
|
| --- a/chrome/browser/extensions/api/processes/processes_api.h
|
| +++ b/chrome/browser/extensions/api/processes/processes_api.h
|
| @@ -14,6 +14,8 @@
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_widget_host.h"
|
|
|
| +class Profile;
|
| +
|
| namespace base {
|
| class ListValue;
|
| }
|
| @@ -25,11 +27,8 @@ namespace extensions {
|
| class ProcessesEventRouter : public TaskManagerModelObserver,
|
| public content::NotificationObserver {
|
| public:
|
| - // Single instance of the event router.
|
| - static ProcessesEventRouter* GetInstance();
|
| -
|
| - // Safe to call multiple times.
|
| - void ObserveProfile(Profile* profile);
|
| + explicit ProcessesEventRouter(Profile* profile);
|
| + virtual ~ProcessesEventRouter();
|
|
|
| // Called when an extension process wants to listen to process events.
|
| void ListenerAdded();
|
| @@ -46,11 +45,6 @@ class ProcessesEventRouter : public TaskManagerModelObserver,
|
| int num_listeners() { return listeners_; }
|
|
|
| private:
|
| - friend struct DefaultSingletonTraits<ProcessesEventRouter>;
|
| -
|
| - ProcessesEventRouter();
|
| - virtual ~ProcessesEventRouter();
|
| -
|
| // content::NotificationObserver implementation.
|
| virtual void Observe(int type,
|
| const content::NotificationSource& source,
|
| @@ -69,11 +63,7 @@ class ProcessesEventRouter : public TaskManagerModelObserver,
|
| content::RenderProcessHost* rph,
|
| content::RenderProcessHost::RendererClosedDetails* details);
|
|
|
| - void NotifyProfiles(const char* event_name,
|
| - scoped_ptr<base::ListValue> event_args);
|
| -
|
| - void DispatchEvent(Profile* profile,
|
| - const char* event_name,
|
| + void DispatchEvent(const char* event_name,
|
| scoped_ptr<base::ListValue> event_args);
|
|
|
| // Determines whether there is a registered listener for the specified event.
|
| @@ -83,9 +73,7 @@ class ProcessesEventRouter : public TaskManagerModelObserver,
|
| // Used for tracking registrations to process related notifications.
|
| content::NotificationRegistrar registrar_;
|
|
|
| - // Registered profiles.
|
| - typedef std::set<Profile*> ProfileSet;
|
| - ProfileSet profiles_;
|
| + Profile* profile_;
|
|
|
| // TaskManager to observe for updates.
|
| TaskManagerModel* model_;
|
|
|