OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
14 #include "chrome/browser/task_manager/task_manager.h" | 14 #include "chrome/browser/task_manager/task_manager.h" |
15 #include "content/public/browser/child_process_data.h" | 15 #include "content/public/browser/child_process_data.h" |
16 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
18 #include "content/public/common/process_type.h" | 18 #include "content/public/common/process_type.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
20 | 20 |
21 class BackgroundContents; | 21 class BackgroundContents; |
22 class BalloonHost; | 22 class BalloonHost; |
23 class Panel; | 23 class Panel; |
24 class Profile; | 24 class Profile; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class RenderViewHost; | 27 class RenderViewHost; |
28 class WebContents; | 28 class WebContents; |
| 29 class RenderProcessHost; |
29 } | 30 } |
30 | 31 |
31 namespace extensions { | 32 namespace extensions { |
32 class Extension; | 33 class Extension; |
33 } | 34 } |
34 | 35 |
35 // These file contains the resource providers used in the task manager. | 36 // These file contains the resource providers used in the task manager. |
36 | 37 |
37 // Base class for various types of render process resources that provides common | 38 // Base class for various types of render process resources that provides common |
38 // functionality like stats tracking. | 39 // functionality like stats tracking. |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 private: | 642 private: |
642 DISALLOW_COPY_AND_ASSIGN(TaskManagerGuestResource); | 643 DISALLOW_COPY_AND_ASSIGN(TaskManagerGuestResource); |
643 }; | 644 }; |
644 | 645 |
645 class TaskManagerGuestResourceProvider | 646 class TaskManagerGuestResourceProvider |
646 : public TaskManager::ResourceProvider, | 647 : public TaskManager::ResourceProvider, |
647 public content::NotificationObserver { | 648 public content::NotificationObserver { |
648 public: | 649 public: |
649 explicit TaskManagerGuestResourceProvider(TaskManager* task_manager); | 650 explicit TaskManagerGuestResourceProvider(TaskManager* task_manager); |
650 | 651 |
| 652 bool IsOOPIframe(content::RenderProcessHost* host); |
| 653 |
651 // TaskManager::ResourceProvider methods: | 654 // TaskManager::ResourceProvider methods: |
652 virtual TaskManager::Resource* GetResource(int origin_pid, | 655 virtual TaskManager::Resource* GetResource(int origin_pid, |
653 int render_process_host_id, | 656 int render_process_host_id, |
654 int routing_id) OVERRIDE; | 657 int routing_id) OVERRIDE; |
655 virtual void StartUpdating() OVERRIDE; | 658 virtual void StartUpdating() OVERRIDE; |
656 virtual void StopUpdating() OVERRIDE; | 659 virtual void StopUpdating() OVERRIDE; |
657 | 660 |
658 // content::NotificationObserver method: | 661 // content::NotificationObserver method: |
659 virtual void Observe(int type, | 662 virtual void Observe(int type, |
660 const content::NotificationSource& source, | 663 const content::NotificationSource& source, |
(...skipping 15 matching lines...) Expand all Loading... |
676 TaskManagerGuestResource*> GuestResourceMap; | 679 TaskManagerGuestResource*> GuestResourceMap; |
677 GuestResourceMap resources_; | 680 GuestResourceMap resources_; |
678 | 681 |
679 // A scoped container for notification registries. | 682 // A scoped container for notification registries. |
680 content::NotificationRegistrar registrar_; | 683 content::NotificationRegistrar registrar_; |
681 | 684 |
682 DISALLOW_COPY_AND_ASSIGN(TaskManagerGuestResourceProvider); | 685 DISALLOW_COPY_AND_ASSIGN(TaskManagerGuestResourceProvider); |
683 }; | 686 }; |
684 | 687 |
685 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 688 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |
OLD | NEW |