no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / ipc / IPCTransferable.ipdlh
blob1e277d05dd7fe173dec7c15c2c2cb4fade3c83b2
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";
10 include IPCBlob;
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";
18 namespace mozilla {
19 namespace dom {
21 struct IPCTransferableDataString
23   BigBuffer data;
26 struct IPCTransferableDataCString
28   BigBuffer data;
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
39   // image formats.
40   BigBuffer data;
43 struct IPCTransferableDataImageContainer
45   BigBuffer data;
46   uint32_t width;
47   uint32_t height;
48   uint32_t stride;
49   SurfaceFormat format;
52 struct IPCTransferableDataBlob
54   IPCBlob blob;
57 union IPCTransferableDataType
59   IPCTransferableDataString;
60   IPCTransferableDataCString;
61   IPCTransferableDataInputStream;
62   IPCTransferableDataImageContainer;
63   IPCTransferableDataBlob;
66 struct IPCTransferableDataItem
68   nsCString flavor;
69   IPCTransferableDataType data;
72 struct IPCTransferableData
74   IPCTransferableDataItem[] items;
77 union IPCTransferableDataOrError {
78     IPCTransferableData;
79     nsresult;
82 struct IPCTransferable
84   IPCTransferableData data;
85   bool isPrivateData;
86   nullable nsIPrincipal requestingPrincipal;
87   CookieJarSettingsArgs? cookieJarSettings;
88   nsContentPolicyType contentPolicyType;
89   nullable nsIReferrerInfo referrerInfo;
92 } // namespace dom
93 } // namespace mozilla