| 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; | |
| 64 } | 63 } |
| 65 | 64 |
| 66 namespace content { | 65 namespace content { |
| 67 | 66 |
| 68 class AudioMirroringManager; | 67 class AudioMirroringManager; |
| 69 class MediaStreamManager; | 68 class MediaStreamManager; |
| 70 | 69 |
| 71 class CONTENT_EXPORT AudioRendererHost | 70 class CONTENT_EXPORT AudioRendererHost |
| 72 : public BrowserMessageFilter, | 71 : public BrowserMessageFilter, |
| 73 public AudioOutputDelegate::EventHandler { | 72 public AudioOutputDelegate::EventHandler { |
| 74 public: | 73 public: |
| 75 // Called from UI thread from the owner of this object. | 74 // Called from UI thread from the owner of this object. |
| 76 AudioRendererHost(int render_process_id, | 75 AudioRendererHost(int render_process_id, |
| 77 media::AudioManager* audio_manager, | 76 media::AudioManager* audio_manager, |
| 78 media::AudioSystem* audio_system, | |
| 79 AudioMirroringManager* mirroring_manager, | 77 AudioMirroringManager* mirroring_manager, |
| 80 MediaStreamManager* media_stream_manager, | 78 MediaStreamManager* media_stream_manager, |
| 81 const std::string& salt); | 79 const std::string& salt); |
| 82 | 80 |
| 83 // Calls |callback| with the list of AudioOutputControllers for this object. | 81 // Calls |callback| with the list of AudioOutputControllers for this object. |
| 84 void GetOutputControllers( | 82 void GetOutputControllers( |
| 85 const RenderProcessHost::GetAudioOutputControllersCallback& | 83 const RenderProcessHost::GetAudioOutputControllersCallback& |
| 86 callback) const; | 84 callback) const; |
| 87 | 85 |
| 88 // BrowserMessageFilter implementation. | 86 // BrowserMessageFilter implementation. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 ValidateRenderFrameIdFunction validate_render_frame_id_function_; | 226 ValidateRenderFrameIdFunction validate_render_frame_id_function_; |
| 229 | 227 |
| 230 AudioOutputAuthorizationHandler authorization_handler_; | 228 AudioOutputAuthorizationHandler authorization_handler_; |
| 231 | 229 |
| 232 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 230 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
| 233 }; | 231 }; |
| 234 | 232 |
| 235 } // namespace content | 233 } // namespace content |
| 236 | 234 |
| 237 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 235 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
| OLD | NEW |