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

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: rebase 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
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/modules/mediastream/MediaStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/MediaStream.h
diff --git a/Source/modules/mediastream/MediaStream.h b/Source/modules/mediastream/MediaStream.h
index 88db16bb3414650611f46d6bc71ce6d737abe4c1..9bca0356c58118a343664497e5fb5b29b084077c 100644
--- a/Source/modules/mediastream/MediaStream.h
+++ b/Source/modules/mediastream/MediaStream.h
@@ -66,9 +66,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);
@@ -100,6 +103,8 @@ private:
virtual void addRemoteTrack(MediaStreamComponent*) override;
virtual void removeRemoteTrack(MediaStreamComponent*) override;
+ bool emptyOrOnlyEndedTracks();
+
void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
void scheduledEventTimerFired(Timer<MediaStream>*);
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/modules/mediastream/MediaStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698