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

Side by Side Diff: components/audio_modem/test/stub_whispernet_client.cc

Issue 2131993002: Delete the audio modem and copresence private APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eol
Patch Set: Sync again Created 4 years, 5 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
« no previous file with comments | « components/audio_modem/test/stub_whispernet_client.h ('k') | components/components.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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/audio_modem/test/stub_whispernet_client.h"
6
7 namespace audio_modem {
8
9 StubWhispernetClient::StubWhispernetClient(
10 scoped_refptr<media::AudioBusRefCounted> samples,
11 const std::vector<AudioToken>& tokens)
12 : samples_(samples),
13 tokens_(tokens) {
14 }
15
16 StubWhispernetClient::~StubWhispernetClient() {}
17
18 void StubWhispernetClient::Initialize(const SuccessCallback& init_callback) {}
19
20 void StubWhispernetClient::EncodeToken(const std::string& token,
21 AudioType type,
22 const TokenParameters token_params[2]) {
23 if (!samples_cb_.is_null())
24 samples_cb_.Run(type, token, samples_);
25 }
26
27 void StubWhispernetClient::DecodeSamples(
28 AudioType type,
29 const std::string& samples,
30 const TokenParameters token_params[2]) {
31 if (!tokens_cb_.is_null())
32 tokens_cb_.Run(tokens_);
33 }
34
35 void StubWhispernetClient::RegisterTokensCallback(
36 const TokensCallback& tokens_cb) {
37 tokens_cb_ = tokens_cb;
38 }
39
40 void StubWhispernetClient::RegisterSamplesCallback(
41 const SamplesCallback& samples_cb) {
42 samples_cb_ = samples_cb;
43 }
44
45 TokensCallback StubWhispernetClient::GetTokensCallback() {
46 return tokens_cb_;
47 }
48
49 SamplesCallback StubWhispernetClient::GetSamplesCallback() {
50 return samples_cb_;
51 }
52
53 SuccessCallback StubWhispernetClient::GetInitializedCallback() {
54 return SuccessCallback();
55 }
56
57 } // namespace audio_modem
OLDNEW
« no previous file with comments | « components/audio_modem/test/stub_whispernet_client.h ('k') | components/components.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698