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

Unified Diff: third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h

Issue 1910463002: Implement MediaStreamTrack.getConstraints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments on layout test Created 4 years, 8 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/MediaStreamTrack.h
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
index 0cad160d2943ac0d76559645f2e8a9caab439d4a..8106d4d54e2e8e75eda0e693aa409dedb813dd13 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
@@ -33,13 +33,14 @@
#include "modules/mediastream/SourceInfo.h"
#include "platform/mediastream/MediaStreamDescriptor.h"
#include "platform/mediastream/MediaStreamSource.h"
+#include "public/platform/WebMediaConstraints.h"
#include "wtf/Forward.h"
namespace blink {
class AudioSourceProvider;
class ExceptionState;
-class MediaStreamComponent;
+class MediaTrackConstraints;
class MediaStreamTrackSourcesCallback;
class MODULES_EXPORT MediaStreamTrack
@@ -70,6 +71,12 @@ public:
void stopTrack(ExceptionState&);
virtual MediaStreamTrack* clone(ExecutionContext*);
+ void getConstraints(MediaTrackConstraints&);
+
+ // This function is called when constrains have been successfully applied.
+ // Called from UserMediaRequest when it succeeds. It is not IDL-exposed.
+ void setConstraints(const WebMediaConstraints&);
+
DEFINE_ATTRIBUTE_EVENT_LISTENER(mute);
DEFINE_ATTRIBUTE_EVENT_LISTENER(unmute);
DEFINE_ATTRIBUTE_EVENT_LISTENER(ended);
@@ -109,6 +116,7 @@ private:
bool m_isIteratingRegisteredMediaStreams;
bool m_stopped;
Member<MediaStreamComponent> m_component;
+ WebMediaConstraints m_constraints;
};
typedef HeapVector<Member<MediaStreamTrack>> MediaStreamTrackVector;

Powered by Google App Engine
This is Rietveld 408576698