Chromium Code Reviews| 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_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 | 134 |
| 135 class TaskManagerBackgroundContentsResource | 135 class TaskManagerBackgroundContentsResource |
| 136 : public TaskManagerRendererResource { | 136 : public TaskManagerRendererResource { |
| 137 public: | 137 public: |
| 138 TaskManagerBackgroundContentsResource( | 138 TaskManagerBackgroundContentsResource( |
| 139 BackgroundContents* background_contents, | 139 BackgroundContents* background_contents, |
| 140 const std::wstring& application_name); | 140 const std::wstring& application_name); |
| 141 ~TaskManagerBackgroundContentsResource(); | 141 ~TaskManagerBackgroundContentsResource(); |
| 142 | 142 |
| 143 // TaskManager::Resource methods: | 143 // TaskManager::Resource methods: |
| 144 std::wstring GetTitle() const; | 144 std::wstring GetTitle() const; |
|
Evan Stade
2010/11/15 03:54:00
these should be marked virtual
Andrew T Wilson (Slow)
2010/11/15 08:20:57
Done.
| |
| 145 SkBitmap GetIcon() const; | |
| 146 bool IsBackground() const; | |
| 147 | |
| 145 const std::wstring& application_name() const { return application_name_; } | 148 const std::wstring& application_name() const { return application_name_; } |
| 146 SkBitmap GetIcon() const; | |
| 147 | |
| 148 private: | 149 private: |
| 149 BackgroundContents* background_contents_; | 150 BackgroundContents* background_contents_; |
| 150 | 151 |
| 151 std::wstring application_name_; | 152 std::wstring application_name_; |
| 152 | 153 |
| 153 // The icon painted for BackgroundContents. | 154 // The icon painted for BackgroundContents. |
| 154 // TODO(atwilson): Use the favicon when there's a way to get the favicon for | 155 // TODO(atwilson): Use the favicon when there's a way to get the favicon for |
| 155 // BackgroundContents. | 156 // BackgroundContents. |
| 156 static SkBitmap* default_icon_; | 157 static SkBitmap* default_icon_; |
| 157 | 158 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 SkBitmap GetIcon() const; | 303 SkBitmap GetIcon() const; |
| 303 base::ProcessHandle GetProcess() const; | 304 base::ProcessHandle GetProcess() const; |
| 304 Type GetType() const { return EXTENSION; } | 305 Type GetType() const { return EXTENSION; } |
| 305 bool SupportNetworkUsage() const { return true; } | 306 bool SupportNetworkUsage() const { return true; } |
| 306 void SetSupportNetworkUsage() { NOTREACHED(); } | 307 void SetSupportNetworkUsage() { NOTREACHED(); } |
| 307 const Extension* GetExtension() const; | 308 const Extension* GetExtension() const; |
| 308 | 309 |
| 309 // Returns the pid of the extension process. | 310 // Returns the pid of the extension process. |
| 310 int process_id() const { return pid_; } | 311 int process_id() const { return pid_; } |
| 311 | 312 |
| 313 // Returns true if the associated extension has a background page. | |
| 314 bool IsBackground() const; | |
| 312 private: | 315 private: |
| 313 // The icon painted for the extension process. | 316 // The icon painted for the extension process. |
| 314 static SkBitmap* default_icon_; | 317 static SkBitmap* default_icon_; |
| 315 | 318 |
| 316 ExtensionHost* extension_host_; | 319 ExtensionHost* extension_host_; |
| 317 | 320 |
| 318 // Cached data about the extension. | 321 // Cached data about the extension. |
| 319 base::ProcessHandle process_handle_; | 322 base::ProcessHandle process_handle_; |
| 320 int pid_; | 323 int pid_; |
| 321 std::wstring title_; | 324 std::wstring title_; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 480 | 483 |
| 481 void AddToTaskManager(ChildProcessInfo child_process_info); | 484 void AddToTaskManager(ChildProcessInfo child_process_info); |
| 482 | 485 |
| 483 TaskManager* task_manager_; | 486 TaskManager* task_manager_; |
| 484 TaskManagerBrowserProcessResource resource_; | 487 TaskManagerBrowserProcessResource resource_; |
| 485 | 488 |
| 486 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); | 489 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); |
| 487 }; | 490 }; |
| 488 | 491 |
| 489 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 492 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
| OLD | NEW |