Chromium Code Reviews| Index: Source/modules/webmidi/MIDIConnectionEvent.h |
| diff --git a/Source/modules/webmidi/MIDIConnectionEvent.h b/Source/modules/webmidi/MIDIConnectionEvent.h |
| index d5f24083964ec79bc94456de519fb9053a48a47d..10113493ae786e301f4ee6ad71ea9bba6c40048f 100644 |
| --- a/Source/modules/webmidi/MIDIConnectionEvent.h |
| +++ b/Source/modules/webmidi/MIDIConnectionEvent.h |
| @@ -41,19 +41,39 @@ class MIDIConnectionEventInit; |
| class MIDIConnectionEvent final : public Event { |
| DEFINE_WRAPPERTYPEINFO(); |
| public: |
| - static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(); |
| - static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString&, MIDIPort*); |
| - static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString&, const MIDIConnectionEventInit&); |
| + static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create() |
| + { |
| + return adoptRefWillBeNoop(new MIDIConnectionEvent()); |
| + } |
| + |
| + static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(MIDIPort* port) |
| + { |
| + return adoptRefWillBeNoop(new MIDIConnectionEvent(port)); |
| + } |
| + |
| + static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString& type, const MIDIConnectionEventInit& initializer) |
| + { |
| + return adoptRefWillBeNoop(new MIDIConnectionEvent(type, initializer)); |
| + } |
| MIDIPort* port() { return m_port; } |
| virtual const AtomicString& interfaceName() const override { return EventNames::MIDIConnectionEvent; } |
| - DECLARE_VIRTUAL_TRACE(); |
| + DEFINE_INLINE_VIRTUAL_TRACE() |
|
kouhei (in TOK)
2015/02/23 01:40:41
DECLARE_VIRTUAL_TRACE is recommended over DEFINE_I
Takashi Toyoshima
2015/02/23 11:15:35
Done.
|
| + { |
| + visitor->trace(m_port); |
| + Event::trace(visitor); |
| + } |
| private: |
| - MIDIConnectionEvent(); |
| - MIDIConnectionEvent(const AtomicString&, MIDIPort*); |
| + MIDIConnectionEvent() |
| + : Event(EventTypeNames::statechange, false, false) { } |
| + |
| + MIDIConnectionEvent(MIDIPort* port) |
| + : Event(EventTypeNames::statechange, false, false) |
| + , m_port(port) { } |
| + |
| MIDIConnectionEvent(const AtomicString&, const MIDIConnectionEventInit&); |
| PersistentWillBeMember<MIDIPort> m_port; |