| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 int render_view_id, | 121 int render_view_id, |
| 122 const std::string& device_id); | 122 const std::string& device_id); |
| 123 | 123 |
| 124 // Gets a list of devices of |type|, which must be MEDIA_DEVICE_AUDIO_CAPTURE | 124 // Gets a list of devices of |type|, which must be MEDIA_DEVICE_AUDIO_CAPTURE |
| 125 // or MEDIA_DEVICE_VIDEO_CAPTURE. | 125 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 126 // The request is identified using the string returned to the caller. | 126 // The request is identified using the string returned to the caller. |
| 127 // When the |requester| is NULL, MediaStreamManager will enumerate both audio | 127 // When the |requester| is NULL, MediaStreamManager will enumerate both audio |
| 128 // and video devices and also start monitoring device changes, such as | 128 // and video devices and also start monitoring device changes, such as |
| 129 // plug/unplug. The new device lists will be delivered via media observer to | 129 // plug/unplug. The new device lists will be delivered via media observer to |
| 130 // MediaCaptureDevicesDispatcher. | 130 // MediaCaptureDevicesDispatcher. |
| 131 // If |have_permission| is false, we remove the device label from the result. | |
| 132 virtual std::string EnumerateDevices(MediaStreamRequester* requester, | 131 virtual std::string EnumerateDevices(MediaStreamRequester* requester, |
| 133 int render_process_id, | 132 int render_process_id, |
| 134 int render_view_id, | 133 int render_view_id, |
| 135 const ResourceContext::SaltCallback& sc, | 134 const ResourceContext::SaltCallback& sc, |
| 136 int page_request_id, | 135 int page_request_id, |
| 137 MediaStreamType type, | 136 MediaStreamType type, |
| 138 const GURL& security_origin, | 137 const GURL& security_origin); |
| 139 bool have_permission); | |
| 140 | 138 |
| 141 // Open a device identified by |device_id|. |type| must be either | 139 // Open a device identified by |device_id|. |type| must be either |
| 142 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. | 140 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 143 // The request is identified using string returned to the caller. | 141 // The request is identified using string returned to the caller. |
| 144 void OpenDevice(MediaStreamRequester* requester, | 142 void OpenDevice(MediaStreamRequester* requester, |
| 145 int render_process_id, | 143 int render_process_id, |
| 146 int render_view_id, | 144 int render_view_id, |
| 147 const ResourceContext::SaltCallback& sc, | 145 const ResourceContext::SaltCallback& sc, |
| 148 int page_request_id, | 146 int page_request_id, |
| 149 const std::string& device_id, | 147 const std::string& device_id, |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 381 |
| 384 bool use_fake_ui_; | 382 bool use_fake_ui_; |
| 385 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 383 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
| 386 | 384 |
| 387 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 385 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
| 388 }; | 386 }; |
| 389 | 387 |
| 390 } // namespace content | 388 } // namespace content |
| 391 | 389 |
| 392 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 390 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
| OLD | NEW |