OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/renderer/media/mock_audio_device_factory.h" | |
6 | |
7 namespace content { | |
8 | |
9 MockCapturerSource::MockCapturerSource() {} | |
10 | |
11 MockCapturerSource::~MockCapturerSource() {} | |
12 | |
13 void MockCapturerSource::SetVolume(double volume) {} | |
14 | |
15 MockAudioDeviceFactory::MockAudioDeviceFactory() | |
16 : AudioDeviceFactory(), mock_capturer_source_(new MockCapturerSource()), | |
17 did_create_once_(false) {} | |
18 | |
19 MockAudioDeviceFactory::~MockAudioDeviceFactory() {} | |
20 | |
21 scoped_refptr<media::AudioCapturerSource> | |
22 MockAudioDeviceFactory::CreateAudioCapturerSource(int render_frame_id) { | |
23 CHECK(!did_create_once_); | |
24 did_create_once_ = true; | |
25 return scoped_refptr<media::AudioCapturerSource>(mock_capturer_source_); | |
26 } | |
27 | |
28 } // namespace content | |
OLD | NEW |