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

#ifndef PProcessHangMonitor_h
#define PProcessHangMonitor_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/dom/ipc/IdType.h"
#include "mozilla/ipc/IPDLStructMember.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SlowScriptData|
//
namespace mozilla {
class SlowScriptData final
{
private:
    typedef ::mozilla::dom::TabId TabId;
    typedef ::nsCString nsCString;
    typedef ::nsString nsString;

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

    MOZ_IMPLICIT SlowScriptData(
            const TabId& _tabId,
            const nsCString& _filename,
            const nsString& _addonId,
            const double& _duration) :
        tabId_(_tabId),
        filename_(_filename),
        addonId_(_addonId),
        duration_(_duration)
    {
    }

    MOZ_IMPLICIT SlowScriptData(
            TabId&& _tabId,
            nsCString&& _filename,
            nsString&& _addonId,
            double&& _duration) :
        tabId_(std::move(_tabId)),
        filename_(std::move(_filename)),
        addonId_(std::move(_addonId)),
        duration_(std::move(_duration))
    {
    }

    TabId&
    tabId()
    {
        return tabId_;
    }
    const TabId&
    tabId() const
    {
        return tabId_;
    }

    nsCString&
    filename()
    {
        return filename_;
    }
    const nsCString&
    filename() const
    {
        return filename_;
    }

    nsString&
    addonId()
    {
        return addonId_;
    }
    const nsString&
    addonId() const
    {
        return addonId_;
    }

    double&
    duration()
    {
        return duration_;
    }
    const double&
    duration() const
    {
        return duration_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<TabId> tabId_;
    ::mozilla::ipc::IPDLStructMember<nsCString> filename_;
    ::mozilla::ipc::IPDLStructMember<nsString> addonId_;
    ::mozilla::ipc::IPDLStructMember<double> duration_;
};
} // namespace mozilla

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

namespace mozilla {
class PProcessHangMonitorParent;
} // namespace mozilla
namespace mozilla {
class PProcessHangMonitorChild;
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PProcessHangMonitorChild and PProcessHangMonitorParent
//
namespace mozilla {
namespace PProcessHangMonitor {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::PProcessHangMonitorParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PProcessHangMonitorChild>* aChild);

nsresult
CreateEndpoints(
        mozilla::ipc::Endpoint<::mozilla::PProcessHangMonitorParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PProcessHangMonitorChild>* aChild);

enum MessageType {
    PProcessHangMonitorStart = PProcessHangMonitorMsgStart << 16,
    Msg_HangEvidence__ID,
    Msg_ClearHang__ID,
    Msg_TerminateScript__ID,
    Msg_RequestContentJSInterrupt__ID,
    Msg_BeginStartingDebugger__ID,
    Msg_EndStartingDebugger__ID,
    Msg_PaintWhileInterruptingJS__ID,
    Msg_UnloadLayersWhileInterruptingJS__ID,
    Msg_CancelContentJSExecutionIfRunning__ID,
    Msg_SetMainThreadQoSPriority__ID,
    PProcessHangMonitorEnd
};

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

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

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

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

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

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

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

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

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

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



} // namespace PProcessHangMonitor
} // namespace mozilla

#endif // ifndef PProcessHangMonitor_h
