| OLD | NEW |
| (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_ |
| OLD | NEW |