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

Unified Diff: chrome/browser/task_manager/task_manager.h

Issue 4987001: Implement new task manager mocks on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated per review feedback Created 10 years, 1 month 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/app/generated_resources.grd ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698