Source code

Revision control

Other Tools

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
17
class ServiceWorkerUpdaterChild final : public PServiceWorkerUpdaterChild {
18
public:
19
ServiceWorkerUpdaterChild(GenericPromise* aPromise,
20
CancelableRunnable* aSuccessRunnable,
21
CancelableRunnable* aFailureRunnable);
22
23
mozilla::ipc::IPCResult RecvProceed(const bool& aAllowed) override;
24
25
private:
26
void ActorDestroy(ActorDestroyReason aWhy) override;
27
28
MozPromiseRequestHolder<GenericPromise> mPromiseHolder;
29
30
RefPtr<CancelableRunnable> mSuccessRunnable;
31
RefPtr<CancelableRunnable> mFailureRunnable;
32
};
33
34
} // namespace dom
35
} // namespace mozilla
36
37
#endif // mozilla_dom_ServiceWorkerUpdaterChild_h