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

Unified Diff: Source/WebCore/platform/mediastream/MediaStreamComponent.h

Issue 12326102: Merge 142773 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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/WebCore/platform/mediastream/MediaStreamComponent.h
===================================================================
--- Source/WebCore/platform/mediastream/MediaStreamComponent.h (revision 143918)
+++ Source/WebCore/platform/mediastream/MediaStreamComponent.h (working copy)
@@ -44,12 +44,17 @@
public:
static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource> source)
{
- return adoptRef(new MediaStreamComponent(0, source));
+ return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), 0, source));
}
+ static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr<MediaStreamSource> source)
+ {
+ return adoptRef(new MediaStreamComponent(id, 0, source));
+ }
+
static PassRefPtr<MediaStreamComponent> create(MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source)
{
- return adoptRef(new MediaStreamComponent(stream, source));
+ return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), stream, source));
}
MediaStreamDescriptor* stream() const { return m_stream; }
@@ -62,12 +67,13 @@
void setEnabled(bool enabled) { m_enabled = enabled; }
private:
- MediaStreamComponent(MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source)
+ MediaStreamComponent(const String& id, MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source)
: m_stream(stream)
, m_source(source)
- , m_id(createCanonicalUUIDString())
+ , m_id(id)
, m_enabled(true)
{
+ ASSERT(m_id.length());
}
MediaStreamDescriptor* m_stream;
@@ -76,6 +82,8 @@
bool m_enabled;
};
+typedef Vector<RefPtr<MediaStreamComponent> > MediaStreamComponentVector;
+
} // namespace WebCore
#endif // ENABLE(MEDIA_STREAM)

Powered by Google App Engine
This is Rietveld 408576698