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

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

Issue 3597016: Expands the chrome.experimental.processes extension API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months 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/browser/gtk/task_manager_gtk.cc ('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
===================================================================
--- 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_;
« no previous file with comments | « chrome/browser/gtk/task_manager_gtk.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698