Index: chrome/browser/task_manager/task_manager.h |
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h |
index cef241cbbda9b256f9ded71eb8e64b079ca4fcac..9d933e58c79f17bddb0061489c5856a06e7f53d7 100644 |
--- a/chrome/browser/task_manager/task_manager.h |
+++ b/chrome/browser/task_manager/task_manager.h |
@@ -102,6 +102,10 @@ class TaskManager { |
const WebKit::WebCache::ResourceTypeStats& stats) {} |
virtual void NotifyV8HeapStats(size_t v8_memory_allocated, |
size_t v8_memory_used) {} |
+ |
+ // Returns true if this resource is not visible to the user because it lives |
+ // in the background (e.g. extension background page, background contents). |
+ virtual bool IsBackground() const { return false; } |
}; |
// ResourceProviders are responsible for adding/removing resources to the task |
@@ -156,6 +160,12 @@ class TaskManager { |
void OnWindowClosed(); |
+ // Invoked when a change to a resource has occurred that should cause any |
+ // observers to completely refresh themselves (for example, the creation of |
+ // a background resource in a process). Results in all observers receiving |
+ // OnModelChanged() events. |
+ void ModelChanged(); |
+ |
// Returns the singleton instance (and initializes it if necessary). |
static TaskManager* GetInstance(); |
@@ -259,6 +269,10 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, |
// rendered by the same process are groupped together). |
bool IsResourceFirstInGroup(int index) const; |
+ // Returns true if the resource runs in the background (not visible to the |
+ // user, e.g. extension background pages and BackgroundContents). |
+ bool IsBackgroundResource(int index) const; |
+ |
// Returns icon to be used for resource (for example a favicon). |
SkBitmap GetResourceIcon(int index) const; |
@@ -300,6 +314,10 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, |
void Clear(); // Removes all items. |
+ // Sends OnModelChanged() to all observers to inform them of significant |
+ // changes to the model. |
+ void ModelChanged(); |
+ |
void NotifyResourceTypeStats( |
base::ProcessId renderer_id, |
const WebKit::WebCache::ResourceTypeStats& stats); |