| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 media::AudioManager* const audio_manager_; | 288 media::AudioManager* const audio_manager_; |
| 289 AudioMirroringManager* const mirroring_manager_; | 289 AudioMirroringManager* const mirroring_manager_; |
| 290 scoped_ptr<media::AudioLog> audio_log_; | 290 scoped_ptr<media::AudioLog> audio_log_; |
| 291 | 291 |
| 292 // Used to access to AudioInputDeviceManager. | 292 // Used to access to AudioInputDeviceManager. |
| 293 MediaStreamManager* media_stream_manager_; | 293 MediaStreamManager* media_stream_manager_; |
| 294 | 294 |
| 295 // A map of stream IDs to audio sources. | 295 // A map of stream IDs to audio sources. |
| 296 AudioEntryMap audio_entries_; | 296 AudioEntryMap audio_entries_; |
| 297 | 297 |
| 298 // The number of streams in the playing state. Atomic read safe from any | 298 // The number of streams in the playing state. |
| 299 // thread, but should only be updated from the IO thread. | |
| 300 base::AtomicRefCount num_playing_streams_; | 299 base::AtomicRefCount num_playing_streams_; |
| 301 | 300 |
| 302 // Salt required to translate renderer device IDs to raw device unique IDs | 301 // Salt required to translate renderer device IDs to raw device unique IDs |
| 303 ResourceContext::SaltCallback salt_callback_; | 302 ResourceContext::SaltCallback salt_callback_; |
| 304 | 303 |
| 305 // Map of device authorizations for streams that are not yet created | 304 // Map of device authorizations for streams that are not yet created |
| 306 // The key is the stream ID, and the value is a pair. The pair's first element | 305 // The key is the stream ID, and the value is a pair. The pair's first element |
| 307 // is a bool that is true if the authorization process completes successfully. | 306 // is a bool that is true if the authorization process completes successfully. |
| 308 // The second element contains the unique ID of the authorized device. | 307 // The second element contains the unique ID of the authorized device. |
| 309 std::map<int, std::pair<bool, std::string>> authorizations_; | 308 std::map<int, std::pair<bool, std::string>> authorizations_; |
| 310 | 309 |
| 311 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 310 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
| 312 }; | 311 }; |
| 313 | 312 |
| 314 } // namespace content | 313 } // namespace content |
| 315 | 314 |
| 316 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 315 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
| OLD | NEW |