Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1657)

Unified Diff: media/midi/midi_manager_alsa.cc

Issue 2422163002: Web MIDI: use midi_service.mojom for media::midi::PortState (Closed)
Patch Set: gn --check fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/midi/midi_manager.cc ('k') | media/midi/midi_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager_alsa.cc
diff --git a/media/midi/midi_manager_alsa.cc b/media/midi/midi_manager_alsa.cc
index 8a8fb9cdbcc97d1b21bd3751ed53d400b75098c5..d99751bff01be9161f404b4681d980b7b54d839d 100644
--- a/media/midi/midi_manager_alsa.cc
+++ b/media/midi/midi_manager_alsa.cc
@@ -32,7 +32,8 @@ namespace midi {
namespace {
-using midi::mojom::Result;
+using mojom::PortState;
+using mojom::Result;
// Per-output buffer. This can be smaller, but then large sysex messages
// will be (harmlessly) split across multiple seq events. This should
@@ -1202,11 +1203,11 @@ void MidiManagerAlsa::UpdatePortStateAndGenerateEvents() {
case MidiPort::Type::kInput:
source_map_.erase(
AddrToInt(old_port->client_id(), old_port->port_id()));
- SetInputPortState(web_port_index, MIDI_PORT_DISCONNECTED);
+ SetInputPortState(web_port_index, PortState::DISCONNECTED);
break;
case MidiPort::Type::kOutput:
DeleteAlsaOutputPort(web_port_index);
- SetOutputPortState(web_port_index, MIDI_PORT_DISCONNECTED);
+ SetOutputPortState(web_port_index, PortState::DISCONNECTED);
break;
}
}
@@ -1231,7 +1232,7 @@ void MidiManagerAlsa::UpdatePortStateAndGenerateEvents() {
it = new_port_state->erase(it);
MidiPortInfo info(opaque_key, manufacturer, port_name, version,
- MIDI_PORT_OPENED);
+ PortState::OPENED);
switch (type) {
case MidiPort::Type::kInput:
if (Subscribe(web_port_index, client_id, port_id))
@@ -1253,12 +1254,12 @@ void MidiManagerAlsa::UpdatePortStateAndGenerateEvents() {
case MidiPort::Type::kInput:
if (Subscribe(web_port_index, (*old_port)->client_id(),
(*old_port)->port_id()))
- SetInputPortState(web_port_index, MIDI_PORT_OPENED);
+ SetInputPortState(web_port_index, PortState::OPENED);
break;
case MidiPort::Type::kOutput:
if (CreateAlsaOutputPort(web_port_index, (*old_port)->client_id(),
(*old_port)->port_id()))
- SetOutputPortState(web_port_index, MIDI_PORT_OPENED);
+ SetOutputPortState(web_port_index, PortState::OPENED);
break;
}
(*old_port)->set_connected(true);
« no previous file with comments | « media/midi/midi_manager.cc ('k') | media/midi/midi_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698