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

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

Issue 12611030: Remove unused parameter to OnError() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits + rebase Created 7 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_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/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/process.h" 9 #include "base/process.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void AudioRendererHost::OnPaused(media::AudioOutputController* controller) { 109 void AudioRendererHost::OnPaused(media::AudioOutputController* controller) {
110 BrowserThread::PostTask( 110 BrowserThread::PostTask(
111 BrowserThread::IO, 111 BrowserThread::IO,
112 FROM_HERE, 112 FROM_HERE,
113 base::Bind( 113 base::Bind(
114 &AudioRendererHost::DoSendPausedMessage, 114 &AudioRendererHost::DoSendPausedMessage,
115 this, 115 this,
116 make_scoped_refptr(controller))); 116 make_scoped_refptr(controller)));
117 } 117 }
118 118
119 void AudioRendererHost::OnError(media::AudioOutputController* controller, 119 void AudioRendererHost::OnError(media::AudioOutputController* controller) {
120 int error_code) {
121 BrowserThread::PostTask( 120 BrowserThread::PostTask(
122 BrowserThread::IO, 121 BrowserThread::IO,
123 FROM_HERE, 122 FROM_HERE,
124 base::Bind(&AudioRendererHost::DoHandleError, 123 base::Bind(
125 this, make_scoped_refptr(controller), error_code)); 124 &AudioRendererHost::DoHandleError,
125 this,
126 make_scoped_refptr(controller)));
126 } 127 }
127 128
128 void AudioRendererHost::OnDeviceChange(media::AudioOutputController* controller, 129 void AudioRendererHost::OnDeviceChange(media::AudioOutputController* controller,
129 int new_buffer_size, 130 int new_buffer_size,
130 int new_sample_rate) { 131 int new_sample_rate) {
131 BrowserThread::PostTask( 132 BrowserThread::PostTask(
132 BrowserThread::IO, 133 BrowserThread::IO,
133 FROM_HERE, 134 FROM_HERE,
134 base::Bind(&AudioRendererHost::DoSendDeviceChangeMessage, 135 base::Bind(&AudioRendererHost::DoSendDeviceChangeMessage,
135 this, make_scoped_refptr(controller), new_buffer_size, 136 this, make_scoped_refptr(controller), new_buffer_size,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 216 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
216 217
217 AudioEntry* entry = LookupByController(controller); 218 AudioEntry* entry = LookupByController(controller);
218 if (!entry) 219 if (!entry)
219 return; 220 return;
220 221
221 Send(new AudioMsg_NotifyDeviceChanged( 222 Send(new AudioMsg_NotifyDeviceChanged(
222 entry->stream_id, new_buffer_size, new_sample_rate)); 223 entry->stream_id, new_buffer_size, new_sample_rate));
223 } 224 }
224 225
225 void AudioRendererHost::DoHandleError(media::AudioOutputController* controller, 226 void AudioRendererHost::DoHandleError(
226 int error_code) { 227 media::AudioOutputController* controller) {
227 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 228 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
228 229
229 AudioEntry* entry = LookupByController(controller); 230 AudioEntry* entry = LookupByController(controller);
230 if (!entry) 231 if (!entry)
231 return; 232 return;
232 233
233 DeleteEntryOnError(entry); 234 DeleteEntryOnError(entry);
234 } 235 }
235 236
236 /////////////////////////////////////////////////////////////////////////////// 237 ///////////////////////////////////////////////////////////////////////////////
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 return NULL; 527 return NULL;
527 } 528 }
528 529
529 media::AudioOutputController* AudioRendererHost::LookupControllerByIdForTesting( 530 media::AudioOutputController* AudioRendererHost::LookupControllerByIdForTesting(
530 int stream_id) { 531 int stream_id) {
531 AudioEntry* const entry = LookupById(stream_id); 532 AudioEntry* const entry = LookupById(stream_id);
532 return entry ? entry->controller : NULL; 533 return entry ? entry->controller : NULL;
533 } 534 }
534 535
535 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698