Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host.h

Issue 1214883004: Fixed the audio backgrounding bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed bad rebase merge Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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. 298 // The number of streams in the playing state. Atomic read safe from any
299 // thread, but should only be updated from the IO thread.
299 base::AtomicRefCount num_playing_streams_; 300 base::AtomicRefCount num_playing_streams_;
300 301
301 // Salt required to translate renderer device IDs to raw device unique IDs 302 // Salt required to translate renderer device IDs to raw device unique IDs
302 ResourceContext::SaltCallback salt_callback_; 303 ResourceContext::SaltCallback salt_callback_;
303 304
304 // Map of device authorizations for streams that are not yet created 305 // Map of device authorizations for streams that are not yet created
305 // The key is the stream ID, and the value is a pair. The pair's first element 306 // The key is the stream ID, and the value is a pair. The pair's first element
306 // is a bool that is true if the authorization process completes successfully. 307 // is a bool that is true if the authorization process completes successfully.
307 // The second element contains the unique ID of the authorized device. 308 // The second element contains the unique ID of the authorized device.
308 std::map<int, std::pair<bool, std::string>> authorizations_; 309 std::map<int, std::pair<bool, std::string>> authorizations_;
309 310
310 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); 311 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
311 }; 312 };
312 313
313 } // namespace content 314 } // namespace content
314 315
315 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 316 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/loop_audio.html ('k') | content/browser/renderer_host/media/audio_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698