chromium/third_party/blink/renderer/modules/webmidi/midi_dispatcher.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {
// The maximum number of bytes which we're allowed to send to the browser
// before getting acknowledgement back from the browser that they've been
// successfully sent.
static const size_t kMaxUnacknowledgedBytesSent =;  // 10 MB.
}  // namespace

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 {}

}  // namespace blink