Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Side by Side Diff: chrome/browser/task_manager/task_manager_worker_resource_provider.h

Issue 8614003: Add OVERRIDE to chrome/browser/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 17 matching lines...) Expand all
28 class WorkerResourceListHolder; 28 class WorkerResourceListHolder;
29 typedef std::vector<TaskManagerSharedWorkerResource*> WorkerResourceList; 29 typedef std::vector<TaskManagerSharedWorkerResource*> WorkerResourceList;
30 typedef scoped_ptr<TaskManagerSharedWorkerResource> WorkerResourceHolder; 30 typedef scoped_ptr<TaskManagerSharedWorkerResource> WorkerResourceHolder;
31 typedef std::map<int, WorkerResourceList> ProcessIdToWorkerResources; 31 typedef std::map<int, WorkerResourceList> ProcessIdToWorkerResources;
32 32
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); 38 int routing_id) OVERRIDE;
39 virtual void StartUpdating(); 39 virtual void StartUpdating() OVERRIDE;
40 virtual void StopUpdating(); 40 virtual void StopUpdating() OVERRIDE;
41 41
42 // WorkerServiceObserver implementation. 42 // WorkerServiceObserver implementation.
43 virtual void WorkerCreated( 43 virtual void WorkerCreated(
44 WorkerProcessHost* process, 44 WorkerProcessHost* process,
45 const WorkerProcessHost::WorkerInstance& instance) OVERRIDE; 45 const WorkerProcessHost::WorkerInstance& instance) OVERRIDE;
46 virtual void WorkerDestroyed( 46 virtual void WorkerDestroyed(
47 WorkerProcessHost* process, 47 WorkerProcessHost* process,
48 int worker_route_id) OVERRIDE; 48 int worker_route_id) OVERRIDE;
49 virtual void WorkerContextStarted(WorkerProcessHost*, int) OVERRIDE {} 49 virtual void WorkerContextStarted(WorkerProcessHost*, int) OVERRIDE {}
50 50
51 // content::NotificationObserver implementation. 51 // content::NotificationObserver implementation.
52 virtual void Observe(int type, 52 virtual void Observe(int type,
53 const content::NotificationSource& source, 53 const content::NotificationSource& source,
54 const content::NotificationDetails& details); 54 const content::NotificationDetails& details) OVERRIDE;
55 55
56 void NotifyWorkerCreated(WorkerResourceHolder* resource_holder); 56 void NotifyWorkerCreated(WorkerResourceHolder* resource_holder);
57 void NotifyWorkerDestroyed(int process_id, int routing_id); 57 void NotifyWorkerDestroyed(int process_id, int routing_id);
58 58
59 void StartObservingWorkers(); 59 void StartObservingWorkers();
60 void StopObservingWorkers(); 60 void StopObservingWorkers();
61 61
62 void AddWorkerResourceList(WorkerResourceListHolder* resource_list_holder); 62 void AddWorkerResourceList(WorkerResourceListHolder* resource_list_holder);
63 void AddResource(TaskManagerSharedWorkerResource* resource); 63 void AddResource(TaskManagerSharedWorkerResource* resource);
64 void DeleteAllResources(); 64 void DeleteAllResources();
65 65
66 bool updating_; 66 bool updating_;
67 TaskManager* task_manager_; 67 TaskManager* task_manager_;
68 WorkerResourceList resources_; 68 WorkerResourceList resources_;
69 // Map from worker process id to the list of its workers. This list contains 69 // Map from worker process id to the list of its workers. This list contains
70 // entries for worker processes which has not launched yet but for which we 70 // 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 71 // have already received WorkerCreated event. We don't add such workers to
72 // the task manager until the process is launched. 72 // the task manager until the process is launched.
73 ProcessIdToWorkerResources launching_workers_; 73 ProcessIdToWorkerResources launching_workers_;
74 content::NotificationRegistrar registrar_; 74 content::NotificationRegistrar registrar_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(TaskManagerWorkerResourceProvider); 76 DISALLOW_COPY_AND_ASSIGN(TaskManagerWorkerResourceProvider);
77 }; 77 };
78 78
79 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_ 79 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_WORKER_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.h ('k') | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698