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" |
35 #include "modules/webmidi/MIDIPort.h" | 36 #include "modules/webmidi/MIDIPort.h" |
36 | 37 |
37 namespace blink { | 38 namespace blink { |
38 | 39 |
39 class ExceptionState; | 40 class ExceptionState; |
40 class MIDIAccess; | 41 class MIDIAccess; |
41 | 42 |
42 class MIDIOutput final : public MIDIPort { | 43 class MIDIOutput final : public MIDIPort { |
43 DEFINE_WRAPPERTYPEINFO(); | 44 DEFINE_WRAPPERTYPEINFO(); |
44 | 45 |
45 public: | 46 public: |
46 static MIDIOutput* Create(MIDIAccess*, | 47 static MIDIOutput* Create(MIDIAccess*, |
47 unsigned port_index, | 48 unsigned port_index, |
48 const String& id, | 49 const String& id, |
49 const String& manufacturer, | 50 const String& manufacturer, |
50 const String& name, | 51 const String& name, |
51 const String& version, | 52 const String& version, |
52 midi::mojom::PortState); | 53 midi::mojom::PortState); |
53 ~MIDIOutput() override; | 54 ~MIDIOutput() override; |
54 | 55 |
55 void send(DOMUint8Array*, double timestamp, ExceptionState&); | 56 void send(NotShared<DOMUint8Array>, double timestamp, ExceptionState&); |
56 void send(Vector<unsigned>, double timestamp, ExceptionState&); | 57 void send(Vector<unsigned>, double timestamp, ExceptionState&); |
57 | 58 |
58 // send() without optional |timestamp|. | 59 // send() without optional |timestamp|. |
59 void send(DOMUint8Array*, ExceptionState&); | 60 void send(NotShared<DOMUint8Array>, ExceptionState&); |
60 void send(Vector<unsigned>, ExceptionState&); | 61 void send(Vector<unsigned>, ExceptionState&); |
61 | 62 |
62 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
63 | 64 |
64 private: | 65 private: |
65 MIDIOutput(MIDIAccess*, | 66 MIDIOutput(MIDIAccess*, |
66 unsigned port_index, | 67 unsigned port_index, |
67 const String& id, | 68 const String& id, |
68 const String& manufacturer, | 69 const String& manufacturer, |
69 const String& name, | 70 const String& name, |
70 const String& version, | 71 const String& version, |
71 midi::mojom::PortState); | 72 midi::mojom::PortState); |
72 | 73 |
73 unsigned port_index_; | 74 unsigned port_index_; |
74 }; | 75 }; |
75 | 76 |
76 } // namespace blink | 77 } // namespace blink |
77 | 78 |
78 #endif // MIDIOutput_h | 79 #endif // MIDIOutput_h |
OLD | NEW |