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

Unified Diff: chrome/browser/task_manager_resource_providers.h

Issue 125047: Finish extensions <-> task manager integration (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 6 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 | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/task_manager_resource_providers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/task_manager_resource_providers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698