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_MEDIUMS_AUDIO_AUDIO_MANAGER_STUB_H_ |
| 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_STUB_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "components/copresence/mediums/audio/audio_manager.h" |
| 12 #include "components/copresence/public/copresence_constants.h" |
| 13 |
| 14 namespace copresence { |
| 15 |
| 16 class AudioManagerStub final : public AudioManager { |
| 17 public: |
| 18 AudioManagerStub(); |
| 19 virtual ~AudioManagerStub(); |
| 20 |
| 21 // AudioManager overrides: |
| 22 virtual void Initialize(const DecodeSamplesCallback& decode_cb, |
| 23 const EncodeTokenCallback& encode_cb) override; |
| 24 virtual void StartPlaying(AudioType type) override; |
| 25 virtual void StopPlaying(AudioType type) override; |
| 26 virtual void StartRecording(AudioType type) override; |
| 27 virtual void StopRecording(AudioType type) override; |
| 28 virtual void SetToken(AudioType type, |
| 29 const std::string& url_unsafe_token) override; |
| 30 virtual const std::string& GetToken(AudioType type) override; |
| 31 virtual bool IsRecording(AudioType type) override; |
| 32 virtual bool IsPlaying(AudioType type) override; |
| 33 |
| 34 private: |
| 35 // Indexed using enum AudioType. |
| 36 bool playing_[2]; |
| 37 bool recording_[2]; |
| 38 |
| 39 std::string token_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(AudioManagerStub); |
| 42 }; |
| 43 |
| 44 } // namespace copresence |
| 45 |
| 46 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_STUB_H_ |
OLD | NEW |