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

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

Issue 142923005: Allow MessageFilters to restrict listening to specific message classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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 #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
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 : render_process_id_(render_process_id), 114 : BrowserMessageFilter(AudioMsgStart),
115 render_process_id_(render_process_id),
115 audio_manager_(audio_manager), 116 audio_manager_(audio_manager),
116 mirroring_manager_(mirroring_manager), 117 mirroring_manager_(mirroring_manager),
117 audio_log_(media_internals->CreateAudioLog( 118 audio_log_(media_internals->CreateAudioLog(
118 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER)), 119 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER)),
119 media_stream_manager_(media_stream_manager) { 120 media_stream_manager_(media_stream_manager) {
120 DCHECK(audio_manager_); 121 DCHECK(audio_manager_);
121 DCHECK(media_stream_manager_); 122 DCHECK(media_stream_manager_);
122 } 123 }
123 124
124 AudioRendererHost::~AudioRendererHost() { 125 AudioRendererHost::~AudioRendererHost() {
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 457 }
457 458
458 AudioRendererHost::AudioEntry* AudioRendererHost::LookupById(int stream_id) { 459 AudioRendererHost::AudioEntry* AudioRendererHost::LookupById(int stream_id) {
459 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 460 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
460 461
461 AudioEntryMap::const_iterator i = audio_entries_.find(stream_id); 462 AudioEntryMap::const_iterator i = audio_entries_.find(stream_id);
462 return i != audio_entries_.end() ? i->second : NULL; 463 return i != audio_entries_.end() ? i->second : NULL;
463 } 464 }
464 465
465 } // namespace content 466 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698