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

Unified Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp

Issue 2347103003: Implement the MediaStreamTrackEvent constructor (Closed)
Patch Set: update webexposed Created 4 years, 3 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
Index: third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp
index d60f74048a733e3f8b4c459b99c94918d36b3987..46c542eb5cda06277a078a6705d6619f1ba12c02 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.cpp
@@ -28,15 +28,28 @@
namespace blink {
-MediaStreamTrackEvent* MediaStreamTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, MediaStreamTrack* track)
+MediaStreamTrackEvent* MediaStreamTrackEvent::create(const AtomicString& type, MediaStreamTrack* track)
{
- return new MediaStreamTrackEvent(type, canBubble, cancelable, track);
+ return new MediaStreamTrackEvent(type, track);
}
-MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, MediaStreamTrack* track)
- : Event(type, canBubble, cancelable)
+MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, MediaStreamTrack* track)
+ : Event(type, false, false)
, m_track(track)
{
+ DCHECK(m_track);
+}
+
+MediaStreamTrackEvent* MediaStreamTrackEvent::create(const AtomicString& type, const MediaStreamTrackEventInit& initializer)
+{
+ return new MediaStreamTrackEvent(type, initializer);
+}
+
+MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, const MediaStreamTrackEventInit& initializer)
+ : Event(type, initializer)
+ , m_track(initializer.track())
+{
+ DCHECK(m_track);
}
MediaStreamTrackEvent::~MediaStreamTrackEvent()

Powered by Google App Engine
This is Rietveld 408576698