| 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_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ | 5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ |
| 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ | 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 AudioManagerImpl(); | 36 AudioManagerImpl(); |
| 37 ~AudioManagerImpl() override; | 37 ~AudioManagerImpl() override; |
| 38 | 38 |
| 39 // AudioManager overrides: | 39 // AudioManager overrides: |
| 40 void Initialize(WhispernetClient* whispernet_client, | 40 void Initialize(WhispernetClient* whispernet_client, |
| 41 const TokensCallback& tokens_cb) override; | 41 const TokensCallback& tokens_cb) override; |
| 42 void StartPlaying(AudioType type) override; | 42 void StartPlaying(AudioType type) override; |
| 43 void StopPlaying(AudioType type) override; | 43 void StopPlaying(AudioType type) override; |
| 44 void StartRecording(AudioType type) override; | 44 void StartRecording(AudioType type) override; |
| 45 void StopRecording(AudioType type) override; | 45 void StopRecording(AudioType type) override; |
| 46 void SetToken(AudioType type, const std::string& url_unsafe_token) override; | 46 void SetToken(AudioType type, const std::string& url_safe_token) override; |
| 47 const std::string GetToken(AudioType type) override; | 47 const std::string GetToken(AudioType type) override; |
| 48 bool IsPlayingTokenHeard(AudioType type) override; | 48 bool IsPlayingTokenHeard(AudioType type) override; |
| 49 void SetTokenLength(AudioType type, size_t token_length) override; | 49 void SetTokenLength(AudioType type, size_t token_length) override; |
| 50 | 50 |
| 51 void set_player_for_testing(AudioType type, AudioPlayer* player) { | 51 void set_player_for_testing(AudioType type, AudioPlayer* player) { |
| 52 player_[type] = player; | 52 player_[type] = player; |
| 53 } | 53 } |
| 54 void set_recorder_for_testing(AudioRecorder* recorder) { | 54 void set_recorder_for_testing(AudioRecorder* recorder) { |
| 55 recorder_ = recorder; | 55 recorder_ = recorder; |
| 56 } | 56 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 ScopedVector<SamplesMap> samples_cache_; | 111 ScopedVector<SamplesMap> samples_cache_; |
| 112 | 112 |
| 113 size_t token_length_[2]; | 113 size_t token_length_[2]; |
| 114 | 114 |
| 115 DISALLOW_COPY_AND_ASSIGN(AudioManagerImpl); | 115 DISALLOW_COPY_AND_ASSIGN(AudioManagerImpl); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 } // namespace copresence | 118 } // namespace copresence |
| 119 | 119 |
| 120 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ | 120 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ |
| OLD | NEW |