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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 const int kStreamId = 100; | 50 const int kStreamId = 100; |
51 const int kRenderProcessId = 42; | 51 const int kRenderProcessId = 42; |
52 const int kRendererPid = 21718; | 52 const int kRendererPid = 21718; |
53 const int kRenderFrameId = 31415; | 53 const int kRenderFrameId = 31415; |
54 const int kSharedMemoryCount = 11; | 54 const int kSharedMemoryCount = 11; |
55 const char kSecurityOrigin[] = "http://localhost"; | 55 const char kSecurityOrigin[] = "http://localhost"; |
| 56 #if BUILDFLAG(ENABLE_WEBRTC) |
56 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
57 const wchar_t kBaseFileName[] = L"some_file_name"; | 58 const wchar_t kBaseFileName[] = L"some_file_name"; |
58 #else | 59 #else |
59 const char kBaseFileName[] = "some_file_name"; | 60 const char kBaseFileName[] = "some_file_name"; |
60 #endif | 61 #endif |
| 62 #endif // BUILDFLAG(ENABLE_WEBRTC) |
61 | 63 |
62 url::Origin SecurityOrigin() { | 64 url::Origin SecurityOrigin() { |
63 return url::Origin(GURL(kSecurityOrigin)); | 65 return url::Origin(GURL(kSecurityOrigin)); |
64 } | 66 } |
65 | 67 |
66 AudioInputHostMsg_CreateStream_Config DefaultConfig() { | 68 AudioInputHostMsg_CreateStream_Config DefaultConfig() { |
67 AudioInputHostMsg_CreateStream_Config config; | 69 AudioInputHostMsg_CreateStream_Config config; |
68 config.params = media::AudioParameters::UnavailableDeviceParams(); | 70 config.params = media::AudioParameters::UnavailableDeviceParams(); |
69 config.automatic_gain_control = false; | 71 config.automatic_gain_control = false; |
70 config.shared_memory_count = kSharedMemoryCount; | 72 config.shared_memory_count = kSharedMemoryCount; |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 EXPECT_CALL(controller_factory_, ControllerCreated()); | 550 EXPECT_CALL(controller_factory_, ControllerCreated()); |
549 | 551 |
550 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( | 552 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( |
551 kStreamId, kRenderFrameId, session_id, DefaultConfig())); | 553 kStreamId, kRenderFrameId, session_id, DefaultConfig())); |
552 base::RunLoop().RunUntilIdle(); | 554 base::RunLoop().RunUntilIdle(); |
553 | 555 |
554 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); | 556 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); |
555 } | 557 } |
556 | 558 |
557 } // namespace content | 559 } // namespace content |
OLD | NEW |