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

Side by Side Diff: components/copresence/mediums/audio/audio_recorder_stub.cc

Issue 637223011: Redesign the copresence audio handlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2014 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 "components/copresence/mediums/audio/audio_recorder_stub.h"
6
7 namespace copresence {
8
9 AudioRecorderStub::AudioRecorderStub() : is_recording_(false) {
10 }
11
12 AudioRecorderStub::~AudioRecorderStub() {
13 }
14
15 void AudioRecorderStub::Initialize(const RecordedSamplesCallback& cb) {
16 cb_ = cb;
17 }
18
19 void AudioRecorderStub::Record() {
20 is_recording_ = true;
21 }
22
23 void AudioRecorderStub::Stop() {
24 is_recording_ = false;
25 }
26
27 void AudioRecorderStub::Finalize() {
28 delete this;
29 }
30
31 bool AudioRecorderStub::IsRecording() {
32 return is_recording_;
33 }
34
35 void AudioRecorderStub::TriggerDecodeRequest() {
36 if (!cb_.is_null())
37 cb_.Run(std::string(7, 0x1337));
38 }
39
40 } // namespace copresence
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698