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

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

Issue 2606593002: [ServiceWorker] Associate interfaces.
Patch Set: Fix unit tests 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SendMojoStartWorker(
220 std::unique_ptr<EmbeddedWorkerStartParams> params); 220 std::unique_ptr<EmbeddedWorkerStartParams> params,
221 mojom::EmbeddedWorkerInstanceClientAssociatedPtrInfo ptr_info);
221 222
222 // Called back from StartTask after a start worker message is sent. 223 // Called back from StartTask after a start worker message is sent.
223 void OnStartWorkerMessageSent(); 224 void OnStartWorkerMessageSent();
224 225
225 // Called back from Registry when the worker instance has ack'ed that 226 // Called back from Registry when the worker instance has ack'ed that
226 // it is ready for inspection. 227 // it is ready for inspection.
227 void OnReadyForInspection(); 228 void OnReadyForInspection();
228 229
229 // Called back from Registry when the worker instance has ack'ed that 230 // Called back from Registry when the worker instance has ack'ed that
230 // it finished loading the script. 231 // it finished loading the script.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 const int embedded_worker_id_; 297 const int embedded_worker_id_;
297 298
298 EmbeddedWorkerStatus status_; 299 EmbeddedWorkerStatus status_;
299 StartingPhase starting_phase_; 300 StartingPhase starting_phase_;
300 301
301 // Current running information. 302 // Current running information.
302 std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_; 303 std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_;
303 int thread_id_; 304 int thread_id_;
304 305
305 // |client_| is used to send messages to the renderer process. 306 // |client_| is used to send messages to the renderer process.
306 mojom::EmbeddedWorkerInstanceClientPtr client_; 307 mojom::EmbeddedWorkerInstanceClientAssociatedPtr client_;
307 308
308 // TODO(shimazu): Remove this after non-mojo StartWorker is removed. 309 // TODO(shimazu): Remove this after non-mojo StartWorker is removed.
309 mojom::ServiceWorkerEventDispatcherRequest pending_dispatcher_request_; 310 mojom::ServiceWorkerEventDispatcherRequest pending_dispatcher_request_;
310 311
311 // Whether devtools is attached or not. 312 // Whether devtools is attached or not.
312 bool devtools_attached_; 313 bool devtools_attached_;
313 314
314 // 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
315 // served from HTTPCache or ServiceWorkerDatabase this value is false. 316 // served from HTTPCache or ServiceWorkerDatabase this value is false.
316 bool network_accessed_for_script_; 317 bool network_accessed_for_script_;
(...skipping 11 matching lines...) Expand all
328 base::TimeTicks step_time_; 329 base::TimeTicks step_time_;
329 330
330 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; 331 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_;
331 332
332 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); 333 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance);
333 }; 334 };
334 335
335 } // namespace content 336 } // namespace content
336 337
337 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ 338 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698