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 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 /////////////////////////////////////////////////////////////////////////////// | 105 /////////////////////////////////////////////////////////////////////////////// |
106 // AudioRendererHost implementations. | 106 // AudioRendererHost implementations. |
107 | 107 |
108 AudioRendererHost::AudioRendererHost( | 108 AudioRendererHost::AudioRendererHost( |
109 int render_process_id, | 109 int render_process_id, |
110 media::AudioManager* audio_manager, | 110 media::AudioManager* audio_manager, |
111 AudioMirroringManager* mirroring_manager, | 111 AudioMirroringManager* mirroring_manager, |
112 MediaInternals* media_internals, | 112 MediaInternals* media_internals, |
113 MediaStreamManager* media_stream_manager) | 113 MediaStreamManager* media_stream_manager) |
114 : BrowserMessageFilter(AudioMsgStart), | 114 : render_process_id_(render_process_id), |
115 render_process_id_(render_process_id), | |
116 audio_manager_(audio_manager), | 115 audio_manager_(audio_manager), |
117 mirroring_manager_(mirroring_manager), | 116 mirroring_manager_(mirroring_manager), |
118 audio_log_(media_internals->CreateAudioLog( | 117 audio_log_(media_internals->CreateAudioLog( |
119 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER)), | 118 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER)), |
120 media_stream_manager_(media_stream_manager) { | 119 media_stream_manager_(media_stream_manager) { |
121 DCHECK(audio_manager_); | 120 DCHECK(audio_manager_); |
122 DCHECK(media_stream_manager_); | 121 DCHECK(media_stream_manager_); |
123 } | 122 } |
124 | 123 |
125 AudioRendererHost::~AudioRendererHost() { | 124 AudioRendererHost::~AudioRendererHost() { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 } | 456 } |
458 | 457 |
459 AudioRendererHost::AudioEntry* AudioRendererHost::LookupById(int stream_id) { | 458 AudioRendererHost::AudioEntry* AudioRendererHost::LookupById(int stream_id) { |
460 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 459 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
461 | 460 |
462 AudioEntryMap::const_iterator i = audio_entries_.find(stream_id); | 461 AudioEntryMap::const_iterator i = audio_entries_.find(stream_id); |
463 return i != audio_entries_.end() ? i->second : NULL; | 462 return i != audio_entries_.end() ? i->second : NULL; |
464 } | 463 } |
465 | 464 |
466 } // namespace content | 465 } // namespace content |
OLD | NEW |