1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
2 /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
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/. */
7 include "mozilla/GfxMessageUtils.h";
8 include "mozilla/dom/PermissionMessageUtils.h";
11 include NeckoChannelParams;
13 using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
14 [RefCounted] using class nsIPrincipal from "nsIPrincipal.h";
15 [RefCounted] using class nsIReferrerInfo from "nsIReferrerInfo.h";
16 [MoveOnly] using class mozilla::ipc::BigBuffer from "mozilla/ipc/BigBuffer.h";
21 struct IPCTransferableDataString
26 struct IPCTransferableDataCString
31 struct IPCTransferableDataInputStream
33 // NOTE: Editor currently relies on these input streams being synchronous, so
34 // we can't safely serialize them using IPCStream (see bug 1778565). Instead,
35 // they're serialized as a `BigBuffer`, and converted to a nsStringInputStream
36 // on the receiving side. If we are able to use async streams reliably in the
37 // future, we could consider switching the code which adds `nsIInputStream`s
38 // to the transferable to use `BlobImpl` instead, for more consistency between
43 struct IPCTransferableDataImageContainer
52 struct IPCTransferableDataBlob
57 union IPCTransferableDataType
59 IPCTransferableDataString;
60 IPCTransferableDataCString;
61 IPCTransferableDataInputStream;
62 IPCTransferableDataImageContainer;
63 IPCTransferableDataBlob;
66 struct IPCTransferableDataItem
69 IPCTransferableDataType data;
72 struct IPCTransferableData
74 IPCTransferableDataItem[] items;
77 union IPCTransferableDataOrError {
82 struct IPCTransferable
84 IPCTransferableData data;
86 nullable nsIPrincipal requestingPrincipal;
87 CookieJarSettingsArgs? cookieJarSettings;
88 nsContentPolicyType contentPolicyType;
89 nullable nsIReferrerInfo referrerInfo;
93 } // namespace mozilla