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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 virtual SkBitmap GetIcon() const; | 439 virtual SkBitmap GetIcon() const; |
440 virtual base::ProcessHandle GetProcess() const; | 440 virtual base::ProcessHandle GetProcess() const; |
441 virtual Type GetType() const; | 441 virtual Type GetType() const; |
442 | 442 |
443 virtual bool SupportNetworkUsage() const; | 443 virtual bool SupportNetworkUsage() const; |
444 virtual void SetSupportNetworkUsage(); | 444 virtual void SetSupportNetworkUsage(); |
445 | 445 |
446 virtual bool ReportsSqliteMemoryUsed() const; | 446 virtual bool ReportsSqliteMemoryUsed() const; |
447 virtual size_t SqliteMemoryUsedBytes() const; | 447 virtual size_t SqliteMemoryUsedBytes() const; |
448 | 448 |
449 // Returns the pid of the browser process. | |
450 int process_id() const { return pid_; } | |
451 | |
452 private: | 449 private: |
453 base::ProcessHandle process_; | 450 base::ProcessHandle process_; |
454 int pid_; | |
455 mutable std::wstring title_; | 451 mutable std::wstring title_; |
456 | 452 |
457 static SkBitmap* default_icon_; | 453 static SkBitmap* default_icon_; |
458 | 454 |
459 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResource); | 455 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResource); |
460 }; | 456 }; |
461 | 457 |
462 class TaskManagerBrowserProcessResourceProvider | 458 class TaskManagerBrowserProcessResourceProvider |
463 : public TaskManager::ResourceProvider { | 459 : public TaskManager::ResourceProvider { |
464 public: | 460 public: |
(...skipping 15 matching lines...) Expand all Loading... |
480 | 476 |
481 void AddToTaskManager(ChildProcessInfo child_process_info); | 477 void AddToTaskManager(ChildProcessInfo child_process_info); |
482 | 478 |
483 TaskManager* task_manager_; | 479 TaskManager* task_manager_; |
484 TaskManagerBrowserProcessResource resource_; | 480 TaskManagerBrowserProcessResource resource_; |
485 | 481 |
486 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); | 482 DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); |
487 }; | 483 }; |
488 | 484 |
489 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 485 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
OLD | NEW |