//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef PDocumentChannelChild_h
#define PDocumentChannelChild_h

#include "mozilla/net/PDocumentChannel.h"
#ifdef DEBUG
#include "prenv.h"
#endif  // DEBUG

#include "mozilla/Tainting.h"
#include "mozilla/ipc/MessageChannel.h"
#include "mozilla/ipc/ProtocolUtils.h"
// Headers for things that cannot be forward declared
#include "Units.h"
#include "mozilla/HalIPCUtils.h"
#include "mozilla/RemoteLazyInputStream.h"
#include "mozilla/ScrollbarPreferences.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/FeaturePolicy.h"
#include "mozilla/dom/IntegrityPolicy.h"
#include "mozilla/dom/LoadURIOptionsBinding.h"
#include "mozilla/dom/NavigationBinding.h"
#include "mozilla/dom/NotificationBinding.h"
#include "mozilla/dom/RequestBinding.h"
#include "mozilla/dom/ServiceWorkerBinding.h"
#include "mozilla/dom/UserNavigationInvolvement.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/gfx/Types.h"
#include "mozilla/ipc/BackgroundUtils.h"
#include "mozilla/ipc/DataPipe.h"
#include "mozilla/net/ClassOfService.h"
#include "mozilla/net/DNS.h"
#include "mozilla/net/PHttpChannelParams.h"
#include "nsICacheInfoChannel.h"
#include "nsIClassifiedChannel.h"
#include "nsIContentPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsILoadInfo.h"
#include "nsIWidgetListener.h"
#include "nsNetUtil.h"
#include "nsRFPService.h"

namespace mozilla {
namespace net {
class PNeckoChild;
} // namespace net
} // namespace mozilla
namespace mozilla {
namespace net {
class PNeckoParent;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace extensions {
class PStreamFilterChild;
} // namespace extensions
} // namespace mozilla
namespace mozilla {
namespace extensions {
class PStreamFilterParent;
} // namespace extensions
} // namespace mozilla

namespace mozilla {
namespace net {
class PNeckoChild;
} // namespace net
} // namespace mozilla

namespace mozilla {
struct void_t;
} // namespace mozilla

namespace mozilla {
struct void_t;
} // namespace mozilla

struct nsHttpAtom;

namespace mozilla {
namespace net {
class nsHttpResponseHead;
} // namespace net
} // namespace mozilla

namespace mozilla {
class TimeStamp;
} // namespace mozilla

class nsIPropertyBag2;

class nsDOMNavigationTiming;

class nsDocShellLoadState;

namespace mozilla {
namespace dom {
struct LoadingSessionHistoryInfo;
} // namespace dom
} // namespace mozilla

namespace mozilla {
struct void_t;
} // namespace mozilla

namespace mozilla {
struct SerializedStructuredCloneBuffer;
} // namespace mozilla

namespace mozilla {
namespace dom {
struct LoadingSessionHistoryInfo;
} // namespace dom
} // namespace mozilla

class nsIPrincipal;

class nsIURI;

class nsIPolicyContainer;

class nsIInputStream;

class nsIReferrerInfo;

class nsIVariant;

namespace mozilla {
class RemoteLazyInputStream;
} // namespace mozilla

namespace mozilla {
namespace ipc {
class BigBuffer;
} // namespace ipc
} // namespace mozilla

namespace mozilla {
namespace net {
class nsHttpHeaderArray;
} // namespace net
} // namespace mozilla

namespace mozilla {
namespace net {


class PDocumentChannelChild :
    public mozilla::ipc::IRefCountedProtocol
{
private:
    friend class ::mozilla::net::PNeckoChild;
public:
    static constexpr ::mozilla::ipc::ProtocolId kProtocolId = PDocumentChannelMsgStart;
protected:
    typedef mozilla::ipc::ActorId ActorId;
    typedef ::mozilla::ipc::BigBuffer BigBuffer;
    typedef ::mozilla::ipc::BufferedInputStreamParams BufferedInputStreamParams;
    typedef ::mozilla::ipc::ByteBuf ByteBuf;
    typedef ::mozilla::ipc::CSPInfo CSPInfo;
    typedef ::mozilla::CSSRect CSSRect;
    typedef ::mozilla::CSSSize CSSSize;
    typedef ::mozilla::CSSToLayoutDeviceScale CSSToLayoutDeviceScale;
    typedef ::mozilla::net::ChildLoadInfoForwarderArgs ChildLoadInfoForwarderArgs;
    typedef ::mozilla::net::ClassOfService ClassOfService;
    typedef ::mozilla::net::ClassificationFlags ClassificationFlags;
    typedef ::mozilla::dom::ClonedMessageData ClonedMessageData;
    typedef ::mozilla::dom::ClonedOrErrorMessageData ClonedOrErrorMessageData;
    typedef ::mozilla::net::ConsoleReportCollected ConsoleReportCollected;
    typedef ::mozilla::ipc::ContentPrincipalInfo ContentPrincipalInfo;
    typedef ::mozilla::ipc::ContentSecurityPolicy ContentSecurityPolicy;
    typedef ::mozilla::net::CookieChange CookieChange;
    typedef ::mozilla::net::CookieJarSettingsArgs CookieJarSettingsArgs;
    typedef ::mozilla::net::CookiePermissionData CookiePermissionData;
    typedef ::mozilla::net::CookieStruct CookieStruct;
    typedef ::mozilla::net::CookieStructTable CookieStructTable;
    typedef ::mozilla::net::CorsPreflightArgs CorsPreflightArgs;
    typedef ::mozilla::dom::CreatedWindowInfo CreatedWindowInfo;
    typedef ::nsILoadInfo::CrossOriginEmbedderPolicy CrossOriginEmbedderPolicy;
    typedef ::mozilla::ipc::DataPipeReceiver DataPipeReceiver;
    typedef ::mozilla::ipc::DataPipeReceiverStreamParams DataPipeReceiverStreamParams;
    typedef ::mozilla::DesktopIntRect DesktopIntRect;
    typedef ::mozilla::DesktopToLayoutDeviceScale DesktopToLayoutDeviceScale;
    typedef ::mozilla::dom::IntegrityPolicy::Destinations Destinations;
    typedef ::mozilla::dom::DimensionInfo DimensionInfo;
    typedef ::mozilla::dom::DocShellLoadStateInit DocShellLoadStateInit;
    typedef ::mozilla::net::DocumentChannelCreationArgs DocumentChannelCreationArgs;
    typedef ::mozilla::net::DocumentChannelElementCreationArgs DocumentChannelElementCreationArgs;
    typedef ::mozilla::net::DocumentCreationArgs DocumentCreationArgs;
    typedef ::mozilla::net::EarlyHintConnectArgs EarlyHintConnectArgs;
    typedef ::mozilla::ipc::EncryptedFileInputStreamParams EncryptedFileInputStreamParams;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::dom::ErrorMessageData ErrorMessageData;
    typedef ::mozilla::ipc::ExpandedPrincipalInfo ExpandedPrincipalInfo;
    typedef ::mozilla::dom::FeaturePolicyInfo FeaturePolicyInfo;
    typedef ::mozilla::net::FileChannelInfo FileChannelInfo;
    typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
    typedef ::mozilla::ipc::FileInputStreamParams FileInputStreamParams;
    typedef ::mozilla::dom::ForceMediaDocument ForceMediaDocument;
    typedef ::mozilla::dom::FrameScriptInfo FrameScriptInfo;
    typedef ::mozilla::net::GIOChannelConnectArgs GIOChannelConnectArgs;
    typedef ::mozilla::net::GIOChannelCreationArgs GIOChannelCreationArgs;
    typedef ::mozilla::net::GIOChannelOpenArgs GIOChannelOpenArgs;
    typedef ::mozilla::net::GeckoViewContentChannelArgs GeckoViewContentChannelArgs;
    typedef ::mozilla::net::GeckoViewContentChannelConnectArgs GeckoViewContentChannelConnectArgs;
    typedef ::mozilla::net::GeckoViewContentChannelOpenArgs GeckoViewContentChannelOpenArgs;
    typedef ::nsILoadInfo::HTTPSUpgradeTelemetryType HTTPSUpgradeTelemetryType;
    typedef ::mozilla::ipc::HeaderEntry HeaderEntry;
    typedef ::mozilla::net::HttpActivity HttpActivity;
    typedef ::mozilla::net::HttpActivityArgs HttpActivityArgs;
    typedef ::mozilla::net::HttpChannelConnectArgs HttpChannelConnectArgs;
    typedef ::mozilla::net::HttpChannelCreationArgs HttpChannelCreationArgs;
    typedef ::mozilla::net::HttpChannelOpenArgs HttpChannelOpenArgs;
    typedef ::mozilla::net::HttpConnectionActivity HttpConnectionActivity;
    typedef ::mozilla::net::HttpConnectionInfoCloneArgs HttpConnectionInfoCloneArgs;
    typedef ::mozilla::dom::IDPLVariant IDPLVariant;
    typedef ::nsILoadInfo::IPAddressSpace IPAddressSpace;
    typedef ::mozilla::dom::IPCImage IPCImage;
    typedef ::mozilla::dom::IPCNotification IPCNotification;
    typedef ::mozilla::dom::IPCNotificationAction IPCNotificationAction;
    typedef ::mozilla::dom::IPCNotificationOptions IPCNotificationOptions;
    typedef ::mozilla::dom::IPCNotificationsOrError IPCNotificationsOrError;
    typedef ::mozilla::dom::IPCServiceWorkerDescriptor IPCServiceWorkerDescriptor;
    typedef ::mozilla::ipc::IPCStream IPCStream;
    typedef ::mozilla::dom::IPDLProperty IPDLProperty;
    typedef ::mozilla::dom::IPDLVariantValue IPDLVariantValue;
    typedef ::mozilla::ImageIntSize ImageIntSize;
    typedef ::mozilla::ipc::InputStreamLengthWrapperParams InputStreamLengthWrapperParams;
    typedef ::mozilla::ipc::InputStreamParams InputStreamParams;
    typedef ::mozilla::ipc::IntegrityPolicyArgs IntegrityPolicyArgs;
    typedef ::mozilla::ipc::IntegrityPolicyEntry IntegrityPolicyEntry;
    typedef ::mozilla::net::InterceptionInfoArg InterceptionInfoArg;
    typedef ::mozilla::LayoutDeviceIntPoint LayoutDeviceIntPoint;
    typedef ::mozilla::LayoutDeviceIntRect LayoutDeviceIntRect;
    typedef ::mozilla::LayoutDeviceIntSize LayoutDeviceIntSize;
    typedef ::mozilla::net::LinkHeader LinkHeader;
    typedef ::mozilla::net::LoadInfoArgs LoadInfoArgs;
    typedef ::mozilla::dom::LoadingSessionHistoryInfo LoadingSessionHistoryInfo;
    typedef ::mozilla::ipc::MIMEInputStreamParams MIMEInputStreamParams;
    template<class FooSide> using ManagedEndpoint = mozilla::ipc::ManagedEndpoint<FooSide>;
    typedef ::mozilla::dom::MaybeDiscardedBrowsingContext MaybeDiscardedBrowsingContext;
    typedef ::mozilla::dom::MessageData MessageData;
    typedef ::mozilla::dom::MessageDataType MessageDataType;
    typedef ::mozilla::dom::MessagePortIdentifier MessagePortIdentifier;
    typedef ::mozilla::ipc::MultiplexInputStreamParams MultiplexInputStreamParams;
    typedef ::mozilla::dom::NavigationHistoryBehavior NavigationHistoryBehavior;
    typedef ::mozilla::net::NetAddr NetAddr;
    typedef ::mozilla::dom::NotificationDirection NotificationDirection;
    typedef ::mozilla::ipc::NullPrincipalInfo NullPrincipalInfo;
    typedef ::mozilla::net::ObjectCreationArgs ObjectCreationArgs;
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::mozilla::dom::OwnerShowInfo OwnerShowInfo;
    typedef ::mozilla::net::PNeckoChild PNeckoChild;
    typedef ::mozilla::net::PNeckoParent PNeckoParent;
    typedef ::mozilla::extensions::PStreamFilterChild PStreamFilterChild;
    typedef ::mozilla::extensions::PStreamFilterParent PStreamFilterParent;
    typedef ::mozilla::net::ParentLoadInfoForwarderArgs ParentLoadInfoForwarderArgs;
    typedef ::mozilla::dom::ParentShowInfo ParentShowInfo;
    typedef ::mozilla::ipc::PolicyContainerArgs PolicyContainerArgs;
    typedef ::mozilla::net::PreferredAlternativeDataDeliveryTypeIPC PreferredAlternativeDataDeliveryTypeIPC;
    typedef ::mozilla::net::PreferredAlternativeDataTypeParams PreferredAlternativeDataTypeParams;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef ::mozilla::net::ProxyInfoCloneArgs ProxyInfoCloneArgs;
    typedef ::mozilla::RFPTargetSet RFPTargetSet;
    typedef ::mozilla::net::RedirectHistoryEntryInfo RedirectHistoryEntryInfo;
    typedef ::mozilla::net::RedirectToRealChannelArgs RedirectToRealChannelArgs;
    typedef ::mozilla::dom::RefMessageData RefMessageData;
    typedef ::mozilla::RemoteLazyInputStream RemoteLazyInputStream;
    typedef ::mozilla::ipc::RemoteLazyInputStreamParams RemoteLazyInputStreamParams;
    typedef ::mozilla::net::RemoteStreamInfo RemoteStreamInfo;
    typedef ::mozilla::dom::ReplacementChannelConfigInit ReplacementChannelConfigInit;
    typedef ::mozilla::net::RequestHeaderTuples RequestHeaderTuples;
    typedef ::mozilla::dom::RequestMode RequestMode;
    typedef ::nsIContentSecurityPolicy::RequireTrustedTypesForDirectiveState RequireTrustedTypesForDirectiveState;
    typedef ::mozilla::net::ResourceTimingStructArgs ResourceTimingStructArgs;
    typedef mozilla::ipc::ResponseRejectReason ResponseRejectReason;
    typedef ::nsILoadInfo::SchemelessInputType SchemelessInputType;
    typedef ::mozilla::dom::ScreenDetails ScreenDetails;
    typedef ::mozilla::hal::ScreenOrientation ScreenOrientation;
    typedef ::mozilla::ScrollbarPreference ScrollbarPreference;
    typedef ::mozilla::SerializedStructuredCloneBuffer SerializedStructuredCloneBuffer;
    typedef ::mozilla::dom::ServiceWorkerState ServiceWorkerState;
    typedef ::mozilla::ipc::Shmem Shmem;
    typedef ::mozilla::ipc::SlicedInputStreamParams SlicedInputStreamParams;
    typedef ::mozilla::dom::IntegrityPolicy::Sources Sources;
    typedef ::mozilla::net::SpeculativeConnectionOverriderArgs SpeculativeConnectionOverriderArgs;
    typedef ::nsILoadInfo::StoragePermissionState StoragePermissionState;
    typedef ::mozilla::ipc::StringInputStreamParams StringInputStreamParams;
    typedef ::mozilla::gfx::SurfaceFormat SurfaceFormat;
    typedef ::mozilla::ipc::SystemPrincipalInfo SystemPrincipalInfo;
    typedef ::mozilla::TimeStamp TimeStamp;
    typedef ::mozilla::dom::TimedChannelInfo TimedChannelInfo;
    typedef ::mozilla::net::TimingStructArgs TimingStructArgs;
    typedef ::mozilla::net::TransactionObserverResult TransactionObserverResult;
    template<class T> using UniquePtr = mozilla::UniquePtr<T>;
    typedef ::mozilla::dom::UserNavigationInvolvement UserNavigationInvolvement;
    typedef ::mozilla::ipc::WebTransportHash WebTransportHash;
    typedef ::mozilla::dom::WorkerType WorkerType;
    typedef ::int16_t int16_t;
    typedef ::int32_t int32_t;
    typedef ::int64_t int64_t;
    typedef ::int8_t int8_t;
    typedef ::intptr_t intptr_t;
    typedef ::nsCString nsCString;
    typedef ::nsContentPolicyType nsContentPolicyType;
    typedef ::nsDOMNavigationTiming nsDOMNavigationTiming;
    typedef ::nsDocShellLoadState nsDocShellLoadState;
    typedef ::nsHttpAtom nsHttpAtom;
    typedef ::mozilla::net::nsHttpHeaderArray nsHttpHeaderArray;
    typedef ::mozilla::net::nsHttpResponseHead nsHttpResponseHead;
    typedef ::nsIInputStream nsIInputStream;
    typedef ::nsIPolicyContainer nsIPolicyContainer;
    typedef ::nsIPrincipal nsIPrincipal;
    typedef ::nsIPropertyBag2 nsIPropertyBag2;
    typedef ::nsIReferrerInfo nsIReferrerInfo;
    typedef ::nsIURI nsIURI;
    typedef ::nsIVariant nsIVariant;
    typedef ::nsSizeMode nsSizeMode;
    typedef ::nsString nsString;
    typedef ::nsresult nsresult;
    typedef ::uint16_t uint16_t;
    typedef ::uint32_t uint32_t;
    typedef ::uint64_t uint64_t;
    typedef ::uint8_t uint8_t;
    typedef ::uintptr_t uintptr_t;
    typedef ::mozilla::void_t void_t;

public:
    typedef std::function<void(const nsresult&)> RedirectToRealChannelResolver;
    typedef std::function<void(const MaybeDiscardedBrowsingContext&)> UpgradeObjectLoadResolver;

protected:
public:
    typedef mozilla::ipc::IProtocol IProtocol;
    typedef IPC::Message Message;
    typedef base::ProcessHandle ProcessHandle;
    typedef mozilla::ipc::MessageChannel MessageChannel;

public:
    MOZ_IMPLICIT PDocumentChannelChild();

    virtual ~PDocumentChannelChild();

protected:
    void
    ActorAlloc() final;
    void
    ActorDealloc() final;
public:
    ::base::ProcessId
    OtherPid() const;
    ::GeckoChildID
    OtherChildID() const;
    ::mozilla::ipc::EndpointProcInfo
    OtherEndpointProcInfo() const;

    PNeckoChild*
    Manager() const;

    mozilla::Span<mozilla::ipc::ProtocolId const>
    ManagedProtocolIds() const final;

    UntypedManagedContainer*
    GetManagedActors(mozilla::ipc::ProtocolId aProtocol) final;

    void
    RejectPendingResponses(ResponseRejectReason aReason) final;

    bool
    SendCancel(
            const nsresult& status,
            const nsACString& reason);

    static bool
    Send__delete__(PDocumentChannelChild* actor);

    void
    DeallocManagee(
            mozilla::ipc::ProtocolId aProtocolId,
            IProtocol* aListener) override;

    Result
    OnMessageReceived(const Message& msg__) override;

    Result
    OnMessageReceived(
            const Message& msg__,
            UniquePtr<Message>& reply__) override;

private:
    mozilla::ipc::IPDLAsyncReturnsCallbacks mAsyncCallbacks;

    bool mAwaitingManagedEndpointBind = false;

};


} // namespace net
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::net::PDocumentChannelChild*>
{
    typedef ::mozilla::net::PDocumentChannelChild* paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef PDocumentChannelChild_h
