| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHILD_PROCESS_RESOURCE_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace task_manager { | 22 namespace task_manager { |
| 23 | 23 |
| 24 class ChildProcessResource; | 24 class ChildProcessResource; |
| 25 | 25 |
| 26 class ChildProcessResourceProvider | 26 class ChildProcessResourceProvider |
| 27 : public ResourceProvider, | 27 : public ResourceProvider, |
| 28 public content::BrowserChildProcessObserver { | 28 public content::BrowserChildProcessObserver { |
| 29 public: | 29 public: |
| 30 explicit ChildProcessResourceProvider(TaskManager* task_manager); | 30 explicit ChildProcessResourceProvider(TaskManager* task_manager); |
| 31 | 31 |
| 32 virtual Resource* GetResource(int origin_pid, | 32 Resource* GetResource(int origin_pid, int child_id, int route_id) override; |
| 33 int child_id, | 33 void StartUpdating() override; |
| 34 int route_id) override; | 34 void StopUpdating() override; |
| 35 virtual void StartUpdating() override; | |
| 36 virtual void StopUpdating() override; | |
| 37 | 35 |
| 38 // content::BrowserChildProcessObserver methods: | 36 // content::BrowserChildProcessObserver methods: |
| 39 virtual void BrowserChildProcessHostConnected( | 37 void BrowserChildProcessHostConnected( |
| 40 const content::ChildProcessData& data) override; | 38 const content::ChildProcessData& data) override; |
| 41 virtual void BrowserChildProcessHostDisconnected( | 39 void BrowserChildProcessHostDisconnected( |
| 42 const content::ChildProcessData& data) override; | 40 const content::ChildProcessData& data) override; |
| 43 | 41 |
| 44 private: | 42 private: |
| 45 virtual ~ChildProcessResourceProvider(); | 43 ~ChildProcessResourceProvider() override; |
| 46 | 44 |
| 47 // Retrieves information about the running ChildProcessHosts (performed in the | 45 // Retrieves information about the running ChildProcessHosts (performed in the |
| 48 // IO thread). | 46 // IO thread). |
| 49 virtual void RetrieveChildProcessData(); | 47 virtual void RetrieveChildProcessData(); |
| 50 | 48 |
| 51 // Notifies the UI thread that the ChildProcessHosts information have been | 49 // Notifies the UI thread that the ChildProcessHosts information have been |
| 52 // retrieved. | 50 // retrieved. |
| 53 virtual void ChildProcessDataRetreived( | 51 virtual void ChildProcessDataRetreived( |
| 54 const std::vector<content::ChildProcessData>& child_processes); | 52 const std::vector<content::ChildProcessData>& child_processes); |
| 55 | 53 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 74 | 72 |
| 75 // A scoped container for notification registries. | 73 // A scoped container for notification registries. |
| 76 content::NotificationRegistrar registrar_; | 74 content::NotificationRegistrar registrar_; |
| 77 | 75 |
| 78 DISALLOW_COPY_AND_ASSIGN(ChildProcessResourceProvider); | 76 DISALLOW_COPY_AND_ASSIGN(ChildProcessResourceProvider); |
| 79 }; | 77 }; |
| 80 | 78 |
| 81 } // namespace task_manager | 79 } // namespace task_manager |
| 82 | 80 |
| 83 #endif // CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_ | 81 #endif // CHROME_BROWSER_TASK_MANAGER_CHILD_PROCESS_RESOURCE_PROVIDER_H_ |
| OLD | NEW |