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

#ifndef PCompositorBridge_h
#define PCompositorBridge_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"

// Headers for typedefs
#include "mozilla/TimeStamp.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/LayersSurfaces.h"
#include "mozilla/layers/LayersMessages.h"
#include "mozilla/widget/PlatformWidgetTypes.h"
#include "mozilla/layers/PCompositorBridgeTypes.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct FrameStats|
//
namespace mozilla {
namespace layers {
class FrameStats final
{
private:
    typedef ::mozilla::layers::TransactionId TransactionId;
    typedef ::mozilla::TimeStamp TimeStamp;
    typedef ::int32_t int32_t;
    typedef ::uint32_t uint32_t;
    typedef ::nsCString nsCString;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    FrameStats() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT FrameStats(
            const TransactionId& _id,
            const TimeStamp& _compositeStart,
            const TimeStamp& _renderStart,
            const TimeStamp& _compositeEnd,
            const int32_t& _contentFrameTime,
            const double& _resourceUploadTime,
            const double& _gpuCacheUploadTime,
            const TimeStamp& _transactionStart,
            const TimeStamp& _refreshStart,
            const TimeStamp& _fwdTime,
            const TimeStamp& _sceneBuiltTime,
            const uint32_t& _skippedComposites,
            const nsCString& _url) :
        id_(_id),
        compositeStart_(_compositeStart),
        renderStart_(_renderStart),
        compositeEnd_(_compositeEnd),
        transactionStart_(_transactionStart),
        refreshStart_(_refreshStart),
        fwdTime_(_fwdTime),
        sceneBuiltTime_(_sceneBuiltTime),
        url_(_url),
        resourceUploadTime_(_resourceUploadTime),
        gpuCacheUploadTime_(_gpuCacheUploadTime),
        contentFrameTime_(_contentFrameTime),
        skippedComposites_(_skippedComposites)
    {
    }

    MOZ_IMPLICIT FrameStats(
            TransactionId&& _id,
            TimeStamp&& _compositeStart,
            TimeStamp&& _renderStart,
            TimeStamp&& _compositeEnd,
            int32_t&& _contentFrameTime,
            double&& _resourceUploadTime,
            double&& _gpuCacheUploadTime,
            TimeStamp&& _transactionStart,
            TimeStamp&& _refreshStart,
            TimeStamp&& _fwdTime,
            TimeStamp&& _sceneBuiltTime,
            uint32_t&& _skippedComposites,
            nsCString&& _url) :
        id_(std::move(_id)),
        compositeStart_(std::move(_compositeStart)),
        renderStart_(std::move(_renderStart)),
        compositeEnd_(std::move(_compositeEnd)),
        transactionStart_(std::move(_transactionStart)),
        refreshStart_(std::move(_refreshStart)),
        fwdTime_(std::move(_fwdTime)),
        sceneBuiltTime_(std::move(_sceneBuiltTime)),
        url_(std::move(_url)),
        resourceUploadTime_(std::move(_resourceUploadTime)),
        gpuCacheUploadTime_(std::move(_gpuCacheUploadTime)),
        contentFrameTime_(std::move(_contentFrameTime)),
        skippedComposites_(std::move(_skippedComposites))
    {
    }

    TransactionId&
    id()
    {
        return id_;
    }
    const TransactionId&
    id() const
    {
        return id_;
    }

    TimeStamp&
    compositeStart()
    {
        return compositeStart_;
    }
    const TimeStamp&
    compositeStart() const
    {
        return compositeStart_;
    }

    TimeStamp&
    renderStart()
    {
        return renderStart_;
    }
    const TimeStamp&
    renderStart() const
    {
        return renderStart_;
    }

    TimeStamp&
    compositeEnd()
    {
        return compositeEnd_;
    }
    const TimeStamp&
    compositeEnd() const
    {
        return compositeEnd_;
    }

    int32_t&
    contentFrameTime()
    {
        return contentFrameTime_;
    }
    const int32_t&
    contentFrameTime() const
    {
        return contentFrameTime_;
    }

    double&
    resourceUploadTime()
    {
        return resourceUploadTime_;
    }
    const double&
    resourceUploadTime() const
    {
        return resourceUploadTime_;
    }

    double&
    gpuCacheUploadTime()
    {
        return gpuCacheUploadTime_;
    }
    const double&
    gpuCacheUploadTime() const
    {
        return gpuCacheUploadTime_;
    }

    TimeStamp&
    transactionStart()
    {
        return transactionStart_;
    }
    const TimeStamp&
    transactionStart() const
    {
        return transactionStart_;
    }

    TimeStamp&
    refreshStart()
    {
        return refreshStart_;
    }
    const TimeStamp&
    refreshStart() const
    {
        return refreshStart_;
    }

    TimeStamp&
    fwdTime()
    {
        return fwdTime_;
    }
    const TimeStamp&
    fwdTime() const
    {
        return fwdTime_;
    }

    TimeStamp&
    sceneBuiltTime()
    {
        return sceneBuiltTime_;
    }
    const TimeStamp&
    sceneBuiltTime() const
    {
        return sceneBuiltTime_;
    }

    uint32_t&
    skippedComposites()
    {
        return skippedComposites_;
    }
    const uint32_t&
    skippedComposites() const
    {
        return skippedComposites_;
    }

    nsCString&
    url()
    {
        return url_;
    }
    const nsCString&
    url() const
    {
        return url_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<TransactionId> id_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> compositeStart_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> renderStart_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> compositeEnd_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> transactionStart_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> refreshStart_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> fwdTime_;
    ::mozilla::ipc::IPDLStructMember<TimeStamp> sceneBuiltTime_;
    ::mozilla::ipc::IPDLStructMember<nsCString> url_;
    ::mozilla::ipc::IPDLStructMember<double> resourceUploadTime_;
    ::mozilla::ipc::IPDLStructMember<double> gpuCacheUploadTime_;
    ::mozilla::ipc::IPDLStructMember<int32_t> contentFrameTime_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> skippedComposites_;
};
} // namespace layers
} // namespace mozilla

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

namespace mozilla {
namespace layers {
class PCompositorBridgeParent;
} // namespace layers
} // namespace mozilla
namespace mozilla {
namespace layers {
class PCompositorBridgeChild;
} // namespace layers
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PCompositorBridgeChild and PCompositorBridgeParent
//
namespace mozilla {
namespace layers {
namespace PCompositorBridge {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::layers::PCompositorBridgeParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::layers::PCompositorBridgeChild>* aChild);

enum MessageType {
    PCompositorBridgeStart = PCompositorBridgeMsgStart << 16,
    Msg_DidComposite__ID,
    Msg_NotifyFrameStats__ID,
    Msg_ParentAsyncMessages__ID,
    Msg_ObserveLayersUpdate__ID,
    Msg_CompositorOptionsChanged__ID,
    Msg_NotifyJankedAnimations__ID,
    Msg___delete____ID,
    Reply___delete____ID,
    Msg_PCompositorWidgetConstructor__ID,
    Reply_PCompositorWidgetConstructor__ID,
    Msg_Initialize__ID,
    Reply_Initialize__ID,
    Msg_PAPZConstructor__ID,
    Reply_PAPZConstructor__ID,
    Msg_PAPZCTreeManagerConstructor__ID,
    Reply_PAPZCTreeManagerConstructor__ID,
    Msg_WillClose__ID,
    Reply_WillClose__ID,
    Msg_Pause__ID,
    Reply_Pause__ID,
    Msg_Resume__ID,
    Reply_Resume__ID,
    Msg_ResumeAsync__ID,
    Msg_NotifyChildCreated__ID,
    Reply_NotifyChildCreated__ID,
    Msg_MapAndNotifyChildCreated__ID,
    Reply_MapAndNotifyChildCreated__ID,
    Msg_AdoptChild__ID,
    Msg_NotifyChildRecreated__ID,
    Reply_NotifyChildRecreated__ID,
    Msg_NotifyMemoryPressure__ID,
    Msg_FlushRendering__ID,
    Reply_FlushRendering__ID,
    Msg_FlushRenderingAsync__ID,
    Msg_WaitOnTransactionProcessed__ID,
    Reply_WaitOnTransactionProcessed__ID,
    Msg_ForcePresent__ID,
    Msg_StartFrameTimeRecording__ID,
    Reply_StartFrameTimeRecording__ID,
    Msg_StopFrameTimeRecording__ID,
    Reply_StopFrameTimeRecording__ID,
    Msg_PTextureConstructor__ID,
    Reply_PTextureConstructor__ID,
    Msg_SyncWithCompositor__ID,
    Reply_SyncWithCompositor__ID,
    Msg_PWebRenderBridgeConstructor__ID,
    Reply_PWebRenderBridgeConstructor__ID,
    Msg_CheckContentOnlyTDR__ID,
    Reply_CheckContentOnlyTDR__ID,
    Msg_BeginRecording__ID,
    Reply_BeginRecording__ID,
    Msg_EndRecording__ID,
    Reply_EndRecording__ID,
    Msg_RequestFxrOutput__ID,
    Msg_DynamicToolbarOffsetChanged__ID,
    PCompositorBridgeEnd
};

mozilla::UniquePtr<IPC::Message>
Msg_DidComposite(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyFrameStats(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ParentAsyncMessages(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ObserveLayersUpdate(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_CompositorOptionsChanged(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyJankedAnimations(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg___delete__(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply___delete__(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PCompositorWidgetConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PCompositorWidgetConstructor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Initialize(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Initialize(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PAPZConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PAPZConstructor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PAPZCTreeManagerConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PAPZCTreeManagerConstructor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_WillClose(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_WillClose(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Pause(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Pause(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Resume(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Resume(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ResumeAsync(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyChildCreated(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_NotifyChildCreated(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_MapAndNotifyChildCreated(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_MapAndNotifyChildCreated(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_AdoptChild(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyChildRecreated(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_NotifyChildRecreated(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyMemoryPressure(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_FlushRendering(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_FlushRendering(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_FlushRenderingAsync(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_WaitOnTransactionProcessed(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_WaitOnTransactionProcessed(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ForcePresent(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_StartFrameTimeRecording(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_StartFrameTimeRecording(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_StopFrameTimeRecording(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_StopFrameTimeRecording(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PTextureConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PTextureConstructor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_SyncWithCompositor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_SyncWithCompositor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PWebRenderBridgeConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PWebRenderBridgeConstructor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_CheckContentOnlyTDR(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CheckContentOnlyTDR(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_BeginRecording(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_BeginRecording(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_EndRecording(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_EndRecording(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_RequestFxrOutput(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_DynamicToolbarOffsetChanged(IPC::Message::routeid_t routingId);



} // namespace PCompositorBridge
} // namespace layers
} // namespace mozilla

#endif // ifndef PCompositorBridge_h
