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 28 matching lines...) Expand all Loading... |
39 class MIDIMessageEventInit; | 39 class MIDIMessageEventInit; |
40 | 40 |
41 class MIDIMessageEvent final : public Event { | 41 class MIDIMessageEvent final : public Event { |
42 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
43 public: | 43 public: |
44 static MIDIMessageEvent* create() | 44 static MIDIMessageEvent* create() |
45 { | 45 { |
46 return new MIDIMessageEvent(); | 46 return new MIDIMessageEvent(); |
47 } | 47 } |
48 | 48 |
49 static MIDIMessageEvent* create(double receivedTime, PassRefPtr<DOMUint8Arra
y> data) | 49 static MIDIMessageEvent* create(double receivedTime, DOMUint8Array* data) |
50 { | 50 { |
51 return new MIDIMessageEvent(receivedTime, data); | 51 return new MIDIMessageEvent(receivedTime, data); |
52 } | 52 } |
53 | 53 |
54 static MIDIMessageEvent* create(const AtomicString& type, const MIDIMessageE
ventInit& initializer) | 54 static MIDIMessageEvent* create(const AtomicString& type, const MIDIMessageE
ventInit& initializer) |
55 { | 55 { |
56 return new MIDIMessageEvent(type, initializer); | 56 return new MIDIMessageEvent(type, initializer); |
57 } | 57 } |
58 | 58 |
59 double receivedTime() { return m_receivedTime; } | 59 double receivedTime() { return m_receivedTime; } |
60 PassRefPtr<DOMUint8Array> data() { return m_data; } | 60 DOMUint8Array* data() { return m_data; } |
61 | 61 |
62 const AtomicString& interfaceName() const override { return EventNames::MIDI
MessageEvent; } | 62 const AtomicString& interfaceName() const override { return EventNames::MIDI
MessageEvent; } |
63 | 63 |
64 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } | 64 DEFINE_INLINE_VIRTUAL_TRACE() |
| 65 { |
| 66 visitor->trace(m_data); |
| 67 Event::trace(visitor); |
| 68 } |
65 | 69 |
66 private: | 70 private: |
67 MIDIMessageEvent() | 71 MIDIMessageEvent() |
68 : m_receivedTime(0) { } | 72 : m_receivedTime(0) { } |
69 | 73 |
70 MIDIMessageEvent(double receivedTime, PassRefPtr<DOMUint8Array> data) | 74 MIDIMessageEvent(double receivedTime, DOMUint8Array* data) |
71 : Event(EventTypeNames::midimessage, true, false) | 75 : Event(EventTypeNames::midimessage, true, false) |
72 , m_receivedTime(receivedTime) | 76 , m_receivedTime(receivedTime) |
73 , m_data(data) { } | 77 , m_data(data) { } |
74 | 78 |
75 MIDIMessageEvent(const AtomicString& type, const MIDIMessageEventInit& initi
alizer); | 79 MIDIMessageEvent(const AtomicString& type, const MIDIMessageEventInit& initi
alizer); |
76 | 80 |
77 double m_receivedTime; | 81 double m_receivedTime; |
78 RefPtr<DOMUint8Array> m_data; | 82 Member<DOMUint8Array> m_data; |
79 }; | 83 }; |
80 | 84 |
81 } // namespace blink | 85 } // namespace blink |
82 | 86 |
83 #endif // MIDIMessageEvent_h | 87 #endif // MIDIMessageEvent_h |
OLD | NEW |