Chromium Code Reviews| Index: media/audio/sounds/audio_stream_handler.h |
| diff --git a/media/audio/sounds/audio_stream_handler.h b/media/audio/sounds/audio_stream_handler.h |
| index f814aaef5993b793052fd54bf80105f8c634d57e..2dd77d68e49518af683ce7a32d01ef12cb8fcbb2 100644 |
| --- a/media/audio/sounds/audio_stream_handler.h |
| +++ b/media/audio/sounds/audio_stream_handler.h |
| @@ -53,7 +53,8 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe { |
| // Stops current playback. |
| void Stop(); |
| - const WavAudioHandler& wav_audio_handler() const { return wav_audio_; } |
| + // If AudioStreamHandler is not initialized, this will return nullptr. |
| + const WavAudioHandler* wav_audio_handler() const { return wav_audio_.get(); } |
|
tommi (sloooow) - chröme
2015/11/19 09:44:06
can you add a DCHECK here for the current thread?
slan
2015/11/19 18:57:16
Does this class needs these? All data members are
|
| private: |
| friend class AudioStreamHandlerTest; |
| @@ -65,7 +66,7 @@ class MEDIA_EXPORT AudioStreamHandler : public base::NonThreadSafe { |
| static void SetAudioSourceForTesting( |
| AudioOutputStream::AudioSourceCallback* source); |
| - WavAudioHandler wav_audio_; |
| + scoped_ptr<WavAudioHandler> wav_audio_; |
| scoped_ptr<AudioStreamContainer> stream_; |
| bool initialized_; |