| 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 BrowserRenderProcessHost, and instantiated on UI | 8 // This class is owned by BrowserRenderProcessHost, 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 media::AudioManager* const audio_manager_; | 209 media::AudioManager* const audio_manager_; |
| 210 AudioMirroringManager* const mirroring_manager_; | 210 AudioMirroringManager* const mirroring_manager_; |
| 211 scoped_ptr<media::AudioLog> audio_log_; | 211 scoped_ptr<media::AudioLog> audio_log_; |
| 212 | 212 |
| 213 // Used to access to AudioInputDeviceManager. | 213 // Used to access to AudioInputDeviceManager. |
| 214 MediaStreamManager* media_stream_manager_; | 214 MediaStreamManager* media_stream_manager_; |
| 215 | 215 |
| 216 // A map of stream IDs to audio sources. | 216 // A map of stream IDs to audio sources. |
| 217 AudioEntryMap audio_entries_; | 217 AudioEntryMap audio_entries_; |
| 218 | 218 |
| 219 // The number of streams in the playing state. | 219 // The number of streams in the playing state. Atomic read safe from any |
| 220 // thread, but should only be updated from the IO thread. |
| 220 base::AtomicRefCount num_playing_streams_; | 221 base::AtomicRefCount num_playing_streams_; |
| 221 | 222 |
| 222 // Salt required to translate renderer device IDs to raw device IDs | 223 // Salt required to translate renderer device IDs to raw device IDs |
| 223 ResourceContext::SaltCallback salt_callback_; | 224 ResourceContext::SaltCallback salt_callback_; |
| 224 | 225 |
| 225 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 226 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 } // namespace content | 229 } // namespace content |
| 229 | 230 |
| 230 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 231 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
| OLD | NEW |