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

Side by Side Diff: components/copresence/test/fake_directive_handler.h

Issue 865483005: Creating the audio_modem component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging again Created 5 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ 5 #ifndef COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
6 #define COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ 6 #define COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "components/copresence/handlers/directive_handler.h" 11 #include "components/copresence/handlers/directive_handler.h"
12 12
13 namespace copresence { 13 namespace copresence {
14 14
15 class FakeDirectiveHandler final : public DirectiveHandler { 15 class FakeDirectiveHandler final : public DirectiveHandler {
16 public: 16 public:
17 FakeDirectiveHandler(); 17 FakeDirectiveHandler();
18 ~FakeDirectiveHandler() override; 18 ~FakeDirectiveHandler() override;
19 19
20 const std::vector<std::string>& added_directives() const { 20 const std::vector<std::string>& added_directives() const {
21 return added_directives_; 21 return added_directives_;
22 } 22 }
23 23
24 const std::vector<std::string>& removed_directives() const { 24 const std::vector<std::string>& removed_directives() const {
25 return removed_directives_; 25 return removed_directives_;
26 } 26 }
27 27
28 // DirectiveHandler overrides. 28 // DirectiveHandler overrides.
29 void Start(WhispernetClient* /* whispernet_client */, 29 void Start(audio_modem::WhispernetClient* /* whispernet_client */,
30 const TokensCallback& /* tokens_cb */) override {} 30 const audio_modem::TokensCallback& /* tokens_cb */) override {}
31 void AddDirective(const Directive& directive) override; 31 void AddDirective(const Directive& directive) override;
32 void RemoveDirectives(const std::string& op_id) override; 32 void RemoveDirectives(const std::string& op_id) override;
33 const std::string GetCurrentAudioToken(AudioType type) const override; 33 const std::string
34 bool IsAudioTokenHeard(AudioType type) const override; 34 GetCurrentAudioToken(audio_modem::AudioType type) const override;
35 bool IsAudioTokenHeard(audio_modem::AudioType type) const override;
35 36
36 private: 37 private:
37 std::vector<std::string> added_directives_; 38 std::vector<std::string> added_directives_;
38 std::vector<std::string> removed_directives_; 39 std::vector<std::string> removed_directives_;
39 40
40 DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler); 41 DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler);
41 }; 42 };
42 43
43 } // namespace copresence 44 } // namespace copresence
44 45
45 #endif // COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ 46 #endif // COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
OLDNEW
« no previous file with comments | « components/copresence/test/audio_test_support.cc ('k') | components/copresence/test/fake_directive_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698