OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ | |
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_H_ | |
7 | |
8 #include "base/id_map.h" | |
9 #include "content/common/service_worker/embedded_worker.mojom.h" | |
10 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" | |
11 | |
12 namespace content { | |
13 | |
14 class EmbeddedWorkerInstanceClientImpl | |
15 : public mojom::EmbeddedWorkerInstanceClient { | |
16 public: | |
17 static void Create( | |
18 EmbeddedWorkerDispatcher* dispatcher, | |
19 mojo::InterfaceRequest<mojom::EmbeddedWorkerInstanceClient> request); | |
20 | |
21 explicit EmbeddedWorkerInstanceClientImpl( | |
22 EmbeddedWorkerDispatcher* dispatcher); | |
23 ~EmbeddedWorkerInstanceClientImpl() override; | |
24 | |
25 // Implementation of mojo interface | |
26 void StartWorker(const EmbeddedWorkerStartParams& params) override; | |
27 | |
28 private: | |
29 EmbeddedWorkerDispatcher* dispatcher_; | |
30 | |
31 EmbeddedWorkerDispatcher::WorkerWrapper* wrapper_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstanceClientImpl); | |
34 }; | |
35 | |
36 } // namespace content | |
37 | |
38 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_CLIENT_IMPL_
H_ | |
OLD | NEW |