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

Side by Side Diff: content/browser/service_worker/embedded_worker_instance.h

Issue 2637743002: ServiceWorker: remove EmbeddedWorkerMsg_StartWorker (Closed)
Patch Set: Removed unnecessary includes and codes Created 3 years, 11 months 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
OLDNEW
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 CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void OnProcessAllocated(std::unique_ptr<WorkerProcessHandle> handle, 209 void OnProcessAllocated(std::unique_ptr<WorkerProcessHandle> handle,
210 ServiceWorkerMetrics::StartSituation start_situation); 210 ServiceWorkerMetrics::StartSituation start_situation);
211 211
212 // Called back from StartTask after the worker is registered to 212 // Called back from StartTask after the worker is registered to
213 // WorkerDevToolsManager. 213 // WorkerDevToolsManager.
214 void OnRegisteredToDevToolsManager(bool is_new_process, 214 void OnRegisteredToDevToolsManager(bool is_new_process,
215 int worker_devtools_agent_route_id, 215 int worker_devtools_agent_route_id,
216 bool wait_for_debugger); 216 bool wait_for_debugger);
217 217
218 // Sends StartWorker message via Mojo. 218 // Sends StartWorker message via Mojo.
219 ServiceWorkerStatusCode SendMojoStartWorker( 219 ServiceWorkerStatusCode SendStartWorker(
220 std::unique_ptr<EmbeddedWorkerStartParams> params); 220 std::unique_ptr<EmbeddedWorkerStartParams> params);
221 221
222 // Called back from StartTask after a start worker message is sent. 222 // Called back from StartTask after a start worker message is sent.
223 void OnStartWorkerMessageSent(); 223 void OnStartWorkerMessageSent();
224 224
225 // Called back from Registry when the worker instance has ack'ed that 225 // Called back from Registry when the worker instance has ack'ed that
226 // it is ready for inspection. 226 // it is ready for inspection.
227 void OnReadyForInspection(); 227 void OnReadyForInspection();
228 228
229 // Called back from Registry when the worker instance has ack'ed that 229 // Called back from Registry when the worker instance has ack'ed that
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 int restart_count_; 300 int restart_count_;
301 301
302 // Current running information. 302 // Current running information.
303 std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_; 303 std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_;
304 int thread_id_; 304 int thread_id_;
305 305
306 // |client_| is used to send messages to the renderer process. 306 // |client_| is used to send messages to the renderer process.
307 mojom::EmbeddedWorkerInstanceClientPtr client_; 307 mojom::EmbeddedWorkerInstanceClientPtr client_;
308 308
309 // TODO(shimazu): Remove this after non-mojo StartWorker is removed. 309 // TODO(shimazu): Remove this after non-mojo StartWorker is removed.
310 mojom::ServiceWorkerEventDispatcherRequest pending_dispatcher_request_; 310 mojom::ServiceWorkerEventDispatcherRequest pending_dispatcher_request_;
falken 2017/01/16 06:02:51 Can this be removed now? If not, the TODO needs up
shimazu 2017/01/16 07:06:38 It will be a bit big patch because currently Embed
311 311
312 // Whether devtools is attached or not. 312 // Whether devtools is attached or not.
313 bool devtools_attached_; 313 bool devtools_attached_;
314 314
315 // True if the script load request accessed the network. If the script was 315 // True if the script load request accessed the network. If the script was
316 // served from HTTPCache or ServiceWorkerDatabase this value is false. 316 // served from HTTPCache or ServiceWorkerDatabase this value is false.
317 bool network_accessed_for_script_; 317 bool network_accessed_for_script_;
318 318
319 ListenerList listener_list_; 319 ListenerList listener_list_;
320 std::unique_ptr<DevToolsProxy> devtools_proxy_; 320 std::unique_ptr<DevToolsProxy> devtools_proxy_;
321 321
322 std::unique_ptr<StartTask> inflight_start_task_; 322 std::unique_ptr<StartTask> inflight_start_task_;
323 323
324 // This is valid only after a process is allocated for the worker. 324 // This is valid only after a process is allocated for the worker.
325 ServiceWorkerMetrics::StartSituation start_situation_ = 325 ServiceWorkerMetrics::StartSituation start_situation_ =
326 ServiceWorkerMetrics::StartSituation::UNKNOWN; 326 ServiceWorkerMetrics::StartSituation::UNKNOWN;
327 327
328 // Used for UMA. The start time of the current start sequence step. 328 // Used for UMA. The start time of the current start sequence step.
329 base::TimeTicks step_time_; 329 base::TimeTicks step_time_;
330 330
331 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; 331 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_;
332 332
333 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); 333 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance);
334 }; 334 };
335 335
336 } // namespace content 336 } // namespace content
337 337
338 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ 338 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698