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 640d7a6e2beccce55878bba9d85a1ec339ddddb1..fc47ddc5f181b10a790e948a04c282fee2744e27 100644 |
--- a/chrome/browser/task_manager/task_manager.h |
+++ b/chrome/browser/task_manager/task_manager.h |
@@ -18,6 +18,7 @@ |
#include "base/string16.h" |
#include "base/timer.h" |
#include "chrome/browser/renderer_host/web_cache_manager.h" |
+#include "content/public/common/gpu_memory_stats.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
class TaskManagerModel; |
@@ -312,6 +313,7 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { |
string16 GetResourceWebCoreImageCacheSize(int index) const; |
string16 GetResourceWebCoreScriptsCacheSize(int index) const; |
string16 GetResourceWebCoreCSSCacheSize(int index) const; |
+ string16 GetResourceVideoMemory(int index) const; |
string16 GetResourceFPS(int index) const; |
string16 GetResourceSqliteMemoryUsed(int index) const; |
string16 GetResourceGoatsTeleported(int index) const; |
@@ -336,6 +338,11 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { |
bool GetWebCoreCacheStats(int index, |
WebKit::WebCache::ResourceTypeStats* result) const; |
+ // Gets the GPU memory allocated of the given page. |
+ bool GetVideoMemory(int index, |
+ size_t* video_memory, |
+ bool* has_duplicates) const; |
+ |
// Gets the fps of the given page. Return false if the resource for the given |
// row isn't a renderer. |
bool GetFPS(int index, float* result) const; |
@@ -437,6 +444,9 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { |
int routing_id, |
float fps); |
+ void NotifyVideoMemoryUsageStats( |
+ const content::GPUVideoMemoryUsageStats& video_memory_usage_stats); |
+ |
void NotifyV8HeapStats(base::ProcessId renderer_id, |
size_t v8_memory_allocated, |
size_t v8_memory_used); |
@@ -492,6 +502,8 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { |
// Updates the values for all rows. |
void Refresh(); |
+ void RefreshVideoMemoryUsageStats(); |
+ |
void AddItem(TaskManager::Resource* resource, bool notify_table); |
void RemoveItem(TaskManager::Resource* resource); |
@@ -556,6 +568,10 @@ class TaskManagerModel : public base::RefCountedThreadSafe<TaskManagerModel> { |
// A map that contains the CPU usage (in %) for a process since last refresh. |
CPUUsageMap cpu_usage_map_; |
+ // A map that contains the video memory usage for a process |
+ content::GPUVideoMemoryUsageStats video_memory_usage_stats_; |
+ bool pending_video_memory_usage_stats_update_; |
+ |
// A map that contains the private/shared memory usage of the process. We |
// cache this because the same APIs are called on linux and windows, and |
// because the linux call takes >10ms to complete. This cache is cleared on |