| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  115  public: |  115  public: | 
|  116   explicit TaskManagerTabContentsResourceProvider(TaskManager* task_manager); |  116   explicit TaskManagerTabContentsResourceProvider(TaskManager* task_manager); | 
|  117  |  117  | 
|  118   virtual TaskManager::Resource* GetResource(int origin_pid, |  118   virtual TaskManager::Resource* GetResource(int origin_pid, | 
|  119                                              int render_process_host_id, |  119                                              int render_process_host_id, | 
|  120                                              int routing_id); |  120                                              int routing_id); | 
|  121   virtual void StartUpdating(); |  121   virtual void StartUpdating(); | 
|  122   virtual void StopUpdating(); |  122   virtual void StopUpdating(); | 
|  123  |  123  | 
|  124   // NotificationObserver method: |  124   // NotificationObserver method: | 
|  125   virtual void Observe(NotificationType type, |  125   virtual void Observe(int type, | 
|  126                        const NotificationSource& source, |  126                        const NotificationSource& source, | 
|  127                        const NotificationDetails& details); |  127                        const NotificationDetails& details); | 
|  128  |  128  | 
|  129  private: |  129  private: | 
|  130   virtual ~TaskManagerTabContentsResourceProvider(); |  130   virtual ~TaskManagerTabContentsResourceProvider(); | 
|  131  |  131  | 
|  132   void Add(TabContentsWrapper* tab_contents); |  132   void Add(TabContentsWrapper* tab_contents); | 
|  133   void Remove(TabContentsWrapper* tab_contents); |  133   void Remove(TabContentsWrapper* tab_contents); | 
|  134  |  134  | 
|  135   void AddToTaskManager(TabContentsWrapper* tab_contents); |  135   void AddToTaskManager(TabContentsWrapper* tab_contents); | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  184   explicit TaskManagerBackgroundContentsResourceProvider( |  184   explicit TaskManagerBackgroundContentsResourceProvider( | 
|  185       TaskManager* task_manager); |  185       TaskManager* task_manager); | 
|  186  |  186  | 
|  187   virtual TaskManager::Resource* GetResource(int origin_pid, |  187   virtual TaskManager::Resource* GetResource(int origin_pid, | 
|  188                                              int render_process_host_id, |  188                                              int render_process_host_id, | 
|  189                                              int routing_id); |  189                                              int routing_id); | 
|  190   virtual void StartUpdating(); |  190   virtual void StartUpdating(); | 
|  191   virtual void StopUpdating(); |  191   virtual void StopUpdating(); | 
|  192  |  192  | 
|  193   // NotificationObserver method: |  193   // NotificationObserver method: | 
|  194   virtual void Observe(NotificationType type, |  194   virtual void Observe(int type, | 
|  195                        const NotificationSource& source, |  195                        const NotificationSource& source, | 
|  196                        const NotificationDetails& details); |  196                        const NotificationDetails& details); | 
|  197  |  197  | 
|  198  private: |  198  private: | 
|  199   virtual ~TaskManagerBackgroundContentsResourceProvider(); |  199   virtual ~TaskManagerBackgroundContentsResourceProvider(); | 
|  200  |  200  | 
|  201   void Add(BackgroundContents* background_contents, const string16& title); |  201   void Add(BackgroundContents* background_contents, const string16& title); | 
|  202   void Remove(BackgroundContents* background_contents); |  202   void Remove(BackgroundContents* background_contents); | 
|  203  |  203  | 
|  204   void AddToTaskManager(BackgroundContents* background_contents, |  204   void AddToTaskManager(BackgroundContents* background_contents, | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  261  public: |  261  public: | 
|  262   explicit TaskManagerChildProcessResourceProvider(TaskManager* task_manager); |  262   explicit TaskManagerChildProcessResourceProvider(TaskManager* task_manager); | 
|  263  |  263  | 
|  264   virtual TaskManager::Resource* GetResource(int origin_pid, |  264   virtual TaskManager::Resource* GetResource(int origin_pid, | 
|  265                                              int render_process_host_id, |  265                                              int render_process_host_id, | 
|  266                                              int routing_id); |  266                                              int routing_id); | 
|  267   virtual void StartUpdating(); |  267   virtual void StartUpdating(); | 
|  268   virtual void StopUpdating(); |  268   virtual void StopUpdating(); | 
|  269  |  269  | 
|  270   // NotificationObserver method: |  270   // NotificationObserver method: | 
|  271   virtual void Observe(NotificationType type, |  271   virtual void Observe(int type, | 
|  272                        const NotificationSource& source, |  272                        const NotificationSource& source, | 
|  273                        const NotificationDetails& details); |  273                        const NotificationDetails& details); | 
|  274  |  274  | 
|  275   // Retrieves the current ChildProcessInfo (performed in the IO thread). |  275   // Retrieves the current ChildProcessInfo (performed in the IO thread). | 
|  276   virtual void RetrieveChildProcessInfo(); |  276   virtual void RetrieveChildProcessInfo(); | 
|  277  |  277  | 
|  278   // Notifies the UI thread that the ChildProcessInfo have been retrieved. |  278   // Notifies the UI thread that the ChildProcessInfo have been retrieved. | 
|  279   virtual void ChildProcessInfoRetreived(); |  279   virtual void ChildProcessInfoRetreived(); | 
|  280  |  280  | 
|  281   // Whether we are currently reporting to the task manager. Used to ignore |  281   // Whether we are currently reporting to the task manager. Used to ignore | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  350   explicit TaskManagerExtensionProcessResourceProvider( |  350   explicit TaskManagerExtensionProcessResourceProvider( | 
|  351       TaskManager* task_manager); |  351       TaskManager* task_manager); | 
|  352  |  352  | 
|  353   virtual TaskManager::Resource* GetResource(int origin_pid, |  353   virtual TaskManager::Resource* GetResource(int origin_pid, | 
|  354                                              int render_process_host_id, |  354                                              int render_process_host_id, | 
|  355                                              int routing_id); |  355                                              int routing_id); | 
|  356   virtual void StartUpdating(); |  356   virtual void StartUpdating(); | 
|  357   virtual void StopUpdating(); |  357   virtual void StopUpdating(); | 
|  358  |  358  | 
|  359   // NotificationObserver method: |  359   // NotificationObserver method: | 
|  360   virtual void Observe(NotificationType type, |  360   virtual void Observe(int type, | 
|  361                        const NotificationSource& source, |  361                        const NotificationSource& source, | 
|  362                        const NotificationDetails& details); |  362                        const NotificationDetails& details); | 
|  363  |  363  | 
|  364  private: |  364  private: | 
|  365   virtual ~TaskManagerExtensionProcessResourceProvider(); |  365   virtual ~TaskManagerExtensionProcessResourceProvider(); | 
|  366  |  366  | 
|  367   void AddToTaskManager(ExtensionHost* extension_host); |  367   void AddToTaskManager(ExtensionHost* extension_host); | 
|  368   void RemoveFromTaskManager(ExtensionHost* extension_host); |  368   void RemoveFromTaskManager(ExtensionHost* extension_host); | 
|  369  |  369  | 
|  370   TaskManager* task_manager_; |  370   TaskManager* task_manager_; | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  420       TaskManager* task_manager); |  420       TaskManager* task_manager); | 
|  421  |  421  | 
|  422   // TaskManager::ResourceProvider interface |  422   // TaskManager::ResourceProvider interface | 
|  423   virtual TaskManager::Resource* GetResource(int origin_pid, |  423   virtual TaskManager::Resource* GetResource(int origin_pid, | 
|  424                                              int render_process_host_id, |  424                                              int render_process_host_id, | 
|  425                                              int routing_id); |  425                                              int routing_id); | 
|  426   virtual void StartUpdating(); |  426   virtual void StartUpdating(); | 
|  427   virtual void StopUpdating(); |  427   virtual void StopUpdating(); | 
|  428  |  428  | 
|  429   // NotificationObserver interface |  429   // NotificationObserver interface | 
|  430   virtual void Observe(NotificationType type, |  430   virtual void Observe(int type, | 
|  431                        const NotificationSource& source, |  431                        const NotificationSource& source, | 
|  432                        const NotificationDetails& details); |  432                        const NotificationDetails& details); | 
|  433  |  433  | 
|  434  private: |  434  private: | 
|  435   explicit TaskManagerNotificationResourceProvider(TaskManager* task_manager); |  435   explicit TaskManagerNotificationResourceProvider(TaskManager* task_manager); | 
|  436   virtual ~TaskManagerNotificationResourceProvider(); |  436   virtual ~TaskManagerNotificationResourceProvider(); | 
|  437  |  437  | 
|  438   void AddToTaskManager(BalloonHost* balloon_host); |  438   void AddToTaskManager(BalloonHost* balloon_host); | 
|  439   void RemoveFromTaskManager(BalloonHost* balloon_host); |  439   void RemoveFromTaskManager(BalloonHost* balloon_host); | 
|  440  |  440  | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  502  |  502  | 
|  503   void AddToTaskManager(ChildProcessInfo child_process_info); |  503   void AddToTaskManager(ChildProcessInfo child_process_info); | 
|  504  |  504  | 
|  505   TaskManager* task_manager_; |  505   TaskManager* task_manager_; | 
|  506   TaskManagerBrowserProcessResource resource_; |  506   TaskManagerBrowserProcessResource resource_; | 
|  507  |  507  | 
|  508   DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); |  508   DISALLOW_COPY_AND_ASSIGN(TaskManagerBrowserProcessResourceProvider); | 
|  509 }; |  509 }; | 
|  510  |  510  | 
|  511 #endif  // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ |  511 #endif  // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_RESOURCE_PROVIDERS_H_ | 
| OLD | NEW |