#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ipc/ipc_message_pipe_reader.h"
#include <stdint.h>
#include <utility>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/raw_ref.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "ipc/ipc_channel_mojo.h"
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/cpp/bindings/thread_safe_proxy.h"
namespace IPC {
namespace internal {
namespace {
class ThreadSafeProxy : public mojo::ThreadSafeProxy { … };
}
MessagePipeReader::MessagePipeReader(
mojo::MessagePipeHandle pipe,
mojo::PendingAssociatedRemote<mojom::Channel> sender,
mojo::PendingAssociatedReceiver<mojom::Channel> receiver,
scoped_refptr<base::SequencedTaskRunner> task_runner,
MessagePipeReader::Delegate* delegate)
: … { … }
MessagePipeReader::~MessagePipeReader() { … }
void MessagePipeReader::FinishInitializationOnIOThread(
base::ProcessId self_pid) { … }
void MessagePipeReader::Close() { … }
bool MessagePipeReader::Send(std::unique_ptr<Message> message) { … }
void MessagePipeReader::GetRemoteInterface(
mojo::GenericPendingAssociatedReceiver receiver) { … }
void MessagePipeReader::SetPeerPid(int32_t peer_pid) { … }
void MessagePipeReader::Receive(MessageView message_view) { … }
void MessagePipeReader::GetAssociatedInterface(
mojo::GenericPendingAssociatedReceiver receiver) { … }
void MessagePipeReader::OnPipeError(MojoResult error) { … }
void MessagePipeReader::ForwardMessage(mojo::Message message) { … }
}
}