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

Side by Side Diff: components/audio_modem/test/stub_modem.h

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
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 #ifndef COMPONENTS_AUDIO_MODEM_TEST_STUB_MODEM_H_
6 #define COMPONENTS_AUDIO_MODEM_TEST_STUB_MODEM_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "base/macros.h"
13 #include "components/audio_modem/public/modem.h"
14
15 namespace audio_modem {
16
17 class StubModem final : public Modem {
18 public:
19 StubModem();
20 ~StubModem() override;
21
22 // AudioManager overrides:
23 void Initialize(WhispernetClient* whispernet_client,
24 const TokensCallback& tokens_cb) override;
25 void StartPlaying(AudioType type) override;
26 void StopPlaying(AudioType type) override;
27 void StartRecording(AudioType type) override;
28 void StopRecording(AudioType type) override;
29 void SetToken(AudioType type, const std::string& url_unsafe_token) override {}
30 const std::string GetToken(AudioType type) const override;
31 bool IsPlayingTokenHeard(AudioType type) const override;
32 void SetTokenParams(AudioType type, const TokenParameters& params) override {}
33
34 bool IsRecording(AudioType type) const;
35 bool IsPlaying(AudioType type) const;
36
37 // Encodes tokens as base64 and then delivers them.
38 void DeliverTokens(const std::vector<AudioToken>& tokens);
39
40 private:
41 // Indexed using enum AudioType.
42 bool playing_[2];
43 bool recording_[2];
44
45 TokensCallback tokens_callback_;
46
47 DISALLOW_COPY_AND_ASSIGN(StubModem);
48 };
49
50 } // namespace audio_modem
51
52 #endif // COMPONENTS_AUDIO_MODEM_TEST_STUB_MODEM_H_
OLDNEW
« no previous file with comments | « components/audio_modem/test/random_samples.cc ('k') | components/audio_modem/test/stub_modem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698