Chromium Code Reviews| Index: components/copresence/mediums/audio/audio_manager_stub.cc |
| diff --git a/components/copresence/mediums/audio/audio_manager_stub.cc b/components/copresence/mediums/audio/audio_manager_stub.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..65a89d3f2e0433b069cbdced47706c715df9ae00 |
| --- /dev/null |
| +++ b/components/copresence/mediums/audio/audio_manager_stub.cc |
| @@ -0,0 +1,52 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
Charlie
2014/10/22 01:03:29
I think the typical pattern is that stub classes l
Daniel Erat
2014/10/22 16:34:35
agreed that you can do this if these are only used
rkc
2014/10/22 18:21:47
Sure.
Done.
rkc
2014/10/22 18:21:47
Sure.
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "components/copresence/mediums/audio/audio_manager_stub.h" |
| + |
| +#include "components/copresence/public/copresence_constants.h" |
| + |
| +namespace copresence { |
| + |
| +AudioManagerStub::AudioManagerStub() { |
| +} |
| + |
| +AudioManagerStub::~AudioManagerStub() { |
| +} |
| + |
| +void AudioManagerStub::Initialize(const DecodeSamplesCallback& decode_cb, |
| + const EncodeTokenCallback& encode_cb) { |
| +} |
| + |
| +void AudioManagerStub::StartPlaying(AudioType type) { |
| + playing_[type] = true; |
| +} |
| + |
| +void AudioManagerStub::StopPlaying(AudioType type) { |
| + playing_[type] = false; |
| +} |
| + |
| +void AudioManagerStub::StartRecording(AudioType type) { |
| + recording_[type] = true; |
| +} |
| + |
| +void AudioManagerStub::StopRecording(AudioType type) { |
| + recording_[type] = false; |
| +} |
| + |
| +void AudioManagerStub::SetToken(AudioType type, |
| + const std::string& url_unsafe_token) { |
| +} |
| +const std::string& AudioManagerStub::GetToken(AudioType type) { |
| + return token_; |
| +} |
| + |
| +bool AudioManagerStub::IsRecording(AudioType type) { |
| + return recording_[type]; |
| +} |
| + |
| +bool AudioManagerStub::IsPlaying(AudioType type) { |
| + return playing_[type]; |
| +} |
| + |
| +} // namespace copresence |