#include "third_party/blink/renderer/modules/webmidi/midi_dispatcher.h"
#include <utility>
#include "base/trace_event/trace_event.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
namespace blink {
namespace {
static const size_t kMaxUnacknowledgedBytesSent = …;
}
MIDIDispatcher::MIDIDispatcher(ExecutionContext* execution_context)
: … { … }
MIDIDispatcher::~MIDIDispatcher() = default;
void MIDIDispatcher::SendMIDIData(uint32_t port,
const uint8_t* data,
wtf_size_t length,
base::TimeTicks timestamp) { … }
void MIDIDispatcher::AddInputPort(midi::mojom::blink::PortInfoPtr info) { … }
void MIDIDispatcher::AddOutputPort(midi::mojom::blink::PortInfoPtr info) { … }
void MIDIDispatcher::SetInputPortState(uint32_t port,
midi::mojom::blink::PortState state) { … }
void MIDIDispatcher::SetOutputPortState(uint32_t port,
midi::mojom::blink::PortState state) { … }
void MIDIDispatcher::SessionStarted(midi::mojom::blink::Result result) { … }
void MIDIDispatcher::AcknowledgeSentData(uint32_t bytes_sent) { … }
void MIDIDispatcher::DataReceived(uint32_t port,
const Vector<uint8_t>& data,
base::TimeTicks timestamp) { … }
void MIDIDispatcher::Trace(Visitor* visitor) const { … }
}