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 // AudioRendererHost serves audio related requests from AudioRenderer which | 5 // AudioRendererHost serves audio related requests from AudioRenderer which |
6 // lives inside the render process and provide access to audio hardware. | 6 // lives inside the render process and provide access to audio hardware. |
7 // | 7 // |
8 // This class is owned by RenderProcessHostImpl, and instantiated on UI | 8 // This class is owned by RenderProcessHostImpl, and instantiated on UI |
9 // thread, but all other operations and method calls happen on IO thread, so we | 9 // thread, but all other operations and method calls happen on IO thread, so we |
10 // need to be extra careful about the lifetime of this object. AudioManager is a | 10 // need to be extra careful about the lifetime of this object. AudioManager is a |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "content/public/browser/render_process_host.h" | 53 #include "content/public/browser/render_process_host.h" |
54 | 54 |
55 namespace base { | 55 namespace base { |
56 class SharedMemory; | 56 class SharedMemory; |
57 class CancelableSyncSocket; | 57 class CancelableSyncSocket; |
58 } | 58 } |
59 | 59 |
60 namespace media { | 60 namespace media { |
61 class AudioManager; | 61 class AudioManager; |
62 class AudioParameters; | 62 class AudioParameters; |
| 63 class AudioSystem; |
63 } | 64 } |
64 | 65 |
65 namespace content { | 66 namespace content { |
66 | 67 |
67 class AudioMirroringManager; | 68 class AudioMirroringManager; |
68 class MediaStreamManager; | 69 class MediaStreamManager; |
69 | 70 |
70 class CONTENT_EXPORT AudioRendererHost | 71 class CONTENT_EXPORT AudioRendererHost |
71 : public BrowserMessageFilter, | 72 : public BrowserMessageFilter, |
72 public AudioOutputDelegate::EventHandler { | 73 public AudioOutputDelegate::EventHandler { |
73 public: | 74 public: |
74 // Called from UI thread from the owner of this object. | 75 // Called from UI thread from the owner of this object. |
75 AudioRendererHost(int render_process_id, | 76 AudioRendererHost(int render_process_id, |
76 media::AudioManager* audio_manager, | 77 media::AudioManager* audio_manager, |
| 78 media::AudioSystem* audio_system, |
77 AudioMirroringManager* mirroring_manager, | 79 AudioMirroringManager* mirroring_manager, |
78 MediaStreamManager* media_stream_manager, | 80 MediaStreamManager* media_stream_manager, |
79 const std::string& salt); | 81 const std::string& salt); |
80 | 82 |
81 // Calls |callback| with the list of AudioOutputControllers for this object. | 83 // Calls |callback| with the list of AudioOutputControllers for this object. |
82 void GetOutputControllers( | 84 void GetOutputControllers( |
83 const RenderProcessHost::GetAudioOutputControllersCallback& | 85 const RenderProcessHost::GetAudioOutputControllersCallback& |
84 callback) const; | 86 callback) const; |
85 | 87 |
86 // BrowserMessageFilter implementation. | 88 // BrowserMessageFilter implementation. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 ValidateRenderFrameIdFunction validate_render_frame_id_function_; | 228 ValidateRenderFrameIdFunction validate_render_frame_id_function_; |
227 | 229 |
228 AudioOutputAuthorizationHandler authorization_handler_; | 230 AudioOutputAuthorizationHandler authorization_handler_; |
229 | 231 |
230 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 232 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
231 }; | 233 }; |
232 | 234 |
233 } // namespace content | 235 } // namespace content |
234 | 236 |
235 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 237 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
OLD | NEW |