| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 13 #include "media/base/audio_parameters.h" | 13 #include "media/base/audio_parameters.h" |
| 14 #include "media/base/audio_renderer_sink.h" | 14 #include "media/base/audio_renderer_sink.h" |
| 15 #include "third_party/WebKit/public/platform/WebAudioDevice.h" | 15 #include "third_party/WebKit/public/platform/WebAudioDevice.h" |
| 16 #include "third_party/WebKit/public/platform/WebVector.h" | 16 #include "third_party/WebKit/public/platform/WebVector.h" |
| 17 #include "url/origin.h" | 17 #include "url/origin.h" |
| 18 | 18 |
| 19 namespace base { | |
| 20 class SingleThreadTaskRunner; | |
| 21 } | |
| 22 | |
| 23 namespace media { | 19 namespace media { |
| 24 class SilentSinkSuspender; | 20 class SilentSinkSuspender; |
| 25 } | 21 } |
| 26 | 22 |
| 27 namespace content { | 23 namespace content { |
| 28 class RendererWebAudioDeviceImpl | 24 class RendererWebAudioDeviceImpl |
| 29 : public blink::WebAudioDevice, | 25 : public blink::WebAudioDevice, |
| 30 public media::AudioRendererSink::RenderCallback { | 26 public media::AudioRendererSink::RenderCallback { |
| 31 public: | 27 public: |
| 32 RendererWebAudioDeviceImpl(const media::AudioParameters& params, | 28 RendererWebAudioDeviceImpl(const media::AudioParameters& params, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 64 |
| 69 // Used to suspend |sink_| usage when silence has been detected for too long. | 65 // Used to suspend |sink_| usage when silence has been detected for too long. |
| 70 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; | 66 std::unique_ptr<media::SilentSinkSuspender> webaudio_suspender_; |
| 71 | 67 |
| 72 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); | 68 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); |
| 73 }; | 69 }; |
| 74 | 70 |
| 75 } // namespace content | 71 } // namespace content |
| 76 | 72 |
| 77 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ | 73 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ |
| OLD | NEW |