#ifndef IPC_IPC_MOJO_HANDLE_ATTACHMENT_H_
#define IPC_IPC_MOJO_HANDLE_ATTACHMENT_H_
#include "build/build_config.h"
#include "ipc/ipc_message_attachment.h"
#include "ipc/ipc_message_support_export.h"
#include "mojo/public/cpp/system/handle.h"
namespace IPC {
namespace internal {
class IPC_MESSAGE_SUPPORT_EXPORT MojoHandleAttachment
: public MessageAttachment {
public:
explicit MojoHandleAttachment(mojo::ScopedHandle handle);
MojoHandleAttachment(const MojoHandleAttachment&) = delete;
MojoHandleAttachment& operator=(const MojoHandleAttachment&) = delete;
Type GetType() const override;
mojo::ScopedHandle TakeHandle();
private:
~MojoHandleAttachment() override;
mojo::ScopedHandle handle_;
};
}
}
#endif