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

Side by Side Diff: media/audio/audio_output_controller.h

Issue 1911913002: Convert //media/audio from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 | « media/audio/audio_manager_unittest.cc ('k') | media/audio/audio_output_controller_unittest.cc » ('j') | 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 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/atomic_ref_count.h" 12 #include "base/atomic_ref_count.h"
11 #include "base/callback.h" 13 #include "base/callback.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
14 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
15 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
16 #include "build/build_config.h" 18 #include "build/build_config.h"
17 #include "media/audio/audio_io.h" 19 #include "media/audio/audio_io.h"
18 #include "media/audio/audio_manager.h" 20 #include "media/audio/audio_manager.h"
19 #include "media/audio/audio_power_monitor.h" 21 #include "media/audio/audio_power_monitor.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 SyncReader* const sync_reader_; 251 SyncReader* const sync_reader_;
250 252
251 // The message loop of audio manager thread that this object runs on. 253 // The message loop of audio manager thread that this object runs on.
252 const scoped_refptr<base::SingleThreadTaskRunner> message_loop_; 254 const scoped_refptr<base::SingleThreadTaskRunner> message_loop_;
253 255
254 // Scans audio samples from OnMoreData() as input to compute power levels. 256 // Scans audio samples from OnMoreData() as input to compute power levels.
255 AudioPowerMonitor power_monitor_; 257 AudioPowerMonitor power_monitor_;
256 258
257 // Flags when we've asked for a stream to start but it never did. 259 // Flags when we've asked for a stream to start but it never did.
258 base::AtomicRefCount on_more_io_data_called_; 260 base::AtomicRefCount on_more_io_data_called_;
259 scoped_ptr<base::OneShotTimer> wedge_timer_; 261 std::unique_ptr<base::OneShotTimer> wedge_timer_;
260 262
261 // Flag which indicates errors received during Stop/Close should be ignored. 263 // Flag which indicates errors received during Stop/Close should be ignored.
262 // These errors are generally harmless since a fresh stream is about to be 264 // These errors are generally harmless since a fresh stream is about to be
263 // recreated, but if forwarded, renderer side clients may consider them 265 // recreated, but if forwarded, renderer side clients may consider them
264 // catastrophic and abort their operations. 266 // catastrophic and abort their operations.
265 // 267 //
266 // If |stream_| is started then |ignore_errors_during_stop_close_| must only 268 // If |stream_| is started then |ignore_errors_during_stop_close_| must only
267 // be accessed while |error_lock_| is held. 269 // be accessed while |error_lock_| is held.
268 bool ignore_errors_during_stop_close_; 270 bool ignore_errors_during_stop_close_;
269 base::Lock error_lock_; 271 base::Lock error_lock_;
270 272
271 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); 273 DISALLOW_COPY_AND_ASSIGN(AudioOutputController);
272 }; 274 };
273 275
274 } // namespace media 276 } // namespace media
275 277
276 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ 278 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « media/audio/audio_manager_unittest.cc ('k') | media/audio/audio_output_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698