Chromium Code Reviews| Index: content/browser/media/audio_debug_controller.h |
| diff --git a/content/browser/media/audio_debug_controller.h b/content/browser/media/audio_debug_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4cc8f0879b702d745f811fee901a99b241377a22 |
| --- /dev/null |
| +++ b/content/browser/media/audio_debug_controller.h |
| @@ -0,0 +1,57 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_MEDIA_AUDIO_DEBUG_CONTROLLER_H_ |
| +#define CONTENT_BROWSER_MEDIA_AUDIO_DEBUG_CONTROLLER_H_ |
| + |
| +#include <set> |
| + |
| +#include "base/macros.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "content/common/media/audio_debug_recording.mojom.h" |
| + |
| +namespace base { |
| +template <typename T> |
|
Henrik Grunell
2015/10/15 12:17:02
Nit: Empty line before.
Anand Mistry (off Chromium)
2015/10/21 03:58:23
Done.
|
| +struct DefaultSingletonTraits; |
| + |
| +class FilePath; |
| +} |
|
Henrik Grunell
2015/10/15 12:17:02
// namespace base
Nit: Empty line before.
Anand Mistry (off Chromium)
2015/10/21 03:58:23
Done.
|
| + |
| +namespace content { |
| + |
| +class AudioDebugRecordingImpl; |
| +class AudioInputRendererHost; |
| + |
| +class AudioDebugController { |
|
Henrik Grunell
2015/10/15 12:17:02
Add comment with a description of the class. On wh
Anand Mistry (off Chromium)
2015/10/21 03:58:23
Done.
|
| + public: |
| + static AudioDebugController* GetInstance(); |
| + |
| + static void CreateService( |
| + int render_host_id, |
| + const scoped_refptr<AudioInputRendererHost>& audio_input_renderer_host, |
| + mojo::InterfaceRequest<AudioDebugRecording> request); |
| + |
| + void EnableAudioDebugRecording(const base::FilePath& file); |
| + void DisableAudioDebugRecording(); |
| + |
| + private: |
| + AudioDebugController(); |
| + ~AudioDebugController(); |
| + friend struct base::DefaultSingletonTraits<AudioDebugController>; |
| + |
| + void CreateServiceInternal( |
| + int render_host_id, |
| + const scoped_refptr<AudioInputRendererHost>& audio_input_renderer_host, |
| + mojo::InterfaceRequest<AudioDebugRecording> request); |
| + |
| + void OnDisconnect(AudioDebugRecordingImpl* impl); |
| + |
| + std::set<AudioDebugRecordingImpl*> registered_impls_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AudioDebugController); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_MEDIA_AUDIO_DEBUG_CONTROLLER_H_ |