| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_RESOURCE_PROVIDERS_H__ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDERS_H__ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDERS_H__ | 6 #define CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDERS_H__ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/plugin_process_info.h" | 9 #include "chrome/browser/plugin_process_info.h" |
| 10 #include "chrome/browser/task_manager.h" | 10 #include "chrome/browser/task_manager.h" |
| 11 #include "chrome/common/notification_service.h" | 11 #include "chrome/common/notification_service.h" |
| 12 | 12 |
| 13 class PluginProcessHost; | 13 class PluginProcessHost; |
| 14 class WebContents; | 14 class WebContents; |
| 15 | 15 |
| 16 // These file contains the resource providers used in the task manager. | 16 // These file contains the resource providers used in the task manager. |
| 17 | 17 |
| 18 class TaskManagerWebContentsResource : public TaskManager::Resource { | 18 class TaskManagerWebContentsResource : public TaskManager::Resource { |
| 19 public: | 19 public: |
| 20 explicit TaskManagerWebContentsResource(WebContents* web_contents); | 20 explicit TaskManagerWebContentsResource(WebContents* web_contents); |
| 21 ~TaskManagerWebContentsResource(); | 21 ~TaskManagerWebContentsResource(); |
| 22 | 22 |
| 23 // TaskManagerResource methods: | 23 // TaskManagerResource methods: |
| 24 std::wstring GetTitle() const; | 24 std::wstring GetTitle() const; |
| 25 SkBitmap GetIcon() const; | 25 SkBitmap GetIcon() const; |
| 26 HANDLE GetProcess() const; | 26 HANDLE GetProcess() const; |
| 27 TabContents* GetTabContents() const; |
| 28 |
| 27 // WebContents always provide the network usage. | 29 // WebContents always provide the network usage. |
| 28 bool SupportNetworkUsage() const { return true; } | 30 bool SupportNetworkUsage() const { return true; } |
| 29 void SetSupportNetworkUsage() { }; | 31 void SetSupportNetworkUsage() { }; |
| 30 | 32 |
| 31 private: | 33 private: |
| 32 WebContents* web_contents_; | 34 WebContents* web_contents_; |
| 33 HANDLE process_; | 35 HANDLE process_; |
| 34 int pid_; | 36 int pid_; |
| 35 | 37 |
| 36 DISALLOW_EVIL_CONSTRUCTORS(TaskManagerWebContentsResource); | 38 DISALLOW_EVIL_CONSTRUCTORS(TaskManagerWebContentsResource); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void AddToTaskManager(PluginProcessInfo plugin_process_info); | 215 void AddToTaskManager(PluginProcessInfo plugin_process_info); |
| 214 | 216 |
| 215 TaskManager* task_manager_; | 217 TaskManager* task_manager_; |
| 216 TaskManagerBrowserProcessResource resource_; | 218 TaskManagerBrowserProcessResource resource_; |
| 217 | 219 |
| 218 DISALLOW_EVIL_CONSTRUCTORS(TaskManagerBrowserProcessResourceProvider); | 220 DISALLOW_EVIL_CONSTRUCTORS(TaskManagerBrowserProcessResourceProvider); |
| 219 }; | 221 }; |
| 220 | 222 |
| 221 #endif // CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDERS_H__ | 223 #endif // CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDERS_H__ |
| 222 | 224 |
| OLD | NEW |