chromium/content/browser/media/midi_host.cc

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

#include "content/browser/media/midi_host.h"

#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/process/process.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/bad_message.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h"
#include "media/midi/message_util.h"
#include "media/midi/midi_message_queue.h"
#include "media/midi/midi_service.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "third_party/blink/public/common/features.h"

namespace content {
namespace {

// The total number of bytes which we're allowed to send to the OS
// before knowing that they have been successfully sent.
const size_t kMaxInFlightBytes =;  // 10 MB.

// We keep track of the number of bytes successfully sent to
// the hardware.  Every once in a while we report back to the renderer
// the number of bytes sent since the last report. This threshold determines
// how many bytes will be sent before reporting back to the renderer.
const size_t kAcknowledgementThresholdBytes =;  // 1 MB.

}  // namespace

IsDataByte;
IsSystemRealTimeMessage;
IsValidWebMIDIData;
kEndOfSysExByte;
kSysExByte;
PortState;
Result;

MidiHost::MidiHost(int renderer_process_id, midi::MidiService* midi_service)
    :{}

MidiHost::~MidiHost() {}

// static
void MidiHost::BindReceiver(
    int render_process_id,
    midi::MidiService* midi_service,
    mojo::PendingReceiver<midi::mojom::MidiSessionProvider> receiver) {}

void MidiHost::CompleteStartSession(Result result) {}

void MidiHost::AddInputPort(const midi::mojom::PortInfo& info) {}

void MidiHost::AddOutputPort(const midi::mojom::PortInfo& info) {}

void MidiHost::SetInputPortState(uint32_t port, PortState state) {}

void MidiHost::SetOutputPortState(uint32_t port, PortState state) {}

void MidiHost::ReceiveMidiData(uint32_t port,
                               const uint8_t* data,
                               size_t length,
                               base::TimeTicks timestamp) {}

void MidiHost::AccumulateMidiBytesSent(size_t n) {}

void MidiHost::Detach() {}

void MidiHost::StartSession(
    mojo::PendingReceiver<midi::mojom::MidiSession> session_receiver,
    mojo::PendingRemote<midi::mojom::MidiSessionClient> client) {}

void MidiHost::SendData(uint32_t port,
                        const std::vector<uint8_t>& data,
                        base::TimeTicks timestamp) {}

template <typename Method, typename... Params>
void MidiHost::CallClient(Method method, Params... params) {}

void MidiHost::EndSession() {}

}  // namespace content