| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| 9 #include "base/optional.h" | 11 #include "base/optional.h" |
| 10 #include "content/child/child_thread_impl.h" | 12 #include "content/child/child_thread_impl.h" |
| 11 #include "content/common/service_worker/embedded_worker.mojom.h" | 13 #include "content/common/service_worker/embedded_worker.mojom.h" |
| 12 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" | 14 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
| 14 #include "mojo/public/cpp/bindings/interface_ptr.h" | 16 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 15 | 17 |
| 16 namespace content { | 18 namespace content { |
| 17 | 19 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // This is valid before StartWorker is called. After that, this object | 51 // This is valid before StartWorker is called. After that, this object |
| 50 // will be passed to ServiceWorkerContextClient. | 52 // will be passed to ServiceWorkerContextClient. |
| 51 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> temporal_self_; | 53 std::unique_ptr<EmbeddedWorkerInstanceClientImpl> temporal_self_; |
| 52 | 54 |
| 53 base::Optional<int> embedded_worker_id_; | 55 base::Optional<int> embedded_worker_id_; |
| 54 | 56 |
| 55 // Owned by EmbeddedWorkerDispatcher. This can be nullptr while a worker is | 57 // Owned by EmbeddedWorkerDispatcher. This can be nullptr while a worker is |
| 56 // not running. | 58 // not running. |
| 57 EmbeddedWorkerDispatcher::WorkerWrapper* wrapper_; | 59 EmbeddedWorkerDispatcher::WorkerWrapper* wrapper_; |
| 58 | 60 |
| 59 StopWorkerCallback stop_callback_; | 61 std::vector<StopWorkerCallback> stop_callbacks_; |
| 60 | 62 |
| 61 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstanceClientImpl); | 63 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstanceClientImpl); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace content | 66 } // namespace content |
| 65 | 67 |
| 66 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_
H_ | 68 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_
H_ |
| OLD | NEW |