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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // notifications about device changes. | 152 // notifications about device changes. |
153 void EnsureDeviceMonitorStarted(); | 153 void EnsureDeviceMonitorStarted(); |
154 | 154 |
155 // Implements MediaStreamProviderListener. | 155 // Implements MediaStreamProviderListener. |
156 virtual void Opened(MediaStreamType stream_type, | 156 virtual void Opened(MediaStreamType stream_type, |
157 int capture_session_id) OVERRIDE; | 157 int capture_session_id) OVERRIDE; |
158 virtual void Closed(MediaStreamType stream_type, | 158 virtual void Closed(MediaStreamType stream_type, |
159 int capture_session_id) OVERRIDE; | 159 int capture_session_id) OVERRIDE; |
160 virtual void DevicesEnumerated(MediaStreamType stream_type, | 160 virtual void DevicesEnumerated(MediaStreamType stream_type, |
161 const StreamDeviceInfoArray& devices) OVERRIDE; | 161 const StreamDeviceInfoArray& devices) OVERRIDE; |
| 162 virtual void Aborted(MediaStreamType stream_type, |
| 163 int capture_session_id) OVERRIDE; |
162 | 164 |
163 // Implements base::SystemMonitor::DevicesChangedObserver. | 165 // Implements base::SystemMonitor::DevicesChangedObserver. |
164 virtual void OnDevicesChanged( | 166 virtual void OnDevicesChanged( |
165 base::SystemMonitor::DeviceType device_type) OVERRIDE; | 167 base::SystemMonitor::DeviceType device_type) OVERRIDE; |
166 | 168 |
167 // Called by the tests to specify a fake UI that should be used for next | 169 // Called by the tests to specify a fake UI that should be used for next |
168 // generated stream (or when using --use-fake-ui-for-media-stream). | 170 // generated stream (or when using --use-fake-ui-for-media-stream). |
169 void UseFakeUI(scoped_ptr<FakeMediaStreamUIProxy> fake_ui); | 171 void UseFakeUI(scoped_ptr<FakeMediaStreamUIProxy> fake_ui); |
170 | 172 |
171 // Returns all devices currently opened by a request with label |label|. | 173 // Returns all devices currently opened by a request with label |label|. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 381 |
380 bool use_fake_ui_; | 382 bool use_fake_ui_; |
381 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 383 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
382 | 384 |
383 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 385 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
384 }; | 386 }; |
385 | 387 |
386 } // namespace content | 388 } // namespace content |
387 | 389 |
388 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 390 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
OLD | NEW |