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

Side by Side Diff: content/browser/renderer_host/media/audio_input_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, 9 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_input_renderer_host.h" 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/process/process.h" 10 #include "base/process/process.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 pending_close(false) { 47 pending_close(false) {
48 } 48 }
49 49
50 AudioInputRendererHost::AudioEntry::~AudioEntry() {} 50 AudioInputRendererHost::AudioEntry::~AudioEntry() {}
51 51
52 AudioInputRendererHost::AudioInputRendererHost( 52 AudioInputRendererHost::AudioInputRendererHost(
53 media::AudioManager* audio_manager, 53 media::AudioManager* audio_manager,
54 MediaStreamManager* media_stream_manager, 54 MediaStreamManager* media_stream_manager,
55 AudioMirroringManager* audio_mirroring_manager, 55 AudioMirroringManager* audio_mirroring_manager,
56 media::UserInputMonitor* user_input_monitor) 56 media::UserInputMonitor* user_input_monitor)
57 : audio_manager_(audio_manager), 57 : BrowserMessageFilter(AudioMsgStart),
58 audio_manager_(audio_manager),
58 media_stream_manager_(media_stream_manager), 59 media_stream_manager_(media_stream_manager),
59 audio_mirroring_manager_(audio_mirroring_manager), 60 audio_mirroring_manager_(audio_mirroring_manager),
60 user_input_monitor_(user_input_monitor), 61 user_input_monitor_(user_input_monitor),
61 audio_log_(MediaInternals::GetInstance()->CreateAudioLog( 62 audio_log_(MediaInternals::GetInstance()->CreateAudioLog(
62 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER)) {} 63 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER)) {}
63 64
64 AudioInputRendererHost::~AudioInputRendererHost() { 65 AudioInputRendererHost::~AudioInputRendererHost() {
65 DCHECK(audio_entries_.empty()); 66 DCHECK(audio_entries_.empty());
66 } 67 }
67 68
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // TODO(hclam): Implement a faster look up method. 417 // TODO(hclam): Implement a faster look up method.
417 for (AudioEntryMap::iterator i = audio_entries_.begin(); 418 for (AudioEntryMap::iterator i = audio_entries_.begin();
418 i != audio_entries_.end(); ++i) { 419 i != audio_entries_.end(); ++i) {
419 if (controller == i->second->controller.get()) 420 if (controller == i->second->controller.get())
420 return i->second; 421 return i->second;
421 } 422 }
422 return NULL; 423 return NULL;
423 } 424 }
424 425
425 } // namespace content 426 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698