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

Unified Diff: Source/modules/webmidi/MIDIOutput.cpp

Issue 962523005: Web MIDI: add open() and close() to MIDIPort (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: promise is awesome Created 5 years, 10 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
Index: Source/modules/webmidi/MIDIOutput.cpp
diff --git a/Source/modules/webmidi/MIDIOutput.cpp b/Source/modules/webmidi/MIDIOutput.cpp
index 1e49932d43b83c416a9111ff25a91ba069b58b97..08175ba2e66a09ba1cf957ef7420ee916e203cdb 100644
--- a/Source/modules/webmidi/MIDIOutput.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -41,6 +41,8 @@
namespace blink {
+using PortState = MIDIAccessor::MIDIPortState;
+
namespace {
double now(ExecutionContext* context)
@@ -174,14 +176,14 @@ private:
} // namespace
-MIDIOutput* MIDIOutput::create(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version, bool isActive)
+MIDIOutput* MIDIOutput::create(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version, PortState state)
{
ASSERT(access);
- return new MIDIOutput(access, portIndex, id, manufacturer, name, version, isActive);
+ return new MIDIOutput(access, portIndex, id, manufacturer, name, version, state);
}
-MIDIOutput::MIDIOutput(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version, bool isActive)
- : MIDIPort(access, id, manufacturer, name, MIDIPortTypeOutput, version, isActive)
+MIDIOutput::MIDIOutput(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version, PortState state)
+ : MIDIPort(access, id, manufacturer, name, MIDIPortTypeOutput, version, state)
, m_portIndex(portIndex)
{
}

Powered by Google App Engine
This is Rietveld 408576698