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

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

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 | Annotate | Revision Log
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/numerics/safe_math.h" 10 #include "base/numerics/safe_math.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 user_input_monitor_(user_input_monitor), 63 user_input_monitor_(user_input_monitor),
64 audio_log_(MediaInternals::GetInstance()->CreateAudioLog( 64 audio_log_(MediaInternals::GetInstance()->CreateAudioLog(
65 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER)) {} 65 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER)) {}
66 66
67 AudioInputRendererHost::~AudioInputRendererHost() { 67 AudioInputRendererHost::~AudioInputRendererHost() {
68 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 68 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
69 DCHECK(audio_entries_.empty()); 69 DCHECK(audio_entries_.empty());
70 } 70 }
71 71
72 void AudioInputRendererHost::OnChannelClosing() { 72 void AudioInputRendererHost::OnChannelClosing() {
73 // Since the IPC channel is gone, close all requested audio streams. 73 // Since the IPC sender is gone, close all requested audio streams.
74 DeleteEntries(); 74 DeleteEntries();
75 } 75 }
76 76
77 void AudioInputRendererHost::OnDestruct() const { 77 void AudioInputRendererHost::OnDestruct() const {
78 BrowserThread::DeleteOnIOThread::Destruct(this); 78 BrowserThread::DeleteOnIOThread::Destruct(this);
79 } 79 }
80 80
81 void AudioInputRendererHost::OnCreated( 81 void AudioInputRendererHost::OnCreated(
82 media::AudioInputController* controller) { 82 media::AudioInputController* controller) {
83 BrowserThread::PostTask( 83 BrowserThread::PostTask(
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 // TODO(hclam): Implement a faster look up method. 464 // TODO(hclam): Implement a faster look up method.
465 for (AudioEntryMap::iterator i = audio_entries_.begin(); 465 for (AudioEntryMap::iterator i = audio_entries_.begin();
466 i != audio_entries_.end(); ++i) { 466 i != audio_entries_.end(); ++i) {
467 if (controller == i->second->controller.get()) 467 if (controller == i->second->controller.get())
468 return i->second; 468 return i->second;
469 } 469 }
470 return NULL; 470 return NULL;
471 } 471 }
472 472
473 } // namespace content 473 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_message_filter.cc ('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