#include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
#include <stddef.h>
#include <stdint.h>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/interface_endpoint_client.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/lib/validation_util.h"
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
namespace mojo {
namespace internal {
namespace {
const char kMessageTag[] = …;
bool ValidateControlResponse(Message* message) { … }
RunCallback;
class RunResponseForwardToCallback : public MessageReceiver { … };
bool RunResponseForwardToCallback::Accept(Message* message) { … }
void SendRunMessage(InterfaceEndpointClient* endpoint,
interface_control::RunInputPtr input_ptr,
RunCallback callback) { … }
Message ConstructRunOrClosePipeMessage(
interface_control::RunOrClosePipeInputPtr input_ptr) { … }
void SendRunOrClosePipeMessage(
InterfaceEndpointClient* endpoint,
interface_control::RunOrClosePipeInputPtr input_ptr) { … }
void RunVersionCallback(
base::OnceCallback<void(uint32_t)> callback,
interface_control::RunResponseMessageParamsPtr run_response) { … }
void RunClosure(base::OnceClosure callback,
interface_control::RunResponseMessageParamsPtr run_response) { … }
}
ControlMessageProxy::ControlMessageProxy(InterfaceEndpointClient* owner)
: … { … }
ControlMessageProxy::~ControlMessageProxy() { … }
void ControlMessageProxy::QueryVersion(
base::OnceCallback<void(uint32_t)> callback) { … }
void ControlMessageProxy::RequireVersion(uint32_t version) { … }
void ControlMessageProxy::FlushForTesting() { … }
void ControlMessageProxy::FlushAsyncForTesting(base::OnceClosure callback) { … }
void ControlMessageProxy::RunFlushForTestingClosure() { … }
void ControlMessageProxy::EnableIdleTracking(base::TimeDelta timeout) { … }
void ControlMessageProxy::SendMessageAck() { … }
void ControlMessageProxy::NotifyIdle() { … }
void ControlMessageProxy::OnConnectionError() { … }
}
}