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