From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- netwerk/ipc/ParentProcessDocumentChannel.h | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 netwerk/ipc/ParentProcessDocumentChannel.h (limited to 'netwerk/ipc/ParentProcessDocumentChannel.h') diff --git a/netwerk/ipc/ParentProcessDocumentChannel.h b/netwerk/ipc/ParentProcessDocumentChannel.h new file mode 100644 index 0000000000..d10d9833ff --- /dev/null +++ b/netwerk/ipc/ParentProcessDocumentChannel.h @@ -0,0 +1,61 @@ +/* vim: set sw=2 ts=8 et tw=80 : */ + +/* 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/. */ + +#ifndef mozilla_net_ParentProcessDocumentChannel_h +#define mozilla_net_ParentProcessDocumentChannel_h + +#include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/net/DocumentChannel.h" +#include "mozilla/net/DocumentLoadListener.h" +#include "nsIObserver.h" +#include "nsIAsyncVerifyRedirectCallback.h" + +namespace mozilla { +namespace net { + +class EarlyHintConnectArgs; + +class ParentProcessDocumentChannel : public DocumentChannel, + public nsIAsyncVerifyRedirectCallback, + public nsIObserver { + public: + ParentProcessDocumentChannel(nsDocShellLoadState* aLoadState, + class LoadInfo* aLoadInfo, + nsLoadFlags aLoadFlags, uint32_t aCacheKey, + bool aUriModified, bool aIsXFOError); + + NS_DECL_ISUPPORTS_INHERITED + NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK + NS_DECL_NSIOBSERVER + + NS_IMETHOD AsyncOpen(nsIStreamListener* aListener) override; + NS_IMETHOD Cancel(nsresult aStatusCode) override; + NS_IMETHOD CancelWithReason(nsresult aStatusCode, + const nsACString& aReason) override; + + RefPtr + RedirectToRealChannel( + nsTArray>&& + aStreamFilterEndpoints, + uint32_t aRedirectFlags, uint32_t aLoadFlags, + const nsTArray& aEarlyHints); + + private: + virtual ~ParentProcessDocumentChannel(); + void RemoveObserver(); + + RefPtr mDocumentLoadListener; + nsTArray> + mStreamFilterEndpoints; + MozPromiseHolder + mPromise; + bool mRequestObserversCalled = false; +}; + +} // namespace net +} // namespace mozilla + +#endif // mozilla_net_ParentProcessDocumentChannel_h -- cgit v1.2.3