| Index: chrome/browser/task_manager/task_manager.h
|
| ===================================================================
|
| --- chrome/browser/task_manager/task_manager.h (revision 61514)
|
| +++ chrome/browser/task_manager/task_manager.h (working copy)
|
| @@ -197,6 +197,11 @@
|
| // 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 @@
|
| 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 @@
|
| private:
|
| friend class base::RefCountedThreadSafe<TaskManagerModel>;
|
| FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, RefreshCalled);
|
| + FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, ProcessesVsTaskManager);
|
|
|
| ~TaskManagerModel();
|
|
|
| @@ -332,27 +359,6 @@
|
| // |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 @@
|
|
|
| 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_;
|
|
|
|
|