Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: Source/modules/webmidi/MIDIConnectionEvent.h

Issue 943173002: Web MIDI: dispatch MIDIConnectionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webmidi/MIDIAccess.idl ('k') | Source/modules/webmidi/MIDIConnectionEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/modules/webmidi/MIDIAccess.idl ('k') | Source/modules/webmidi/MIDIConnectionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698