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); |