| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef MIDIOutput_h | 31 #ifndef MIDIOutput_h |
| 32 #define MIDIOutput_h | 32 #define MIDIOutput_h |
| 33 | 33 |
| 34 #include "core/dom/DOMTypedArray.h" | 34 #include "core/dom/DOMTypedArray.h" |
| 35 #include "core/dom/NotShared.h" | |
| 36 #include "modules/webmidi/MIDIPort.h" | 35 #include "modules/webmidi/MIDIPort.h" |
| 37 | 36 |
| 38 namespace blink { | 37 namespace blink { |
| 39 | 38 |
| 40 class ExceptionState; | 39 class ExceptionState; |
| 41 class MIDIAccess; | 40 class MIDIAccess; |
| 42 | 41 |
| 43 class MIDIOutput final : public MIDIPort { | 42 class MIDIOutput final : public MIDIPort { |
| 44 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
| 45 | 44 |
| 46 public: | 45 public: |
| 47 static MIDIOutput* Create(MIDIAccess*, | 46 static MIDIOutput* Create(MIDIAccess*, |
| 48 unsigned port_index, | 47 unsigned port_index, |
| 49 const String& id, | 48 const String& id, |
| 50 const String& manufacturer, | 49 const String& manufacturer, |
| 51 const String& name, | 50 const String& name, |
| 52 const String& version, | 51 const String& version, |
| 53 midi::mojom::PortState); | 52 midi::mojom::PortState); |
| 54 ~MIDIOutput() override; | 53 ~MIDIOutput() override; |
| 55 | 54 |
| 56 void send(NotShared<DOMUint8Array>, double timestamp, ExceptionState&); | 55 void send(DOMUint8Array*, double timestamp, ExceptionState&); |
| 57 void send(Vector<unsigned>, double timestamp, ExceptionState&); | 56 void send(Vector<unsigned>, double timestamp, ExceptionState&); |
| 58 | 57 |
| 59 // send() without optional |timestamp|. | 58 // send() without optional |timestamp|. |
| 60 void send(NotShared<DOMUint8Array>, ExceptionState&); | 59 void send(DOMUint8Array*, ExceptionState&); |
| 61 void send(Vector<unsigned>, ExceptionState&); | 60 void send(Vector<unsigned>, ExceptionState&); |
| 62 | 61 |
| 63 DECLARE_VIRTUAL_TRACE(); | 62 DECLARE_VIRTUAL_TRACE(); |
| 64 | 63 |
| 65 private: | 64 private: |
| 66 MIDIOutput(MIDIAccess*, | 65 MIDIOutput(MIDIAccess*, |
| 67 unsigned port_index, | 66 unsigned port_index, |
| 68 const String& id, | 67 const String& id, |
| 69 const String& manufacturer, | 68 const String& manufacturer, |
| 70 const String& name, | 69 const String& name, |
| 71 const String& version, | 70 const String& version, |
| 72 midi::mojom::PortState); | 71 midi::mojom::PortState); |
| 73 | 72 |
| 74 unsigned port_index_; | 73 unsigned port_index_; |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace blink | 76 } // namespace blink |
| 78 | 77 |
| 79 #endif // MIDIOutput_h | 78 #endif // MIDIOutput_h |
| OLD | NEW |