Files
sousa-gecko/dom/fetch/FetchTypes.ipdlh
T
Nika Layzell 8970f43dd4 Bug 2005247 - Part 1: Get the BlobImpl from the BlobURLChannel, r=asuth,media-playback-reviewers,padenot
This requires some changes to the various places which currently directly read
the BlobImpl from the BlobURLChannel.

This requires a change to how MediaResource handles Blob URL loads, as the
existing code was avoiding creating a BlobURLChannel entirely when loading a
Blob URL. This could be improved in the future in a similar manner to how
HTTP(s) URLs are handled for ChannelMediaResource, but that was left as
out-of-scope for this bug.

Differential Revision: https://phabricator.services.mozilla.com/D276059
2026-04-24 19:42:21 +00:00

137 lines
3.9 KiB
Plaintext

/* 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 PBackgroundSharedTypes;
include PerformanceTimingTypes;
include NeckoChannelParams;
include "mozilla/dom/FetchIPCTypes.h";
include "mozilla/dom/IPCBlobUtils.h";
include "mozilla/ipc/TransportSecurityInfoUtils.h";
include "mozilla/ipc/URIUtils.h";
using mozilla::dom::HeadersGuardEnum from "mozilla/dom/HeadersBinding.h";
using mozilla::dom::ReferrerPolicy from "mozilla/dom/ReferrerPolicyBinding.h";
using mozilla::dom::RequestCache from "mozilla/dom/RequestBinding.h";
using mozilla::dom::RequestCredentials from "mozilla/dom/RequestBinding.h";
using mozilla::dom::RequestRedirect from "mozilla/dom/RequestBinding.h";
using mozilla::dom::RequestPriority from "mozilla/dom/RequestBinding.h";
using mozilla::dom::ResponseType from "mozilla/dom/ResponseBinding.h";
using struct nsID from "nsID.h";
using mozilla::dom::FetchDriverObserver::EndReason from "mozilla/dom/FetchDriver.h";
using nsContentPolicyType from "nsIContentPolicy.h";
using nsILoadInfo::CrossOriginEmbedderPolicy from "nsILoadInfo.h";
[RefCounted] using class mozilla::RemoteLazyInputStream from "mozilla/RemoteLazyInputStream.h";
[RefCounted] using class nsITransportSecurityInfo from "nsITransportSecurityInfo.h";
[RefCounted] using class nsIURI from "nsIURI.h";
[RefCounted] using class mozilla::dom::BlobImpl from "mozilla/dom/BlobImpl.h";
namespace mozilla {
namespace dom {
struct HeadersEntry {
nsCString name;
nsCString value;
};
struct ParentToParentStream {
// Used as a key for RemoteLazyInputStreamStorage
nsID uuid;
};
union ParentToChildStream {
nullable RemoteLazyInputStream;
IPCStream;
};
struct ChildToParentStream {
IPCStream stream;
};
union BodyStreamVariant {
ParentToParentStream;
ParentToChildStream;
ChildToParentStream;
};
struct IPCInternalRequest {
nsCString method;
nsIURI[] urlList;
HeadersGuardEnum headersGuard;
HeadersEntry[] headers;
BodyStreamVariant? body;
int64_t bodySize;
nsCString preferredAlternativeDataType;
nsContentPolicyType contentPolicyType;
int32_t internalPriority;
nsCString referrer;
ReferrerPolicy referrerPolicy;
ReferrerPolicy environmentReferrerPolicy;
RequestMode requestMode;
RequestCredentials requestCredentials;
RequestCache cacheMode;
RequestRedirect requestRedirect;
RequestPriority requestPriority;
nsString integrity;
bool keepalive;
nsCString fragment;
PrincipalInfo? principalInfo;
PrincipalInfo? interceptionTriggeringPrincipalInfo;
nsContentPolicyType interceptionContentPolicyType;
RedirectHistoryEntryInfo[] interceptionRedirectChain;
bool interceptionFromThirdParty;
CrossOriginEmbedderPolicy embedderPolicy;
};
struct InternalResponseMetadata {
ResponseType type;
nsIURI[] urlList;
uint16_t status;
nsCString statusText;
HeadersGuardEnum headersGuard;
HeadersEntry[] headers;
nsresult errorCode;
nsCString alternativeDataType;
nullable nsITransportSecurityInfo securityInfo;
PrincipalInfo? principalInfo;
nullable BlobImpl bodyBlobImpl;
nsString bodyLocalPath;
RequestCredentials credentialsMode;
};
struct ParentToParentInternalResponse {
InternalResponseMetadata metadata;
ParentToParentStream? body;
int64_t bodySize;
ParentToParentStream? alternativeBody;
};
struct ParentToChildInternalResponse {
InternalResponseMetadata metadata;
ParentToChildStream? body;
int64_t bodySize;
ParentToChildStream? alternativeBody;
};
struct ChildToParentInternalResponse {
InternalResponseMetadata metadata;
ChildToParentStream? body;
int64_t bodySize;
ChildToParentStream? alternativeBody;
};
struct ResponseTiming {
IPCPerformanceTimingData timingData;
nsString initiatorType;
nsString entryName;
};
struct ResponseEndArgs {
EndReason endReason;
};
} // namespace ipc
} // namespace mozilla