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 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 media::AudioParameters::kAudioCDSampleRate / 10); | 254 media::AudioParameters::kAudioCDSampleRate / 10); |
255 int session_id = 0; | 255 int session_id = 0; |
256 if (unified_stream) { | 256 if (unified_stream) { |
257 // Use AudioInputDeviceManager::kFakeOpenSessionId as the session id to | 257 // Use AudioInputDeviceManager::kFakeOpenSessionId as the session id to |
258 // pass the permission check. | 258 // pass the permission check. |
259 session_id = AudioInputDeviceManager::kFakeOpenSessionId; | 259 session_id = AudioInputDeviceManager::kFakeOpenSessionId; |
260 } | 260 } |
261 host_->OnRequestDeviceAuthorization(kStreamId, kRenderFrameId, session_id, | 261 host_->OnRequestDeviceAuthorization(kStreamId, kRenderFrameId, session_id, |
262 device_id, security_origin); | 262 device_id, security_origin); |
263 if (expected_device_status == media::OUTPUT_DEVICE_STATUS_OK) { | 263 if (expected_device_status == media::OUTPUT_DEVICE_STATUS_OK) { |
264 host_->OnCreateStream(kStreamId, kRenderFrameId, params); | 264 mojom::AudioOutput::CreateStreamCallback callback; |
| 265 host_->CreateStream(kStreamId, kRenderFrameId, params, callback); |
265 | 266 |
266 // At some point in the future, a corresponding RemoveDiverter() call must | 267 // At some point in the future, a corresponding RemoveDiverter() call must |
267 // be made. | 268 // be made. |
268 EXPECT_CALL(mirroring_manager_, RemoveDiverter(NotNull())) | 269 EXPECT_CALL(mirroring_manager_, RemoveDiverter(NotNull())) |
269 .RetiresOnSaturation(); | 270 .RetiresOnSaturation(); |
270 } | 271 } |
271 SyncWithAudioThread(); | 272 SyncWithAudioThread(); |
272 } | 273 } |
273 | 274 |
274 void Close() { | 275 void Close() { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 407 } |
407 | 408 |
408 TEST_F(AudioRendererHostTest, CreateInvalidDevice) { | 409 TEST_F(AudioRendererHostTest, CreateInvalidDevice) { |
409 Create(false, kInvalidDeviceId, url::Origin(GURL(kSecurityOrigin))); | 410 Create(false, kInvalidDeviceId, url::Origin(GURL(kSecurityOrigin))); |
410 Close(); | 411 Close(); |
411 } | 412 } |
412 | 413 |
413 // TODO(hclam): Add tests for data conversation in low latency mode. | 414 // TODO(hclam): Add tests for data conversation in low latency mode. |
414 | 415 |
415 } // namespace content | 416 } // namespace content |
OLD | NEW |