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

Side by Side Diff: media/audio/audio_manager_base.cc

Issue 2423563003: Remove usage of FOR_EACH_OBSERVER macro in media/ (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/audio/audio_manager_base.h" 5 #include "media/audio/audio_manager_base.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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 void AudioManagerBase::RemoveOutputDeviceChangeListener( 314 void AudioManagerBase::RemoveOutputDeviceChangeListener(
315 AudioDeviceListener* listener) { 315 AudioDeviceListener* listener) {
316 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); 316 DCHECK(GetTaskRunner()->BelongsToCurrentThread());
317 output_listeners_.RemoveObserver(listener); 317 output_listeners_.RemoveObserver(listener);
318 } 318 }
319 319
320 void AudioManagerBase::NotifyAllOutputDeviceChangeListeners() { 320 void AudioManagerBase::NotifyAllOutputDeviceChangeListeners() {
321 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); 321 DCHECK(GetTaskRunner()->BelongsToCurrentThread());
322 DVLOG(1) << "Firing OnDeviceChange() notifications."; 322 DVLOG(1) << "Firing OnDeviceChange() notifications.";
323 FOR_EACH_OBSERVER(AudioDeviceListener, output_listeners_, OnDeviceChange()); 323 for (auto& observer : output_listeners_)
324 observer.OnDeviceChange();
324 } 325 }
325 326
326 AudioParameters AudioManagerBase::GetDefaultOutputStreamParameters() { 327 AudioParameters AudioManagerBase::GetDefaultOutputStreamParameters() {
327 return GetPreferredOutputStreamParameters(GetDefaultOutputDeviceID(), 328 return GetPreferredOutputStreamParameters(GetDefaultOutputDeviceID(),
328 AudioParameters()); 329 AudioParameters());
329 } 330 }
330 331
331 AudioParameters AudioManagerBase::GetOutputStreamParameters( 332 AudioParameters AudioManagerBase::GetOutputStreamParameters(
332 const std::string& device_id) { 333 const std::string& device_id) {
333 return GetPreferredOutputStreamParameters(device_id, 334 return GetPreferredOutputStreamParameters(device_id,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 382
382 return 0; 383 return 0;
383 } 384 }
384 385
385 std::unique_ptr<AudioLog> AudioManagerBase::CreateAudioLog( 386 std::unique_ptr<AudioLog> AudioManagerBase::CreateAudioLog(
386 AudioLogFactory::AudioComponent component) { 387 AudioLogFactory::AudioComponent component) {
387 return audio_log_factory_->CreateAudioLog(component); 388 return audio_log_factory_->CreateAudioLog(component);
388 } 389 }
389 390
390 } // namespace media 391 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698