| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 // Returns true if we do find and remove the |source|. | 236 // Returns true if we do find and remove the |source|. |
| 237 // Otherwise returns false. | 237 // Otherwise returns false. |
| 238 bool RemoveLocalSource(const blink::WebMediaStreamSource& source); | 238 bool RemoveLocalSource(const blink::WebMediaStreamSource& source); |
| 239 | 239 |
| 240 void StopLocalSource(const blink::WebMediaStreamSource& source, | 240 void StopLocalSource(const blink::WebMediaStreamSource& source, |
| 241 bool notify_dispatcher); | 241 bool notify_dispatcher); |
| 242 | 242 |
| 243 const ::mojom::MediaDevicesDispatcherHostPtr& GetMediaDevicesDispatcher(); | 243 const ::mojom::MediaDevicesDispatcherHostPtr& GetMediaDevicesDispatcher(); |
| 244 | 244 |
| 245 void SelectUserMediaDevice( |
| 246 int request_id, |
| 247 const blink::WebUserMediaRequest& user_media_request, |
| 248 std::unique_ptr<StreamControls> controls, |
| 249 bool enable_automatic_output_device_selection, |
| 250 const url::Origin& security_origin, |
| 251 const EnumerationResult& device_enumeration); |
| 252 void FinalizeRequestUserMedia( |
| 253 int request_id, |
| 254 const blink::WebUserMediaRequest& user_media_request, |
| 255 std::unique_ptr<StreamControls> controls, |
| 256 bool enable_automatic_output_device_selection, |
| 257 const url::Origin& security_origin); |
| 258 |
| 245 // Callback invoked by MediaDevicesEventDispatcher when a device-change | 259 // Callback invoked by MediaDevicesEventDispatcher when a device-change |
| 246 // notification arrives. | 260 // notification arrives. |
| 247 void DevicesChanged(MediaDeviceType device_type, | 261 void DevicesChanged(MediaDeviceType device_type, |
| 248 const MediaDeviceInfoArray& device_infos); | 262 const MediaDeviceInfoArray& device_infos); |
| 249 | 263 |
| 250 // Weak ref to a PeerConnectionDependencyFactory, owned by the RenderThread. | 264 // Weak ref to a PeerConnectionDependencyFactory, owned by the RenderThread. |
| 251 // It's valid for the lifetime of RenderThread. | 265 // It's valid for the lifetime of RenderThread. |
| 252 // TODO(xians): Remove this dependency once audio do not need it for local | 266 // TODO(xians): Remove this dependency once audio do not need it for local |
| 253 // audio. | 267 // audio. |
| 254 PeerConnectionDependencyFactory* const dependency_factory_; | 268 PeerConnectionDependencyFactory* const dependency_factory_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 270 // Note: This member must be the last to ensure all outstanding weak pointers | 284 // Note: This member must be the last to ensure all outstanding weak pointers |
| 271 // are invalidated first. | 285 // are invalidated first. |
| 272 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; | 286 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; |
| 273 | 287 |
| 274 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); | 288 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); |
| 275 }; | 289 }; |
| 276 | 290 |
| 277 } // namespace content | 291 } // namespace content |
| 278 | 292 |
| 279 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 293 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| OLD | NEW |