#include "third_party/blink/renderer/modules/webmidi/midi_access_initializer.h"
#include <memory>
#include <utility>
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_midi_options.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/navigator.h"
#include "third_party/blink/renderer/modules/permissions/permission_utils.h"
#include "third_party/blink/renderer/modules/webmidi/midi_access.h"
#include "third_party/blink/renderer/modules/webmidi/midi_port.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
namespace blink {
PortState;
Result;
MIDIAccessInitializer::MIDIAccessInitializer(ScriptState* script_state,
const MIDIOptions* options)
: … { … }
ScriptPromise<MIDIAccess> MIDIAccessInitializer::Start(LocalDOMWindow* window) { … }
void MIDIAccessInitializer::DidAddInputPort(const String& id,
const String& manufacturer,
const String& name,
const String& version,
PortState state) { … }
void MIDIAccessInitializer::DidAddOutputPort(const String& id,
const String& manufacturer,
const String& name,
const String& version,
PortState state) { … }
void MIDIAccessInitializer::DidSetInputPortState(unsigned port_index,
PortState state) { … }
void MIDIAccessInitializer::DidSetOutputPortState(unsigned port_index,
PortState state) { … }
void MIDIAccessInitializer::DidStartSession(Result result) { … }
void MIDIAccessInitializer::Trace(Visitor* visitor) const { … }
void MIDIAccessInitializer::StartSession() { … }
void MIDIAccessInitializer::OnPermissionsUpdated(
mojom::blink::PermissionStatus status) { … }
void MIDIAccessInitializer::OnPermissionUpdated(
mojom::blink::PermissionStatus status) { … }
}