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

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

Issue 2118243002: [proof-of-concept] SW thread independent of the main thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SERVICE_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke r.mojom.h"
11
12 namespace content {
13 class ServiceWorkerContextCore;
14
15 class ServiceWorkerServiceImpl : public blink::mojom::ServiceWorkerService {
16 public:
17 ServiceWorkerServiceImpl(base::WeakPtr<ServiceWorkerContextCore> context,
18 blink::mojom::ServiceWorkerServiceRequest request);
19 ~ServiceWorkerServiceImpl() override;
20
21 void ReplaceContext(base::WeakPtr<ServiceWorkerContextCore> context);
22
23 private:
24 void WorkerStarted(int32_t embedded_worker_id) override;
25
26 // Called when an error is detected on binding_.
27 void OnConnectionError();
28
29 base::WeakPtr<ServiceWorkerContextCore> context_;
30 mojo::Binding<blink::mojom::ServiceWorkerService> binding_;
31 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerServiceImpl);
32 };
33
34 } // namespace content
35
36 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698