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

Unified Diff: Source/modules/mediastream/MediaStream.h

Issue 827673002: Add MediaStream.active attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Allow addTrack/removeTrack when mediastream.ended is true Created 5 years, 11 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: Source/modules/mediastream/MediaStream.h
diff --git a/Source/modules/mediastream/MediaStream.h b/Source/modules/mediastream/MediaStream.h
index 46003a4ed422acef11a56f1f46c18c10dd20aec9..6fe71a5d6d19498c9760673a5f443a488e417b48 100644
--- a/Source/modules/mediastream/MediaStream.h
+++ b/Source/modules/mediastream/MediaStream.h
@@ -65,9 +65,12 @@ public:
MediaStreamTrackVector getVideoTracks() const { return m_videoTracks; }
MediaStreamTrackVector getTracks();
+ bool active() const { return m_descriptor->active(); }
bool ended() const;
void stop();
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(active);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(inactive);
DEFINE_ATTRIBUTE_EVENT_LISTENER(ended);
DEFINE_ATTRIBUTE_EVENT_LISTENER(addtrack);
DEFINE_ATTRIBUTE_EVENT_LISTENER(removetrack);
@@ -99,6 +102,8 @@ private:
virtual void addRemoteTrack(MediaStreamComponent*) override;
virtual void removeRemoteTrack(MediaStreamComponent*) override;
+ bool emptyOrOnlyEndedTracks();
+
void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
void scheduledEventTimerFired(Timer<MediaStream>*);

Powered by Google App Engine
This is Rietveld 408576698