Index: Source/modules/webmidi/MIDIPort.idl |
diff --git a/Source/modules/webmidi/MIDIPort.idl b/Source/modules/webmidi/MIDIPort.idl |
index 95ae2369eebf8495733e94211b9929944457f796..c374035f9603f53e1f14f4d8138817cef7e3924d 100644 |
--- a/Source/modules/webmidi/MIDIPort.idl |
+++ b/Source/modules/webmidi/MIDIPort.idl |
@@ -28,10 +28,15 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-enum MIDIPortState { |
+enum MIDIPortConnectionState { |
+ "open", |
+ "closed", |
+ "pending" |
+}; |
+ |
+enum MIDIPortDeviceState { |
"disconnected", |
- "connected", |
- "opened" |
+ "connected" |
}; |
enum MIDIPortType { |
@@ -39,14 +44,17 @@ enum MIDIPortType { |
"output" |
}; |
+// TODO(toyoshim): Inherit ActiveDOMObject to protect the wrapper for event |
+// listeners. |
[ |
GarbageCollected, |
RuntimeEnabled=WebMIDI, |
] interface MIDIPort : EventTarget { |
+ readonly attribute MIDIPortConnectionState connection; |
readonly attribute DOMString id; |
readonly attribute DOMString manufacturer; |
readonly attribute DOMString name; |
- readonly attribute MIDIPortState state; |
+ readonly attribute MIDIPortDeviceState state; |
readonly attribute MIDIPortType type; |
readonly attribute DOMString version; |