| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 ~AudioInputRendererHostTest() override { | 277 ~AudioInputRendererHostTest() override { |
| 278 airh_->OnChannelClosing(); | 278 airh_->OnChannelClosing(); |
| 279 base::RunLoop().RunUntilIdle(); | 279 base::RunLoop().RunUntilIdle(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 protected: | 282 protected: |
| 283 // Makes device |device_id| with name |name| available to open with the | 283 // Makes device |device_id| with name |name| available to open with the |
| 284 // session id returned. | 284 // session id returned. |
| 285 int Open(const std::string& device_id, const std::string& name) { | 285 int Open(const std::string& device_id, const std::string& name) { |
| 286 int session_id = media_stream_manager_->audio_input_device_manager()->Open( | 286 int session_id = media_stream_manager_->audio_input_device_manager()->Open( |
| 287 StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, name, device_id)); | 287 MediaStreamDevice(MEDIA_DEVICE_AUDIO_CAPTURE, device_id, name)); |
| 288 base::RunLoop().RunUntilIdle(); | 288 base::RunLoop().RunUntilIdle(); |
| 289 return session_id; | 289 return session_id; |
| 290 } | 290 } |
| 291 | 291 |
| 292 std::string GetRawNondefaultId() { | 292 std::string GetRawNondefaultId() { |
| 293 std::string id; | 293 std::string id; |
| 294 MediaDevicesManager::BoolDeviceTypes devices_to_enumerate; | 294 MediaDevicesManager::BoolDeviceTypes devices_to_enumerate; |
| 295 devices_to_enumerate[MEDIA_DEVICE_TYPE_AUDIO_INPUT] = true; | 295 devices_to_enumerate[MEDIA_DEVICE_TYPE_AUDIO_INPUT] = true; |
| 296 | 296 |
| 297 media_stream_manager_->media_devices_manager()->EnumerateDevices( | 297 media_stream_manager_->media_devices_manager()->EnumerateDevices( |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 EXPECT_CALL(controller_factory_, ControllerCreated()); | 555 EXPECT_CALL(controller_factory_, ControllerCreated()); |
| 556 | 556 |
| 557 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( | 557 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( |
| 558 kStreamId, kRenderFrameId, session_id, DefaultConfig())); | 558 kStreamId, kRenderFrameId, session_id, DefaultConfig())); |
| 559 base::RunLoop().RunUntilIdle(); | 559 base::RunLoop().RunUntilIdle(); |
| 560 | 560 |
| 561 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); | 561 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); |
| 562 } | 562 } |
| 563 | 563 |
| 564 } // namespace content | 564 } // namespace content |
| OLD | NEW |