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

Unified 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698