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

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

Issue 942153004: Web MIDI: Add MIDIPortState state attribute to MIDIPort (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/modules/webmidi/MIDIPort.h ('k') | Source/modules/webmidi/MIDIPort.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIPort.cpp
diff --git a/Source/modules/webmidi/MIDIPort.cpp b/Source/modules/webmidi/MIDIPort.cpp
index 240e570b21f10fa2de009ca011ba72c4b6584ff9..b64057168ec3d62ffbae077caf9bf057ab7e77e9 100644
--- a/Source/modules/webmidi/MIDIPort.cpp
+++ b/Source/modules/webmidi/MIDIPort.cpp
@@ -48,6 +48,12 @@ MIDIPort::MIDIPort(MIDIAccess* access, const String& id, const String& manufactu
ASSERT(type == MIDIPortTypeInput || type == MIDIPortTypeOutput);
}
+String MIDIPort::state() const
+{
+ // FIXME: Support complete MIDIPortState once Blink API is updated.
+ return m_isActive ? "opened" : "disconnected";
+}
+
String MIDIPort::type() const
{
switch (m_type) {
« no previous file with comments | « Source/modules/webmidi/MIDIPort.h ('k') | Source/modules/webmidi/MIDIPort.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698