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
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_serviceworkeroppromise_h__
8
#define mozilla_dom_serviceworkeroppromise_h__
9
10
#include "mozilla/MozPromise.h"
11
#include "mozilla/Pair.h"
12
#include "mozilla/RefPtr.h"
13
#include "mozilla/dom/ServiceWorkerOpArgs.h"
14
15
namespace mozilla {
16
namespace dom {
17
18
class InternalResponse;
19
20
using SynthesizeResponseArgs =
21
Pair<RefPtr<InternalResponse>, FetchEventRespondWithClosure>;
22
23
using FetchEventRespondWithResult =
24
Variant<SynthesizeResponseArgs, ResetInterceptionArgs,
25
CancelInterceptionArgs>;
26
27
using FetchEventRespondWithPromise =
28
MozPromise<FetchEventRespondWithResult, nsresult, true>;
29
30
using ServiceWorkerOpPromise =
31
MozPromise<ServiceWorkerOpResult, nsresult, true>;
32
33
} // namespace dom
34
} // namespace mozilla
35
36
#endif // mozilla_dom_serviceworkeroppromise_h__