dom/fetch/FetchTypes.ipdlh
author Ben Kelly <ben@wanderview.com>
Tue, 13 Sep 2016 20:14:02 -0700
changeset 313770 12ee5e6a9c9d06c102e2f8bb8ad3ed31494d857a
parent 300800 9be76aad30b130121b6fde7c79adaa687061c058
child 300809 29121ecd02eb3f83cafebb0de084326e87a43158
child 392530 55ebc5117e6ae26a7acd1dcf3a431021e6598c5b
permissions -rw-r--r--
Bug 1300658 P5 Make service worker APIs use the MainThreadTaskQueue. r=baku

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

include IPCStream;
include ChannelInfo;
include PBackgroundSharedTypes;

using HeadersGuardEnum from "mozilla/dom/FetchIPCTypes.h";
using ReferrerPolicy from "mozilla/dom/FetchIPCTypes.h";
using RequestCredentials from "mozilla/dom/FetchIPCTypes.h";
using RequestMode from "mozilla/dom/FetchIPCTypes.h";
using ResponseType from "mozilla/dom/FetchIPCTypes.h";
using RequestRedirect from "mozilla/dom/FetchIPCTypes.h";
using RequestCache from "mozilla/dom/FetchIPCTypes.h";

namespace mozilla {
namespace dom {

struct HeadersEntry
{
  nsCString name;
  nsCString value;
};

// Note, this does not yet serialize *all* of InternalRequest
// Make sure that it contains the fields that you care about
struct IPCInternalRequest
{
  nsCString[] urls;
  nsCString method;
  HeadersEntry[] headers;
  HeadersGuardEnum headersGuard;
  nsString referrer;
  ReferrerPolicy referrerPolicy;
  RequestMode mode;
  RequestCredentials credentials;
  uint32_t contentPolicyType;
  RequestCache requestCache;
  RequestRedirect requestRedirect;
};

// Note, this does not yet serialize *all* of InternalResponse
// Make sure that it contains the fields that you care about
struct IPCInternalResponse
{
  ResponseType type;
  nsCString[] urlList;
  uint32_t status;
  nsCString statusText;
  HeadersEntry[] headers;
  HeadersGuardEnum headersGuard;
  IPCChannelInfo channelInfo;
  OptionalPrincipalInfo principalInfo;
  OptionalIPCStream body;
  int64_t bodySize;
};


} // namespace ipc
} // namespace mozilla