OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ | |
6 #define COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/macros.h" | |
12 #include "components/copresence/handlers/directive_handler.h" | |
13 | |
14 namespace copresence { | |
15 | |
16 class FakeDirectiveHandler final : public DirectiveHandler { | |
17 public: | |
18 FakeDirectiveHandler(); | |
19 ~FakeDirectiveHandler() override; | |
20 | |
21 const std::vector<std::string>& added_directives() const { | |
22 return added_directives_; | |
23 } | |
24 | |
25 const std::vector<std::string>& removed_directives() const { | |
26 return removed_directives_; | |
27 } | |
28 | |
29 // DirectiveHandler overrides. | |
30 void Start(audio_modem::WhispernetClient* /* whispernet_client */, | |
31 const audio_modem::TokensCallback& /* tokens_cb */) override {} | |
32 void AddDirective(const Directive& directive) override; | |
33 void RemoveDirectives(const std::string& op_id) override; | |
34 const std::string | |
35 GetCurrentAudioToken(audio_modem::AudioType type) const override; | |
36 bool IsAudioTokenHeard(audio_modem::AudioType type) const override; | |
37 | |
38 private: | |
39 std::vector<std::string> added_directives_; | |
40 std::vector<std::string> removed_directives_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler); | |
43 }; | |
44 | |
45 } // namespace copresence | |
46 | |
47 #endif // COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_ | |
OLD | NEW |