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

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

Issue 64593002: Move MediaStreamSource to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class WebMediaConstraints; 45 class WebMediaConstraints;
46 class WebString; 46 class WebString;
47 47
48 class WebMediaStreamSource { 48 class WebMediaStreamSource {
49 public: 49 public:
50 class ExtraData { 50 class ExtraData {
51 public: 51 public:
52 ExtraData() : m_owner(0) { } 52 ExtraData() : m_owner(0) { }
53 virtual ~ExtraData() { } 53 virtual ~ExtraData() { }
54 54
55 BLINK_EXPORT WebMediaStreamSource owner(); 55 BLINK_PLATFORM_EXPORT WebMediaStreamSource owner();
56 56
57 #if BLINK_IMPLEMENTATION 57 #if INSIDE_BLINK
58 void setOwner(WebCore::MediaStreamSource*); 58 void setOwner(WebCore::MediaStreamSource*);
abarth-chromium 2013/11/07 18:23:23 ditto
59 #endif 59 #endif
60 60
61 private: 61 private:
62 WebCore::MediaStreamSource* m_owner; 62 WebCore::MediaStreamSource* m_owner;
63 }; 63 };
64 64
65 enum Type { 65 enum Type {
66 TypeAudio, 66 TypeAudio,
67 TypeVideo 67 TypeVideo
68 }; 68 };
69 69
70 enum ReadyState { 70 enum ReadyState {
71 ReadyStateLive = 0, 71 ReadyStateLive = 0,
72 ReadyStateMuted = 1, 72 ReadyStateMuted = 1,
73 ReadyStateEnded = 2 73 ReadyStateEnded = 2
74 }; 74 };
75 75
76 WebMediaStreamSource() { } 76 WebMediaStreamSource() { }
77 WebMediaStreamSource(const WebMediaStreamSource& other) { assign(other); } 77 WebMediaStreamSource(const WebMediaStreamSource& other) { assign(other); }
78 ~WebMediaStreamSource() { reset(); } 78 ~WebMediaStreamSource() { reset(); }
79 79
80 WebMediaStreamSource& operator=(const WebMediaStreamSource& other) 80 WebMediaStreamSource& operator=(const WebMediaStreamSource& other)
81 { 81 {
82 assign(other); 82 assign(other);
83 return *this; 83 return *this;
84 } 84 }
85 85
86 BLINK_EXPORT void assign(const WebMediaStreamSource&); 86 BLINK_PLATFORM_EXPORT void assign(const WebMediaStreamSource&);
87 87
88 BLINK_EXPORT void initialize(const WebString& id, Type, const WebString& nam e); 88 BLINK_PLATFORM_EXPORT void initialize(const WebString& id, Type, const WebSt ring& name);
89 BLINK_EXPORT void reset(); 89 BLINK_PLATFORM_EXPORT void reset();
90 bool isNull() const { return m_private.isNull(); } 90 bool isNull() const { return m_private.isNull(); }
91 91
92 BLINK_EXPORT WebString id() const; 92 BLINK_PLATFORM_EXPORT WebString id() const;
93 BLINK_EXPORT Type type() const; 93 BLINK_PLATFORM_EXPORT Type type() const;
94 BLINK_EXPORT WebString name() const; 94 BLINK_PLATFORM_EXPORT WebString name() const;
95 95
96 BLINK_EXPORT void setReadyState(ReadyState); 96 BLINK_PLATFORM_EXPORT void setReadyState(ReadyState);
97 BLINK_EXPORT ReadyState readyState() const; 97 BLINK_PLATFORM_EXPORT ReadyState readyState() const;
98 98
99 // Extra data associated with this object. 99 // Extra data associated with this object.
100 // If non-null, the extra data pointer will be deleted when the object is de stroyed. 100 // If non-null, the extra data pointer will be deleted when the object is de stroyed.
101 // Setting the extra data pointer will cause any existing non-null 101 // Setting the extra data pointer will cause any existing non-null
102 // extra data pointer to be deleted. 102 // extra data pointer to be deleted.
103 BLINK_EXPORT ExtraData* extraData() const; 103 BLINK_PLATFORM_EXPORT ExtraData* extraData() const;
104 BLINK_EXPORT void setExtraData(ExtraData*); 104 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
105 105
106 BLINK_EXPORT WebMediaConstraints constraints(); 106 BLINK_PLATFORM_EXPORT WebMediaConstraints constraints();
107 107
108 BLINK_EXPORT WebString deviceId() const; 108 BLINK_PLATFORM_EXPORT WebString deviceId() const;
109 BLINK_EXPORT void setDeviceId(const WebString&); 109 BLINK_PLATFORM_EXPORT void setDeviceId(const WebString&);
110 110
111 // Only used if if this is a WebAudio source. 111 // Only used if if this is a WebAudio source.
112 // The WebAudioDestinationConsumer is not owned, and has to be disposed of s eparately 112 // The WebAudioDestinationConsumer is not owned, and has to be disposed of s eparately
113 // after calling removeAudioConsumer. 113 // after calling removeAudioConsumer.
114 BLINK_EXPORT bool requiresAudioConsumer() const; 114 BLINK_PLATFORM_EXPORT bool requiresAudioConsumer() const;
115 BLINK_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*); 115 BLINK_PLATFORM_EXPORT void addAudioConsumer(WebAudioDestinationConsumer*);
116 BLINK_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*); 116 BLINK_PLATFORM_EXPORT bool removeAudioConsumer(WebAudioDestinationConsumer*) ;
117 117
118 #if BLINK_IMPLEMENTATION 118 #if INSIDE_BLINK
119 WebMediaStreamSource(const WTF::PassRefPtr<WebCore::MediaStreamSource>&); 119 BLINK_PLATFORM_EXPORT WebMediaStreamSource(const WTF::PassRefPtr<WebCore::Me diaStreamSource>&);
120 WebMediaStreamSource& operator=(WebCore::MediaStreamSource*); 120 BLINK_PLATFORM_EXPORT WebMediaStreamSource& operator=(WebCore::MediaStreamSo urce*);
121 operator WTF::PassRefPtr<WebCore::MediaStreamSource>() const; 121 BLINK_PLATFORM_EXPORT operator WTF::PassRefPtr<WebCore::MediaStreamSource>() const;
122 operator WebCore::MediaStreamSource*() const; 122 BLINK_PLATFORM_EXPORT operator WebCore::MediaStreamSource*() const;
123 #endif 123 #endif
124 124
125 private: 125 private:
126 WebPrivatePtr<WebCore::MediaStreamSource> m_private; 126 WebPrivatePtr<WebCore::MediaStreamSource> m_private;
127 }; 127 };
128 128
129 } // namespace blink 129 } // namespace blink
130 130
131 #endif // WebMediaStreamSource_h 131 #endif // WebMediaStreamSource_h
OLDNEW
« public/platform/WebMediaConstraints.h ('K') | « public/platform/WebMediaConstraints.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698