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";
12 include NeckoChannelParams;
14 using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
15 [RefCounted] using class nsIPrincipal from "nsIPrincipal.h";
16 [RefCounted] using class nsIReferrerInfo from "nsIReferrerInfo.h";
17 [MoveOnly] using class mozilla::ipc::BigBuffer from "mozilla/ipc/BigBuffer.h";
22 struct IPCTransferableDataString
27 struct IPCTransferableDataCString
32 struct IPCTransferableDataInputStream
34 // NOTE: Editor currently relies on these input streams being synchronous, so
35 // we can't safely serialize them using IPCStream (see bug 1778565). Instead,
36 // they're serialized as a `BigBuffer`, and converted to a nsStringInputStream
37 // on the receiving side. If we are able to use async streams reliably in the
38 // future, we could consider switching the code which adds `nsIInputStream`s
39 // to the transferable to use `BlobImpl` instead, for more consistency between
44 struct IPCTransferableDataImageContainer
49 struct IPCTransferableDataBlob
54 union IPCTransferableDataType
56 IPCTransferableDataString;
57 IPCTransferableDataCString;
58 IPCTransferableDataInputStream;
59 IPCTransferableDataImageContainer;
60 IPCTransferableDataBlob;
63 struct IPCTransferableDataItem
66 IPCTransferableDataType data;
69 struct IPCTransferableData
71 IPCTransferableDataItem[] items;
74 union IPCTransferableDataOrError {
79 struct IPCTransferable
81 IPCTransferableData data;
83 nullable nsIPrincipal dataPrincipal;
84 CookieJarSettingsArgs? cookieJarSettings;
85 nsContentPolicyType contentPolicyType;
86 nullable nsIReferrerInfo referrerInfo;
90 } // namespace mozilla