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

Unified Diff: Source/modules/webmidi/MIDIAccess.idl

Issue 14044022: Web MIDI: implement MIDIAccess (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: haraken review Created 7 years, 8 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/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
« Source/modules/webmidi/MIDIAccess.cpp ('K') | « Source/modules/webmidi/MIDIAccess.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698