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

Side by Side Diff: components/copresence/mediums/audio/audio_manager_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.
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.
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_manager_stub.h"
6
7 #include "components/copresence/public/copresence_constants.h"
8
9 namespace copresence {
10
11 AudioManagerStub::AudioManagerStub() {
12 }
13
14 AudioManagerStub::~AudioManagerStub() {
15 }
16
17 void AudioManagerStub::Initialize(const DecodeSamplesCallback& decode_cb,
18 const EncodeTokenCallback& encode_cb) {
19 }
20
21 void AudioManagerStub::StartPlaying(AudioType type) {
22 playing_[type] = true;
23 }
24
25 void AudioManagerStub::StopPlaying(AudioType type) {
26 playing_[type] = false;
27 }
28
29 void AudioManagerStub::StartRecording(AudioType type) {
30 recording_[type] = true;
31 }
32
33 void AudioManagerStub::StopRecording(AudioType type) {
34 recording_[type] = false;
35 }
36
37 void AudioManagerStub::SetToken(AudioType type,
38 const std::string& url_unsafe_token) {
39 }
40 const std::string& AudioManagerStub::GetToken(AudioType type) {
41 return token_;
42 }
43
44 bool AudioManagerStub::IsRecording(AudioType type) {
45 return recording_[type];
46 }
47
48 bool AudioManagerStub::IsPlaying(AudioType type) {
49 return playing_[type];
50 }
51
52 } // namespace copresence
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698