Index: Source/modules/webmidi/MIDIAccess.idl |
diff --git a/Source/modules/webmidi/MIDIPort.idl b/Source/modules/webmidi/MIDIAccess.idl |
similarity index 76% |
copy from Source/modules/webmidi/MIDIPort.idl |
copy to Source/modules/webmidi/MIDIAccess.idl |
index 226387cb79bd5825f319434d94eaf5f4135610e8..04a1096f1598e609ac31e40d7e7a7a980ad6268c 100644 |
--- a/Source/modules/webmidi/MIDIPort.idl |
+++ b/Source/modules/webmidi/MIDIAccess.idl |
@@ -28,21 +28,21 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-enum MIDIPortType { |
- "input", |
- "output" |
-}; |
- |
[ |
ActiveDOMObject, |
EventTarget |
-] interface MIDIPort { |
- readonly attribute DOMString id; |
- readonly attribute DOMString manufacturer; |
- readonly attribute DOMString name; |
- readonly attribute MIDIPortType type; |
- readonly attribute DOMString version; |
+] interface MIDIAccess { |
+ sequence<MIDIPort> getInputs(); |
+ sequence<MIDIPort> getOutputs(); |
+ [RaisesException] MIDIInput getInput(MIDIPort target); |
+ // FIXME: Following two [StrictTypeChecking] should be removed once http://crbug.com/235884 is fixed. |
+ [RaisesException] MIDIInput getInput([StrictTypeChecking] DOMString target); |
+ [RaisesException] MIDIInput getInput(short target); |
+ [RaisesException] MIDIOutput getOutput(MIDIPort target); |
+ [RaisesException] MIDIOutput getOutput([StrictTypeChecking] DOMString target); |
+ [RaisesException] MIDIOutput getOutput(short target); |
+ attribute EventListener onconnect; |
attribute EventListener ondisconnect; |
// EventTarget interface |