Chromium Code Reviews| 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..fbeed2a0798a1660aa14f3eda3713ab492022640 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) {} |
| + |
| + // Whether this resource is visible to the user or whether it lives in the |
| + // background (e.g. extension background page, background contents). |
|
Evan Stade
2010/11/15 03:54:00
this comment confuses me. Can you replace "whether
Andrew T Wilson (Slow)
2010/11/15 08:20:57
Done.
|
| + 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); |