Remove "virtual" from all lines that have both "virtual" and "override".
[WebKit-https.git] / Source / WebCore / Modules / mediastream / MediaStreamTrack.h
index a36b847..679e677 100644 (file)
 
 namespace WebCore {
 
+class AudioSourceProvider;
 class Dictionary;
 class MediaConstraintsImpl;
-class MediaSourceStates;
-class MediaStreamCapabilities;
+class MediaSourceSettings;
 class MediaTrackConstraints;
 
-class MediaStreamTrack final : public RefCounted<MediaStreamTrack>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData, public MediaStreamTrackPrivateClient {
+class MediaStreamTrack final : public RefCounted<MediaStreamTrack>, public ActiveDOMObject, public EventTargetWithInlineData, public MediaStreamTrackPrivate::Observer {
 public:
     class Observer {
     public:
@@ -78,20 +78,22 @@ public:
     void stopProducingData();
 
     RefPtr<MediaTrackConstraints> getConstraints() const;
-    RefPtr<MediaSourceStates> states() const;
-    RefPtr<MediaStreamCapabilities> getCapabilities() const;
+    RefPtr<MediaSourceSettings> getSettings() const;
+    RefPtr<RealtimeMediaSourceCapabilities> getCapabilities() const;
     void applyConstraints(const Dictionary&);
     void applyConstraints(const MediaConstraints&);
 
-    RealtimeMediaSource* source() const { return m_private->source(); }
+    RealtimeMediaSource& source() const { return m_private->source(); }
     MediaStreamTrackPrivate& privateTrack() { return m_private.get(); }
 
+    AudioSourceProvider* audioSourceProvider();
+
     void addObserver(Observer*);
     void removeObserver(Observer*);
 
     // EventTarget
-    virtual EventTargetInterface eventTargetInterface() const override final { return MediaStreamTrackEventTargetInterfaceType; }
-    virtual ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
+    EventTargetInterface eventTargetInterface() const override final { return MediaStreamTrackEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const override final { return ActiveDOMObject::scriptExecutionContext(); }
 
     using RefCounted<MediaStreamTrack>::ref;
     using RefCounted<MediaStreamTrack>::deref;
@@ -105,22 +107,28 @@ private:
     // ActiveDOMObject API.
     void stop() override final;
     const char* activeDOMObjectName() const override final;
-    bool canSuspendForPageCache() const override final;
+    bool canSuspendForDocumentSuspension() const override final;
 
     // EventTarget
-    virtual void refEventTarget() override final { ref(); }
-    virtual void derefEventTarget() override final { deref(); }
+    void refEventTarget() override final { ref(); }
+    void derefEventTarget() override final { deref(); }
 
-    // MediaStreamTrackPrivateClient
-    void trackEnded();
-    void trackMutedChanged();
+    // MediaStreamTrackPrivate::Observer
+    void trackEnded(MediaStreamTrackPrivate&) override;
+    void trackMutedChanged(MediaStreamTrackPrivate&) override;
+    void trackSettingsChanged(MediaStreamTrackPrivate&) override;
+    void trackEnabledChanged(MediaStreamTrackPrivate&) override;
 
     Vector<Observer*> m_observers;
     Ref<MediaStreamTrackPrivate> m_private;
 
     RefPtr<MediaConstraintsImpl> m_constraints;
+
+    bool m_ended { false };
 };
 
+typedef Vector<RefPtr<MediaStreamTrack>> MediaStreamTrackVector;
+
 } // namespace WebCore
 
 #endif // ENABLE(MEDIA_STREAM)