| 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/enumerate media capture devices (video | 5 // MediaStreamManager is used to open/enumerate media capture devices (video |
| 6 // supported now). Call flow: | 6 // supported 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // needed. | 282 // needed. |
| 283 void SetupRequest(const std::string& label); | 283 void SetupRequest(const std::string& label); |
| 284 // Prepare |request| of type MEDIA_DEVICE_AUDIO_CAPTURE and/or | 284 // Prepare |request| of type MEDIA_DEVICE_AUDIO_CAPTURE and/or |
| 285 // MEDIA_DEVICE_VIDEO_CAPTURE for being posted to the UI by parsing | 285 // MEDIA_DEVICE_VIDEO_CAPTURE for being posted to the UI by parsing |
| 286 // StreamOptions::Constraints for requested device IDs. | 286 // StreamOptions::Constraints for requested device IDs. |
| 287 bool SetupDeviceCaptureRequest(DeviceRequest* request); | 287 bool SetupDeviceCaptureRequest(DeviceRequest* request); |
| 288 // Prepare |request| of type MEDIA_TAB_AUDIO_CAPTURE and/or | 288 // Prepare |request| of type MEDIA_TAB_AUDIO_CAPTURE and/or |
| 289 // MEDIA_TAB_VIDEO_CAPTURE for being posted to the UI by parsing | 289 // MEDIA_TAB_VIDEO_CAPTURE for being posted to the UI by parsing |
| 290 // StreamOptions::Constraints for requested tab capture IDs. | 290 // StreamOptions::Constraints for requested tab capture IDs. |
| 291 bool SetupTabCaptureRequest(DeviceRequest* request); | 291 bool SetupTabCaptureRequest(DeviceRequest* request); |
| 292 // Prepare |request| of type MEDIA_LOOPBACK_AUDIO_CAPTURE and/or | 292 // Prepare |request| of type MEDIA_DESKTOP_AUDIO_CAPTURE and/or |
| 293 // MEDIA_DESKTOP_VIDEO_CAPTURE for being posted to the UI by parsing | 293 // MEDIA_DESKTOP_VIDEO_CAPTURE for being posted to the UI by parsing |
| 294 // StreamOptions::Constraints for the requested desktop ID. | 294 // StreamOptions::Constraints for the requested desktop ID. |
| 295 bool SetupScreenCaptureRequest(DeviceRequest* request); | 295 bool SetupScreenCaptureRequest(DeviceRequest* request); |
| 296 // Called when a request has been setup and devices have been enumerated if | 296 // Called when a request has been setup and devices have been enumerated if |
| 297 // needed. | 297 // needed. |
| 298 void PostRequestToUI(const std::string& label, DeviceRequest* request); | 298 void PostRequestToUI(const std::string& label, DeviceRequest* request); |
| 299 // Returns true if a device with |device_id| has already been requested with | 299 // Returns true if a device with |device_id| has already been requested with |
| 300 // a render procecss_id and render_frame_id and type equal to the the values | 300 // a render procecss_id and render_frame_id and type equal to the the values |
| 301 // in |request|. If it has been requested, |device_info| contain information | 301 // in |request|. If it has been requested, |device_info| contain information |
| 302 // about the device. | 302 // about the device. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 416 |
| 417 bool use_fake_ui_; | 417 bool use_fake_ui_; |
| 418 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 418 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
| 419 | 419 |
| 420 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 420 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
| 421 }; | 421 }; |
| 422 | 422 |
| 423 } // namespace content | 423 } // namespace content |
| 424 | 424 |
| 425 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 425 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
| OLD | NEW |