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

Side by Side Diff: Source/modules/webmidi/MIDIConnectionEvent.h

Issue 302263004: Oilpan: Move [WillBeGarbageCollected] from Node to EventTarget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 29 matching lines...) Expand all
40 MIDIConnectionEventInit() 40 MIDIConnectionEventInit()
41 : port(nullptr) 41 : port(nullptr)
42 { 42 {
43 }; 43 };
44 44
45 RefPtr<MIDIPort> port; 45 RefPtr<MIDIPort> port;
46 }; 46 };
47 47
48 class MIDIConnectionEvent FINAL : public Event { 48 class MIDIConnectionEvent FINAL : public Event {
49 public: 49 public:
50 static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create() 50 static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create();
51 { 51 static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString &, PassRefPtrWillBeRawPtr<MIDIPort>);
52 return adoptRefWillBeNoop(new MIDIConnectionEvent()); 52 static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString &, const MIDIConnectionEventInit&);
53 }
54 53
55 static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString & type, PassRefPtr<MIDIPort> port) 54 PassRefPtrWillBeRawPtr<MIDIPort> port() { return m_port; }
56 {
57 return adoptRefWillBeNoop(new MIDIConnectionEvent(type, port));
58 }
59
60 static PassRefPtrWillBeRawPtr<MIDIConnectionEvent> create(const AtomicString & type, const MIDIConnectionEventInit& initializer)
61 {
62 return adoptRefWillBeNoop(new MIDIConnectionEvent(type, initializer));
63 }
64
65 RefPtr<MIDIPort> port() { return m_port; }
66 55
67 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam es::MIDIConnectionEvent; } 56 virtual const AtomicString& interfaceName() const OVERRIDE { return EventNam es::MIDIConnectionEvent; }
68 57
69 virtual void trace(Visitor* visitor) OVERRIDE { Event::trace(visitor); } 58 virtual void trace(Visitor*) OVERRIDE;
70 59
71 private: 60 private:
72 MIDIConnectionEvent() 61 MIDIConnectionEvent();
73 { 62 MIDIConnectionEvent(const AtomicString&, PassRefPtrWillBeRawPtr<MIDIPort>);
74 ScriptWrappable::init(this); 63 MIDIConnectionEvent(const AtomicString&, const MIDIConnectionEventInit&);
75 }
76 64
77 MIDIConnectionEvent(const AtomicString& type, PassRefPtr<MIDIPort> port) 65 RefPtrWillBeMember<MIDIPort> m_port;
78 : Event(type, false, false)
79 , m_port(port)
80 {
81 ScriptWrappable::init(this);
82 }
83
84 MIDIConnectionEvent(const AtomicString& type, const MIDIConnectionEventInit& initializer)
85 : Event(type, initializer)
86 , m_port(initializer.port)
87 {
88 ScriptWrappable::init(this);
89 }
90
91 RefPtr<MIDIPort> m_port;
92 }; 66 };
93 67
94 } // namespace WebCore 68 } // namespace WebCore
95 69
96 #endif // MIDIConnectionEvent_h 70 #endif // MIDIConnectionEvent_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainer.h ('k') | Source/modules/webmidi/MIDIConnectionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698