Index: chrome/browser/task_manager_resource_providers.h |
=================================================================== |
--- chrome/browser/task_manager_resource_providers.h (revision 18263) |
+++ chrome/browser/task_manager_resource_providers.h (working copy) |
@@ -205,7 +205,8 @@ |
}; |
class TaskManagerExtensionProcessResourceProvider |
- : public TaskManager::ResourceProvider { |
+ : public TaskManager::ResourceProvider, |
+ public NotificationObserver { |
public: |
explicit TaskManagerExtensionProcessResourceProvider( |
TaskManager* task_manager); |
@@ -217,8 +218,14 @@ |
virtual void StartUpdating(); |
virtual void StopUpdating(); |
+ // NotificationObserver method: |
+ virtual void Observe(NotificationType type, |
+ const NotificationSource& source, |
+ const NotificationDetails& details); |
+ |
private: |
void AddToTaskManager(ExtensionHost* extension_host); |
+ void RemoveFromTaskManager(ExtensionHost* extension_host); |
TaskManager* task_manager_; |
@@ -229,6 +236,9 @@ |
// byte read notifications). |
std::map<int, TaskManagerExtensionProcessResource*> pid_to_resources_; |
+ // A scoped container for notification registries. |
+ NotificationRegistrar registrar_; |
+ |
bool updating_; |
DISALLOW_COPY_AND_ASSIGN(TaskManagerExtensionProcessResourceProvider); |