| 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_WORKER_RESOURCE_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 virtual ~TaskManagerWorkerResourceProvider(); | 33 virtual ~TaskManagerWorkerResourceProvider(); |
| 34 | 34 |
| 35 // TaskManager::ResourceProvider implementation. | 35 // TaskManager::ResourceProvider implementation. |
| 36 virtual TaskManager::Resource* GetResource(int origin_pid, | 36 virtual TaskManager::Resource* GetResource(int origin_pid, |
| 37 int render_process_host_id, | 37 int render_process_host_id, |
| 38 int routing_id) OVERRIDE; | 38 int routing_id) OVERRIDE; |
| 39 virtual void StartUpdating() OVERRIDE; | 39 virtual void StartUpdating() OVERRIDE; |
| 40 virtual void StopUpdating() OVERRIDE; | 40 virtual void StopUpdating() OVERRIDE; |
| 41 | 41 |
| 42 // content::WorkerServiceObserver implementation. | 42 // content::WorkerServiceObserver implementation. |
| 43 virtual void WorkerCreated( | 43 virtual void WorkerCreated(const GURL& url, |
| 44 WorkerProcessHost* process, | 44 const string16& name, |
| 45 const WorkerProcessHost::WorkerInstance& instance) OVERRIDE; | 45 int process_id, |
| 46 virtual void WorkerDestroyed( | 46 int route_id) OVERRIDE; |
| 47 WorkerProcessHost* process, | 47 virtual void WorkerDestroyed(int process_id, int route_id) OVERRIDE; |
| 48 int worker_route_id) OVERRIDE; | |
| 49 virtual void WorkerContextStarted(WorkerProcessHost*, int) OVERRIDE {} | |
| 50 | 48 |
| 51 // content::NotificationObserver implementation. | 49 // content::NotificationObserver implementation. |
| 52 virtual void Observe(int type, | 50 virtual void Observe(int type, |
| 53 const content::NotificationSource& source, | 51 const content::NotificationSource& source, |
| 54 const content::NotificationDetails& details) OVERRIDE; | 52 const content::NotificationDetails& details) OVERRIDE; |
| 55 | 53 |
| 56 void NotifyWorkerCreated(WorkerResourceHolder* resource_holder); | 54 void NotifyWorkerCreated(WorkerResourceHolder* resource_holder); |
| 57 void NotifyWorkerDestroyed(int process_id, int routing_id); | 55 void NotifyWorkerDestroyed(int process_id, int routing_id); |
| 58 | 56 |
| 59 void StartObservingWorkers(); | 57 void StartObservingWorkers(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 70 // entries for worker processes which has not launched yet but for which we | 68 // entries for worker processes which has not launched yet but for which we |
| 71 // have already received WorkerCreated event. We don't add such workers to | 69 // have already received WorkerCreated event. We don't add such workers to |
| 72 // the task manager until the process is launched. | 70 // the task manager until the process is launched. |
| 73 ProcessIdToWorkerResources launching_workers_; | 71 ProcessIdToWorkerResources launching_workers_; |
| 74 content::NotificationRegistrar registrar_; | 72 content::NotificationRegistrar registrar_; |
| 75 | 73 |
| 76 DISALLOW_COPY_AND_ASSIGN(TaskManagerWorkerResourceProvider); | 74 DISALLOW_COPY_AND_ASSIGN(TaskManagerWorkerResourceProvider); |
| 77 }; | 75 }; |
| 78 | 76 |
| 79 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_ | 77 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_ |
| OLD | NEW |