diff options
Diffstat (limited to 'chrome/browser/task_manager/task_manager.h')
-rw-r--r-- | chrome/browser/task_manager/task_manager.h | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h index b7b6890..9258c1f 100644 --- a/chrome/browser/task_manager/task_manager.h +++ b/chrome/browser/task_manager/task_manager.h @@ -197,6 +197,11 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, // Returns number of registered resources. int ResourceCount() const; + // Methods to return raw resource information. + int64 GetNetworkUsage(int index) const; + double GetCPUUsage(int index) const; + int GetProcessId(int index) const; + // Methods to return formatted resource information. string16 GetResourceTitle(int index) const; string16 GetResourceNetworkUsage(int index) const; @@ -212,6 +217,27 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, string16 GetResourceGoatsTeleported(int index) const; string16 GetResourceV8MemoryAllocatedSize(int index) const; + // Gets the private memory (in bytes) that should be displayed for the passed + // resource index. Caches the result since this calculation can take time on + // some platforms. + bool GetPrivateMemory(int index, size_t* result) const; + + // Gets the shared memory (in bytes) that should be displayed for the passed + // resource index. Caches the result since this calculation can take time on + // some platforms. + bool GetSharedMemory(int index, size_t* result) const; + + // Gets the physical memory (in bytes) that should be displayed for the passed + // resource index. + bool GetPhysicalMemory(int index, size_t* result) const; + + // Gets the amount of memory allocated for javascript. Returns false if the + // resource for the given row isn't a renderer. + bool GetV8Memory(int index, size_t* result) const; + + // See design doc at http://go/at-teleporter for more information. + int GetGoatsTeleported(int index) const; + // Returns true if the resource is first in its group (resources // rendered by the same process are groupped together). bool IsResourceFirstInGroup(int index) const; @@ -265,6 +291,7 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, private: friend class base::RefCountedThreadSafe<TaskManagerModel>; FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, RefreshCalled); + FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, ProcessesVsTaskManager); ~TaskManagerModel(); @@ -332,27 +359,6 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, // |resource|. double GetCPUUsage(TaskManager::Resource* resource) const; - // Gets the private memory (in bytes) that should be displayed for the passed - // resource index. Caches the result since this calculation can take time on - // some platforms. - bool GetPrivateMemory(int index, size_t* result) const; - - // Gets the shared memory (in bytes) that should be displayed for the passed - // resource index. Caches the result since this calculation can take time on - // some platforms. - bool GetSharedMemory(int index, size_t* result) const; - - // Gets the physical memory (in bytes) that should be displayed for the passed - // resource index. - bool GetPhysicalMemory(int index, size_t* result) const; - - // Gets the amount of memory allocated for javascript. Returns false if the - // resource for the given row isn't a renderer. - bool GetV8Memory(int index, size_t* result) const; - - // See design doc at http://go/at-teleporter for more information. - int GetGoatsTeleported(int index) const; - // Retrieves the ProcessMetrics for the resources at the specified row. // Returns true if there was a ProcessMetrics available. bool GetProcessMetricsForRow(int row, @@ -403,6 +409,10 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, ObserverList<TaskManagerModelObserver> observer_list_; + // How many calls to StartUpdating have been made without matching calls to + // StopUpdating. + int update_requests_; + // Whether we are currently in the process of updating. UpdateState update_state_; |