OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_MANAGER_FACTORY_H_ |
| 6 #define CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_MANAGER_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/audio/audio_manager_factory.h" |
| 11 |
| 12 namespace chromecast { |
| 13 class CastAudioStreamProvider; |
| 14 } |
| 15 |
| 16 namespace media { |
| 17 |
| 18 // Implementation of media::AudioManagerFactory which creates an instance of |
| 19 // CastAudioManager. |
| 20 class MEDIA_EXPORT CastAudioManagerFactory : public AudioManagerFactory { |
| 21 public: |
| 22 // |audio_stream_provider| is used to provide the AudioManager with audio |
| 23 // streams. This class does not take ownership of |audio_stream_provider|, |
| 24 // which must be non-null and must outlive this factory. |
| 25 explicit CastAudioManagerFactory( |
| 26 chromecast::CastAudioStreamProvider* audio_stream_provider); |
| 27 ~CastAudioManagerFactory() override; |
| 28 |
| 29 // Creates and returns a CastAudioManager instance. Caller owns the |
| 30 // reutrned instance. |
| 31 AudioManager* CreateInstance(AudioLogFactory* audio_log_factory) override; |
| 32 |
| 33 private: |
| 34 chromecast::CastAudioStreamProvider* audio_stream_provider_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(CastAudioManagerFactory); |
| 37 }; |
| 38 |
| 39 } // namespace media |
| 40 |
| 41 #endif // CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_MANAGER_FACTORY_H_ |
OLD | NEW |