| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RENDER_RESOURCE_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_RENDERER_RESOURCE_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RENDER_RESOURCE_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_RENDERER_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/task_manager/task_manager.h" | 9 #include "chrome/browser/task_manager/task_manager.h" |
| 10 #include "content/public/browser/render_view_host_observer.h" | 10 #include "content/public/browser/render_view_host_observer.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class RenderViewHost; | 13 class RenderViewHost; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace task_manager { |
| 17 |
| 16 // Base class for various types of render process resources that provides common | 18 // Base class for various types of render process resources that provides common |
| 17 // functionality like stats tracking. | 19 // functionality like stats tracking. |
| 18 class TaskManagerRendererResource : public TaskManager::Resource, | 20 class RendererResource : public TaskManager::Resource, |
| 19 public content::RenderViewHostObserver { | 21 public content::RenderViewHostObserver { |
| 20 public: | 22 public: |
| 21 TaskManagerRendererResource(base::ProcessHandle process, | 23 RendererResource(base::ProcessHandle process, |
| 22 content::RenderViewHost* render_view_host); | 24 content::RenderViewHost* render_view_host); |
| 23 virtual ~TaskManagerRendererResource(); | 25 virtual ~RendererResource(); |
| 24 | 26 |
| 25 // TaskManager::Resource methods: | 27 // TaskManager::Resource methods: |
| 26 virtual base::ProcessHandle GetProcess() const OVERRIDE; | 28 virtual base::ProcessHandle GetProcess() const OVERRIDE; |
| 27 virtual int GetUniqueChildProcessId() const OVERRIDE; | 29 virtual int GetUniqueChildProcessId() const OVERRIDE; |
| 28 virtual Type GetType() const OVERRIDE; | 30 virtual Type GetType() const OVERRIDE; |
| 29 virtual int GetRoutingID() const OVERRIDE; | 31 virtual int GetRoutingID() const OVERRIDE; |
| 30 | 32 |
| 31 virtual bool ReportsCacheStats() const OVERRIDE; | 33 virtual bool ReportsCacheStats() const OVERRIDE; |
| 32 virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const | 34 virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const |
| 33 OVERRIDE; | 35 OVERRIDE; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // The fps_ field holds the renderer frames per second. | 81 // The fps_ field holds the renderer frames per second. |
| 80 float fps_; | 82 float fps_; |
| 81 // This flag is true if we are waiting for the renderer to report its FPS. | 83 // This flag is true if we are waiting for the renderer to report its FPS. |
| 82 bool pending_fps_update_; | 84 bool pending_fps_update_; |
| 83 | 85 |
| 84 // We do a similar dance to gather the V8 memory usage in a process. | 86 // We do a similar dance to gather the V8 memory usage in a process. |
| 85 size_t v8_memory_allocated_; | 87 size_t v8_memory_allocated_; |
| 86 size_t v8_memory_used_; | 88 size_t v8_memory_used_; |
| 87 bool pending_v8_memory_allocated_update_; | 89 bool pending_v8_memory_allocated_update_; |
| 88 | 90 |
| 89 DISALLOW_COPY_AND_ASSIGN(TaskManagerRendererResource); | 91 DISALLOW_COPY_AND_ASSIGN(RendererResource); |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RENDER_RESOURCE_H_ | 94 } // namespace task_manager |
| 95 |
| 96 #endif // CHROME_BROWSER_TASK_MANAGER_RENDERER_RESOURCE_H_ |
| OLD | NEW |