OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_WORKER_HOST_WORKER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_WORKER_HOST_WORKER_SERVICE_H_ |
6 #define CHROME_BROWSER_WORKER_HOST_WORKER_SERVICE_H_ | 6 #define CHROME_BROWSER_WORKER_HOST_WORKER_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 | 10 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 bool CanCreateWorkerProcess( | 135 bool CanCreateWorkerProcess( |
136 const WorkerProcessHost::WorkerInstance& instance); | 136 const WorkerProcessHost::WorkerInstance& instance); |
137 | 137 |
138 // Checks if the tab associated with the passed RenderView can create a | 138 // Checks if the tab associated with the passed RenderView can create a |
139 // worker process based on the process limit when we're using a strategy of | 139 // worker process based on the process limit when we're using a strategy of |
140 // one worker per process. | 140 // one worker per process. |
141 bool TabCanCreateWorkerProcess( | 141 bool TabCanCreateWorkerProcess( |
142 int renderer_id, int render_view_route_id, bool* hit_total_worker_limit); | 142 int renderer_id, int render_view_route_id, bool* hit_total_worker_limit); |
143 | 143 |
144 // NotificationObserver interface. | 144 // NotificationObserver interface. |
145 void Observe(NotificationType type, | 145 virtual void Observe(NotificationType type, |
146 const NotificationSource& source, | 146 const NotificationSource& source, |
147 const NotificationDetails& details); | 147 const NotificationDetails& details); |
148 | 148 |
149 // Notifies us that a process that's talking to a worker has shut down. | 149 // Notifies us that a process that's talking to a worker has shut down. |
150 void SenderShutdown(IPC::Message::Sender* sender); | 150 void SenderShutdown(IPC::Message::Sender* sender); |
151 | 151 |
152 // Notifies us that a worker process has closed. | 152 // Notifies us that a worker process has closed. |
153 void WorkerProcessDestroyed(WorkerProcessHost* process); | 153 void WorkerProcessDestroyed(WorkerProcessHost* process); |
154 | 154 |
155 // APIs for manipulating our set of pending shared worker instances. | 155 // APIs for manipulating our set of pending shared worker instances. |
156 WorkerProcessHost::WorkerInstance* CreatePendingInstance( | 156 WorkerProcessHost::WorkerInstance* CreatePendingInstance( |
157 const GURL& url, const string16& name, bool off_the_record); | 157 const GURL& url, const string16& name, bool off_the_record); |
(...skipping 10 matching lines...) Expand all Loading... |
168 | 168 |
169 // These are shared workers that have been looked up, but not created yet. | 169 // These are shared workers that have been looked up, but not created yet. |
170 // We need to keep a list of these to synchronously detect shared worker | 170 // We need to keep a list of these to synchronously detect shared worker |
171 // URL mismatches when two pages launch shared workers simultaneously. | 171 // URL mismatches when two pages launch shared workers simultaneously. |
172 WorkerProcessHost::Instances pending_shared_workers_; | 172 WorkerProcessHost::Instances pending_shared_workers_; |
173 | 173 |
174 DISALLOW_COPY_AND_ASSIGN(WorkerService); | 174 DISALLOW_COPY_AND_ASSIGN(WorkerService); |
175 }; | 175 }; |
176 | 176 |
177 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_SERVICE_H_ | 177 #endif // CHROME_BROWSER_WORKER_HOST_WORKER_SERVICE_H_ |
OLD | NEW |