| 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 // MediaStreamManager is used to open media capture devices (video supported | 5 // MediaStreamManager is used to open media capture devices (video supported |
| 6 // now). Call flow: | 6 // now). Call flow: |
| 7 // 1. GenerateStream is called when a render process wants to use a capture | 7 // 1. GenerateStream is called when a render process wants to use a capture |
| 8 // device. | 8 // device. |
| 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to | 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to |
| 10 // use devices and for which device to use. | 10 // use devices and for which device to use. |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 const url::Origin& security_origin, | 353 const url::Origin& security_origin, |
| 354 const TrackControls& controls, | 354 const TrackControls& controls, |
| 355 const MediaDeviceInfoArray& devices, | 355 const MediaDeviceInfoArray& devices, |
| 356 std::string* device_id) const; | 356 std::string* device_id) const; |
| 357 | 357 |
| 358 // Finds the requested device id from request. The requested device type | 358 // Finds the requested device id from request. The requested device type |
| 359 // must be MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. | 359 // must be MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 360 bool GetRequestedDeviceCaptureId(const DeviceRequest* request, | 360 bool GetRequestedDeviceCaptureId(const DeviceRequest* request, |
| 361 MediaStreamType type, | 361 MediaStreamType type, |
| 362 const MediaDeviceInfoArray& devices, | 362 const MediaDeviceInfoArray& devices, |
| 363 std::string* device_id) const; | 363 std::string* device_id); |
| 364 | 364 |
| 365 void TranslateDeviceIdToSourceId(DeviceRequest* request, | 365 void TranslateDeviceIdToSourceId(DeviceRequest* request, |
| 366 MediaStreamDevice* device); | 366 MediaStreamDevice* device); |
| 367 | 367 |
| 368 // Handles the callback from MediaStreamUIProxy to receive the UI window id, | 368 // Handles the callback from MediaStreamUIProxy to receive the UI window id, |
| 369 // used for excluding the notification window in desktop capturing. | 369 // used for excluding the notification window in desktop capturing. |
| 370 void OnMediaStreamUIWindowId(MediaStreamType video_type, | 370 void OnMediaStreamUIWindowId(MediaStreamType video_type, |
| 371 StreamDeviceInfoArray devices, | 371 StreamDeviceInfoArray devices, |
| 372 gfx::NativeViewId window_id); | 372 gfx::NativeViewId window_id); |
| 373 | 373 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; | 407 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; |
| 408 | 408 |
| 409 GenerateStreamTestCallback generate_stream_test_callback_; | 409 GenerateStreamTestCallback generate_stream_test_callback_; |
| 410 | 410 |
| 411 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 411 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
| 412 }; | 412 }; |
| 413 | 413 |
| 414 } // namespace content | 414 } // namespace content |
| 415 | 415 |
| 416 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 416 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
| OLD | NEW |