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

Side by Side Diff: public/platform/WebMediaStreamSource.h

Issue 534473002: Revert of Oilpan: Move MediaStreamSource, MediaStreamComponent and MediaStreamDescriptor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « public/platform/WebMediaStream.h ('k') | public/platform/WebMediaStreamTrack.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebMediaStreamSource_h 31 #ifndef WebMediaStreamSource_h
32 #define WebMediaStreamSource_h 32 #define WebMediaStreamSource_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebNonCopyable.h" 35 #include "WebNonCopyable.h"
36 #include "WebPrivatePtr.h" 36 #include "WebPrivatePtr.h"
37 #include "WebVector.h" 37 #include "WebVector.h"
38 #if INSIDE_BLINK
39 #include "platform/heap/Handle.h"
40 #endif
41 38
42 namespace blink { 39 namespace blink {
43 40
44 class MediaStreamSource; 41 class MediaStreamSource;
45 class WebAudioDestinationConsumer; 42 class WebAudioDestinationConsumer;
46 class WebMediaConstraints; 43 class WebMediaConstraints;
47 class WebString; 44 class WebString;
48 45
49 class WebMediaStreamSource { 46 class WebMediaStreamSource {
50 public: 47 public:
51 class ExtraData { 48 class ExtraData {
52 public: 49 public:
53 ExtraData() : m_owner(0) { } 50 ExtraData() : m_owner(0) { }
54 virtual ~ExtraData() { } 51 virtual ~ExtraData() { }
55 52
56 BLINK_PLATFORM_EXPORT WebMediaStreamSource owner(); 53 BLINK_PLATFORM_EXPORT WebMediaStreamSource owner();
57 54
58 #if INSIDE_BLINK 55 #if INSIDE_BLINK
59 BLINK_PLATFORM_EXPORT void setOwner(MediaStreamSource*); 56 BLINK_PLATFORM_EXPORT void setOwner(MediaStreamSource*);
60 #endif 57 #endif
61 58
62 private: 59 private:
63 #if INSIDE_BLINK
64 GC_PLUGIN_IGNORE("http://crbug.com/409526")
65 #endif
66 MediaStreamSource* m_owner; 60 MediaStreamSource* m_owner;
67 }; 61 };
68 62
69 enum Type { 63 enum Type {
70 TypeAudio, 64 TypeAudio,
71 TypeVideo 65 TypeVideo
72 }; 66 };
73 67
74 enum ReadyState { 68 enum ReadyState {
75 ReadyStateLive = 0, 69 ReadyStateLive = 0,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 BLINK_PLATFORM_EXPORT WebMediaConstraints constraints(); 104 BLINK_PLATFORM_EXPORT WebMediaConstraints constraints();
111 105
112 // Only used if if this is a WebAudio source. 106 // Only used if if this is a WebAudio source.
113 // The WebAudioDestinationConsumer is not owned, and has to be disposed of s eparately 107 // The WebAudioDestinationConsumer is not owned, and has to be disposed of s eparately
114 // after calling removeAudioConsumer. 108 // after calling removeAudioConsumer.
115 BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const; 109 BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const;
116 BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*); 110 BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*);
117 BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*) ; 111 BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*) ;
118 112
119 #if INSIDE_BLINK 113 #if INSIDE_BLINK
120 BLINK_PLATFORM_EXPORT WebMediaStreamSource(MediaStreamSource*); 114 BLINK_PLATFORM_EXPORT WebMediaStreamSource(const WTF::PassRefPtr<MediaStream Source>&);
121 BLINK_PLATFORM_EXPORT WebMediaStreamSource& operator=(MediaStreamSource*); 115 BLINK_PLATFORM_EXPORT WebMediaStreamSource& operator=(MediaStreamSource*);
116 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<MediaStreamSource>() const;
122 BLINK_PLATFORM_EXPORT operator MediaStreamSource*() const; 117 BLINK_PLATFORM_EXPORT operator MediaStreamSource*() const;
123 #endif 118 #endif
124 119
125 private: 120 private:
126 WebPrivatePtr<MediaStreamSource> m_private; 121 WebPrivatePtr<MediaStreamSource> m_private;
127 }; 122 };
128 123
129 } // namespace blink 124 } // namespace blink
130 125
131 #endif // WebMediaStreamSource_h 126 #endif // WebMediaStreamSource_h
OLDNEW
« no previous file with comments | « public/platform/WebMediaStream.h ('k') | public/platform/WebMediaStreamTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698