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

Side by Side Diff: Source/core/platform/mediastream/MediaStreamComponent.h

Issue 16753003: Revert "Remove MediaStreamDescriptor and call/use WebMediaStream directly" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef MediaStreamComponent_h 32 #ifndef MediaStreamComponent_h
33 #define MediaStreamComponent_h 33 #define MediaStreamComponent_h
34 34
35 #include "public/platform/WebMediaStream.h"
36 #include <wtf/PassRefPtr.h> 35 #include <wtf/PassRefPtr.h>
37 #include <wtf/RefCounted.h> 36 #include <wtf/RefCounted.h>
38 #include <wtf/text/WTFString.h> 37 #include <wtf/text/WTFString.h>
39 38
40 namespace WebCore { 39 namespace WebCore {
41 40
41 class MediaStreamDescriptor;
42 class MediaStreamSource; 42 class MediaStreamSource;
43 43
44 class MediaStreamComponent : public RefCounted<MediaStreamComponent> { 44 class MediaStreamComponent : public RefCounted<MediaStreamComponent> {
45 public: 45 public:
46 static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource> ); 46 static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource> );
47 static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr< MediaStreamSource>); 47 static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr< MediaStreamSource>);
48 static PassRefPtr<MediaStreamComponent> create(WebKit::WebMediaStream, PassR efPtr<MediaStreamSource>); 48 static PassRefPtr<MediaStreamComponent> create(MediaStreamDescriptor*, PassR efPtr<MediaStreamSource>);
49 49
50 WebKit::WebMediaStream stream() const { return m_stream; } 50 MediaStreamDescriptor* stream() const { return m_stream; }
51 void setStream(WebKit::WebMediaStream stream) { m_stream = stream; } 51 void setStream(MediaStreamDescriptor* stream) { ASSERT(!m_stream && stream); m_stream = stream; }
52 52
53 MediaStreamSource* source() const { return m_source.get(); } 53 MediaStreamSource* source() const { return m_source.get(); }
54 54
55 String id() const { return m_id; } 55 String id() const { return m_id; }
56 bool enabled() const { return m_enabled; } 56 bool enabled() const { return m_enabled; }
57 void setEnabled(bool enabled) { m_enabled = enabled; } 57 void setEnabled(bool enabled) { m_enabled = enabled; }
58 58
59 private: 59 private:
60 MediaStreamComponent(const String& id, WebKit::WebMediaStream, PassRefPtr<Me diaStreamSource>); 60 MediaStreamComponent(const String& id, MediaStreamDescriptor*, PassRefPtr<Me diaStreamSource>);
61 MediaStreamComponent(const String& id, PassRefPtr<MediaStreamSource>);
62 61
63 WebKit::WebMediaStream m_stream; 62 MediaStreamDescriptor* m_stream;
64 RefPtr<MediaStreamSource> m_source; 63 RefPtr<MediaStreamSource> m_source;
65 String m_id; 64 String m_id;
66 bool m_enabled; 65 bool m_enabled;
67 }; 66 };
68 67
69 typedef Vector<RefPtr<MediaStreamComponent> > MediaStreamComponentVector; 68 typedef Vector<RefPtr<MediaStreamComponent> > MediaStreamComponentVector;
70 69
71 } // namespace WebCore 70 } // namespace WebCore
72 71
73 #endif // MediaStreamComponent_h 72 #endif // MediaStreamComponent_h
OLDNEW
« no previous file with comments | « Source/core/platform/mediastream/MediaStreamCenter.cpp ('k') | Source/core/platform/mediastream/MediaStreamComponent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698