Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: media/audio/mock_audio_manager.cc

Issue 10704154: Small refactor to media architecture in order to allow end-to-end tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved MockAudioManager under media/, inherting from AudioManager, removing static field from AudioM… Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "media/audio/mock_audio_manager.h"
6
7 namespace media {
8
9 MockAudioManager::MockAudioManager(content::BrowserThread::ID thread_id)
10 : thread_id_(thread_id) {
11 }
12
13 MockAudioManager::~MockAudioManager() {
14 }
15
16 bool MockAudioManager::HasAudioOutputDevices() {
17 return true;
18 }
19
20 bool MockAudioManager::HasAudioInputDevices() {
21 return true;
22 }
23
24 string16 MockAudioManager::GetAudioInputDeviceModel() {
25 return string16();
26 }
27
28 bool MockAudioManager::CanShowAudioInputSettings() {
29 return false;
30 }
31
32 void MockAudioManager::ShowAudioInputSettings() {
33 }
34
35 void MockAudioManager::GetAudioInputDeviceNames(
36 media::AudioDeviceNames* device_names) {
37 }
38
39 media::AudioOutputStream* MockAudioManager::MakeAudioOutputStream(
40 const media::AudioParameters& params) {
41 NOTREACHED();
42 return NULL;
43 }
44
45 media::AudioOutputStream* MockAudioManager::MakeAudioOutputStreamProxy(
46 const media::AudioParameters& params) {
47 NOTREACHED();
48 return NULL;
49 }
50
51 media::AudioInputStream* MockAudioManager::MakeAudioInputStream(
52 const media::AudioParameters& params,
53 const std::string& device_id) {
54 NOTREACHED();
55 return NULL;
56 }
57
58 void MockAudioManager::MuteAll() {
59 }
60
61 void MockAudioManager::UnMuteAll() {
62 }
63
64 bool MockAudioManager::IsRecordingInProcess() {
65 return false;
66 }
67
68 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetMessageLoop() {
69 return content::BrowserThread::GetMessageLoopProxyForThread(thread_id_);
tommi (sloooow) - chröme 2012/07/11 11:12:30 why don't we pass a pointer to a MessageLoopProxy
Primiano Tucci (use gerrit) 2012/07/11 14:33:30 I thought it was more loosely coupled since the th
70 }
71
72 void MockAudioManager::Init() {
73 };
tommi (sloooow) - chröme 2012/07/11 11:12:30 remove semicolon
Primiano Tucci (use gerrit) 2012/07/11 14:33:30 Done.
74
75 } // namespace media.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698