OLD | NEW |
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_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ | 5 #ifndef COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ |
6 #define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ | 6 #define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 scoped_ptr<base::Timer> timer, | 41 scoped_ptr<base::Timer> timer, |
42 const scoped_refptr<TickClockRefCounted>& clock); | 42 const scoped_refptr<TickClockRefCounted>& clock); |
43 | 43 |
44 ~AudioDirectiveHandlerImpl(); | 44 ~AudioDirectiveHandlerImpl(); |
45 | 45 |
46 // AudioDirectiveHandler overrides: | 46 // AudioDirectiveHandler overrides: |
47 void Initialize(WhispernetClient* whispernet_client, | 47 void Initialize(WhispernetClient* whispernet_client, |
48 const TokensCallback& tokens_cb) override; | 48 const TokensCallback& tokens_cb) override; |
49 void AddInstruction(const copresence::TokenInstruction& instruction, | 49 void AddInstruction(const copresence::TokenInstruction& instruction, |
50 const std::string& op_id, | 50 const std::string& op_id, |
51 base::TimeDelta ttl_ms) override; | 51 base::TimeDelta ttl) override; |
52 void RemoveInstructions(const std::string& op_id) override; | 52 void RemoveInstructions(const std::string& op_id) override; |
53 const std::string PlayingToken(AudioType type) const override; | 53 const std::string PlayingToken(AudioType type) const override; |
54 bool IsPlayingTokenHeard(AudioType type) const override; | 54 bool IsPlayingTokenHeard(AudioType type) const override; |
55 | 55 |
56 private: | 56 private: |
57 // Processes the next active instruction, | 57 // Processes the next active instruction, |
58 // updating our audio manager state accordingly. | 58 // updating our audio manager state accordingly. |
59 void ProcessNextInstruction(); | 59 void ProcessNextInstruction(); |
60 | 60 |
61 // Returns the time that an instruction expires at. This will always return | 61 // Returns the time that an instruction expires at. This will always return |
(...skipping 11 matching lines...) Expand all Loading... |
73 ScopedVector<AudioDirectiveList> transmits_lists_; | 73 ScopedVector<AudioDirectiveList> transmits_lists_; |
74 ScopedVector<AudioDirectiveList> receives_lists_; | 74 ScopedVector<AudioDirectiveList> receives_lists_; |
75 | 75 |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandlerImpl); | 77 DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandlerImpl); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace copresence | 80 } // namespace copresence |
81 | 81 |
82 #endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ | 82 #endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_AUDIO_DIRECTIVE_HANDLER_IMPL_H_ |
OLD | NEW |