| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 ~UserMediaRequestInfo(); | 145 ~UserMediaRequestInfo(); |
| 146 int request_id; | 146 int request_id; |
| 147 // True if MediaStreamDispatcher has generated the stream, see | 147 // True if MediaStreamDispatcher has generated the stream, see |
| 148 // OnStreamGenerated. | 148 // OnStreamGenerated. |
| 149 bool generated; | 149 bool generated; |
| 150 const bool enable_automatic_output_device_selection; | 150 const bool enable_automatic_output_device_selection; |
| 151 blink::WebMediaStream web_stream; | 151 blink::WebMediaStream web_stream; |
| 152 blink::WebUserMediaRequest request; | 152 blink::WebUserMediaRequest request; |
| 153 | 153 |
| 154 void StartAudioTrack(const blink::WebMediaStreamTrack& track); | 154 void StartAudioTrack(const blink::WebMediaStreamTrack& track); |
| 155 | 155 void StartVideoTrack(const blink::WebMediaStreamTrack& track, |
| 156 blink::WebMediaStreamTrack CreateAndStartVideoTrack( | 156 const blink::WebMediaConstraints& constraints); |
| 157 const blink::WebMediaStreamSource& source, | |
| 158 const blink::WebMediaConstraints& constraints); | |
| 159 | 157 |
| 160 // Triggers |callback| when all sources used in this request have either | 158 // Triggers |callback| when all sources used in this request have either |
| 161 // successfully started, or a source has failed to start. | 159 // successfully started, or a source has failed to start. |
| 162 void CallbackOnTracksStarted(const ResourcesReady& callback); | 160 void CallbackOnTracksStarted(const ResourcesReady& callback); |
| 163 | 161 |
| 164 bool IsSourceUsed(const blink::WebMediaStreamSource& source) const; | 162 bool IsSourceUsed(const blink::WebMediaStreamSource& source) const; |
| 165 void RemoveSource(const blink::WebMediaStreamSource& source); | 163 void RemoveSource(const blink::WebMediaStreamSource& source); |
| 166 | 164 |
| 167 bool HasPendingSources() const; | 165 bool HasPendingSources() const; |
| 168 | 166 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // Note: This member must be the last to ensure all outstanding weak pointers | 271 // Note: This member must be the last to ensure all outstanding weak pointers |
| 274 // are invalidated first. | 272 // are invalidated first. |
| 275 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; | 273 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; |
| 276 | 274 |
| 277 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); | 275 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); |
| 278 }; | 276 }; |
| 279 | 277 |
| 280 } // namespace content | 278 } // namespace content |
| 281 | 279 |
| 282 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 280 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| OLD | NEW |