| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 17 matching lines...) Expand all Loading... |
| 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 #include "config.h" | 31 #include "config.h" |
| 32 #include "modules/webmidi/MIDIConnectionEvent.h" | 32 #include "modules/webmidi/MIDIConnectionEvent.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 MIDIConnectionEvent::MIDIConnectionEvent() | 36 MIDIConnectionEvent::MIDIConnectionEvent() |
| 37 { | 37 { |
| 38 ScriptWrappable::init(this); | |
| 39 } | 38 } |
| 40 | 39 |
| 41 MIDIConnectionEvent::MIDIConnectionEvent(const AtomicString& type, MIDIPort* por
t) | 40 MIDIConnectionEvent::MIDIConnectionEvent(const AtomicString& type, MIDIPort* por
t) |
| 42 : Event(type, false, false) | 41 : Event(type, false, false) |
| 43 , m_port(port) | 42 , m_port(port) |
| 44 { | 43 { |
| 45 ScriptWrappable::init(this); | |
| 46 } | 44 } |
| 47 | 45 |
| 48 MIDIConnectionEvent::MIDIConnectionEvent(const AtomicString& type, const MIDICon
nectionEventInit& initializer) | 46 MIDIConnectionEvent::MIDIConnectionEvent(const AtomicString& type, const MIDICon
nectionEventInit& initializer) |
| 49 : Event(type, initializer) | 47 : Event(type, initializer) |
| 50 , m_port(initializer.port) | 48 , m_port(initializer.port) |
| 51 { | 49 { |
| 52 ScriptWrappable::init(this); | |
| 53 } | 50 } |
| 54 | 51 |
| 55 PassRefPtrWillBeRawPtr<MIDIConnectionEvent> MIDIConnectionEvent::create() | 52 PassRefPtrWillBeRawPtr<MIDIConnectionEvent> MIDIConnectionEvent::create() |
| 56 { | 53 { |
| 57 return adoptRefWillBeNoop(new MIDIConnectionEvent()); | 54 return adoptRefWillBeNoop(new MIDIConnectionEvent()); |
| 58 } | 55 } |
| 59 | 56 |
| 60 PassRefPtrWillBeRawPtr<MIDIConnectionEvent> MIDIConnectionEvent::create(const At
omicString& type, MIDIPort* port) | 57 PassRefPtrWillBeRawPtr<MIDIConnectionEvent> MIDIConnectionEvent::create(const At
omicString& type, MIDIPort* port) |
| 61 { | 58 { |
| 62 return adoptRefWillBeNoop(new MIDIConnectionEvent(type, port)); | 59 return adoptRefWillBeNoop(new MIDIConnectionEvent(type, port)); |
| 63 } | 60 } |
| 64 | 61 |
| 65 PassRefPtrWillBeRawPtr<MIDIConnectionEvent> MIDIConnectionEvent::create(const At
omicString& type, const MIDIConnectionEventInit& initializer) | 62 PassRefPtrWillBeRawPtr<MIDIConnectionEvent> MIDIConnectionEvent::create(const At
omicString& type, const MIDIConnectionEventInit& initializer) |
| 66 { | 63 { |
| 67 return adoptRefWillBeNoop(new MIDIConnectionEvent(type, initializer)); | 64 return adoptRefWillBeNoop(new MIDIConnectionEvent(type, initializer)); |
| 68 } | 65 } |
| 69 | 66 |
| 70 void MIDIConnectionEvent::trace(Visitor* visitor) | 67 void MIDIConnectionEvent::trace(Visitor* visitor) |
| 71 { | 68 { |
| 72 visitor->trace(m_port); | 69 visitor->trace(m_port); |
| 73 Event::trace(visitor); | 70 Event::trace(visitor); |
| 74 } | 71 } |
| 75 | 72 |
| 76 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |