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

Side by Side Diff: content/renderer/service_worker/embedded_worker_instance_client_impl.h

Issue 2227593002: ServiceWorker: Implement StartWorker by using mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added argument check and updated comment and BUILD.gn Created 4 years, 3 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
(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_REGISTRY_CLIENT_IMPL_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_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 #include "mojo/public/cpp/bindings/strong_binding.h"
12
13 namespace content {
14
15 class EmbeddedWorkerInstanceClientImpl
16 : public mojom::EmbeddedWorkerInstanceClient {
17 public:
18 static void Create(
19 EmbeddedWorkerDispatcher* dispatcher,
20 mojo::InterfaceRequest<mojom::EmbeddedWorkerInstanceClient> request);
21
22 // Implementation of mojo interface
23 void StartWorker(mojom::EmbeddedWorkerStartWorkerParamsPtr params) override;
24
25 private:
26 EmbeddedWorkerInstanceClientImpl(
27 EmbeddedWorkerDispatcher* dispatcher,
28 mojo::InterfaceRequest<mojom::EmbeddedWorkerInstanceClient> request);
29 ~EmbeddedWorkerInstanceClientImpl() override;
30
31 void OnError();
32
33 EmbeddedWorkerDispatcher* dispatcher_;
34 mojo::StrongBinding<mojom::EmbeddedWorkerInstanceClient> binding_;
35
36 EmbeddedWorkerDispatcher::WorkerWrapper* wrapper_;
37
38 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstanceClientImpl);
39 };
40
41 } // namespace content
42 #endif //
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698