| Index: components/copresence/mediums/audio/audio_recorder_stub.cc
|
| diff --git a/components/copresence/mediums/audio/audio_recorder_stub.cc b/components/copresence/mediums/audio/audio_recorder_stub.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..274ae1f5e4853782e230e8ef3034f598c3893788
|
| --- /dev/null
|
| +++ b/components/copresence/mediums/audio/audio_recorder_stub.cc
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2014 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 "components/copresence/mediums/audio/audio_recorder_stub.h"
|
| +
|
| +namespace copresence {
|
| +
|
| +AudioRecorderStub::AudioRecorderStub() : is_recording_(false) {
|
| +}
|
| +
|
| +AudioRecorderStub::~AudioRecorderStub() {
|
| +}
|
| +
|
| +void AudioRecorderStub::Initialize(const RecordedSamplesCallback& cb) {
|
| + cb_ = cb;
|
| +}
|
| +
|
| +void AudioRecorderStub::Record() {
|
| + is_recording_ = true;
|
| +}
|
| +
|
| +void AudioRecorderStub::Stop() {
|
| + is_recording_ = false;
|
| +}
|
| +
|
| +void AudioRecorderStub::Finalize() {
|
| + delete this;
|
| +}
|
| +
|
| +bool AudioRecorderStub::IsRecording() {
|
| + return is_recording_;
|
| +}
|
| +
|
| +void AudioRecorderStub::TriggerDecodeRequest() {
|
| + if (!cb_.is_null())
|
| + cb_.Run(std::string(7, 0x1337));
|
| +}
|
| +
|
| +} // namespace copresence
|
|
|