Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 : * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_dom_ServiceWorkerUpdaterChild_h
8 : #define mozilla_dom_ServiceWorkerUpdaterChild_h
9 :
10 : #include "mozilla/dom/PServiceWorkerUpdaterChild.h"
11 : #include "mozilla/BasePrincipal.h"
12 : #include "mozilla/MozPromise.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 : namespace workers {
17 :
18 0 : class ServiceWorkerUpdaterChild final : public PServiceWorkerUpdaterChild
19 : {
20 : public:
21 : ServiceWorkerUpdaterChild(GenericPromise* aPromise,
22 : CancelableRunnable* aSuccessRunnable,
23 : CancelableRunnable* aFailureRunnable);
24 :
25 : mozilla::ipc::IPCResult
26 : RecvProceed(const bool& aAllowed) override;
27 :
28 : private:
29 : void
30 : ActorDestroy(ActorDestroyReason aWhy) override;
31 :
32 : MozPromiseRequestHolder<GenericPromise> mPromiseHolder;
33 :
34 : RefPtr<CancelableRunnable> mSuccessRunnable;
35 : RefPtr<CancelableRunnable> mFailureRunnable;
36 : };
37 :
38 : } // namespace workers
39 : } // namespace dom
40 : } // namespace mozilla
41 :
42 : #endif // mozilla_dom_ServiceWorkerUpdaterChild_h
|