diff options
author | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 08:33:59 +0000 |
---|---|---|
committer | dalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 08:33:59 +0000 |
commit | adba07359216f215d3edb72084d0de69eac4d4a2 (patch) | |
tree | b4f1f1ec310a436b732d9cd594176d93e31e8f27 /media/audio/fake_audio_log_factory.cc | |
parent | bb9d33be4be1e86a99af7f6d78a0cbc28f5c1fd9 (diff) | |
download | chromium_src-adba07359216f215d3edb72084d0de69eac4d4a2.zip chromium_src-adba07359216f215d3edb72084d0de69eac4d4a2.tar.gz chromium_src-adba07359216f215d3edb72084d0de69eac4d4a2.tar.bz2 |
Plumb AudioLog support into AudioManager.
AudioManager is now also an AudioLogFactory. Changing the constructor
of AudioManager isn't viable due to its psuedo-singleton behavior, so
MediaInternal's AudioLogFactory must be injected after construction.
The next step after this CL is to have AudioOutputDispatcherImpl objects
own an AudioLog instance.
BUG=260005
TEST=none, just plumbing.
Review URL: https://codereview.chromium.org/99733004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/fake_audio_log_factory.cc')
-rw-r--r-- | media/audio/fake_audio_log_factory.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/media/audio/fake_audio_log_factory.cc b/media/audio/fake_audio_log_factory.cc new file mode 100644 index 0000000..6f752e5 --- /dev/null +++ b/media/audio/fake_audio_log_factory.cc @@ -0,0 +1,32 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "media/audio/fake_audio_log_factory.h" + +namespace media { + +class FakeAudioLogImpl : public AudioLog { + public: + FakeAudioLogImpl() {} + virtual ~FakeAudioLogImpl() {} + virtual void OnCreated(int component_id, + const media::AudioParameters& params, + const std::string& input_device_id, + const std::string& output_device_id) OVERRIDE {} + virtual void OnStarted(int component_id) OVERRIDE {} + virtual void OnStopped(int component_id) OVERRIDE {} + virtual void OnClosed(int component_id) OVERRIDE {} + virtual void OnError(int component_id) OVERRIDE {} + virtual void OnSetVolume(int component_id, double volume) OVERRIDE {} +}; + +FakeAudioLogFactory::FakeAudioLogFactory() {} +FakeAudioLogFactory::~FakeAudioLogFactory() {} + +scoped_ptr<AudioLog> FakeAudioLogFactory::CreateAudioLog( + AudioComponent component) { + return scoped_ptr<AudioLog>(new FakeAudioLogImpl()); +} + +} // namespace media |