OLD | NEW |
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // ReleaseProcess() and invokes |callback| with |status|. May destroy |this|. | 288 // ReleaseProcess() and invokes |callback| with |status|. May destroy |this|. |
289 void OnStartFailed(const StatusCallback& callback, | 289 void OnStartFailed(const StatusCallback& callback, |
290 ServiceWorkerStatusCode status); | 290 ServiceWorkerStatusCode status); |
291 | 291 |
292 // Returns the time elapsed since |step_time_| and updates |step_time_| | 292 // Returns the time elapsed since |step_time_| and updates |step_time_| |
293 // to the current time. | 293 // to the current time. |
294 base::TimeDelta UpdateStepTime(); | 294 base::TimeDelta UpdateStepTime(); |
295 | 295 |
296 base::WeakPtr<ServiceWorkerContextCore> context_; | 296 base::WeakPtr<ServiceWorkerContextCore> context_; |
297 scoped_refptr<EmbeddedWorkerRegistry> registry_; | 297 scoped_refptr<EmbeddedWorkerRegistry> registry_; |
| 298 |
| 299 // Unique within an EmbeddedWorkerRegistry. |
298 const int embedded_worker_id_; | 300 const int embedded_worker_id_; |
| 301 |
299 EmbeddedWorkerStatus status_; | 302 EmbeddedWorkerStatus status_; |
300 StartingPhase starting_phase_; | 303 StartingPhase starting_phase_; |
301 | 304 |
302 // Current running information. | 305 // Current running information. |
303 std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_; | 306 std::unique_ptr<EmbeddedWorkerInstance::WorkerProcessHandle> process_handle_; |
304 int thread_id_; | 307 int thread_id_; |
305 std::unique_ptr<shell::InterfaceRegistry> interface_registry_; | 308 std::unique_ptr<shell::InterfaceRegistry> interface_registry_; |
306 std::unique_ptr<shell::InterfaceProvider> remote_interfaces_; | 309 std::unique_ptr<shell::InterfaceProvider> remote_interfaces_; |
307 | 310 |
308 // Whether devtools is attached or not. | 311 // Whether devtools is attached or not. |
(...skipping 16 matching lines...) Expand all Loading... |
325 base::TimeTicks step_time_; | 328 base::TimeTicks step_time_; |
326 | 329 |
327 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 330 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
328 | 331 |
329 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 332 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
330 }; | 333 }; |
331 | 334 |
332 } // namespace content | 335 } // namespace content |
333 | 336 |
334 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 337 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
OLD | NEW |