1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5include PBackgroundSharedTypes;
6
7include "mozilla/dom/ServiceWorkerIPCUtils.h";
8
9using ServiceWorkerState from "mozilla/dom/ServiceWorkerBinding.h";
10
11namespace mozilla {
12namespace dom {
13
14// IPC type with enough information to create a ServiceWorker DOM object
15// in a child process.  Note that the state may be slightly out-of-sync
16// with the parent and should be updated dynamically if necessary.
17[Comparable] struct IPCServiceWorkerDescriptor
18{
19  uint64_t id;
20  uint64_t registrationId;
21  uint64_t registrationVersion;
22  PrincipalInfo principalInfo;
23  nsCString scope;
24  nsCString scriptURL;
25  ServiceWorkerState state;
26  bool handlesFetch;
27};
28
29} // namespace dom
30} // namespace mozilla
31