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

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

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/audio/audio_input_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 #include "media/audio/audio_input_controller.h" 5 #include "media/audio/audio_input_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "media/base/limits.h" 9 #include "media/base/limits.h"
10 #include "media/base/scoped_histogram_timer.h" 10 #include "media/base/scoped_histogram_timer.h"
(...skipping 26 matching lines...) Expand all
37 37
38 AudioInputController::AudioInputController(EventHandler* handler, 38 AudioInputController::AudioInputController(EventHandler* handler,
39 SyncWriter* sync_writer) 39 SyncWriter* sync_writer)
40 : creator_loop_(base::MessageLoopProxy::current()), 40 : creator_loop_(base::MessageLoopProxy::current()),
41 handler_(handler), 41 handler_(handler),
42 stream_(NULL), 42 stream_(NULL),
43 data_is_active_(false), 43 data_is_active_(false),
44 state_(kEmpty), 44 state_(kEmpty),
45 sync_writer_(sync_writer), 45 sync_writer_(sync_writer),
46 max_volume_(0.0) { 46 max_volume_(0.0) {
47 DCHECK(creator_loop_); 47 DCHECK(creator_loop_.get());
48 } 48 }
49 49
50 AudioInputController::~AudioInputController() { 50 AudioInputController::~AudioInputController() {
51 DCHECK(kClosed == state_ || kCreated == state_ || kEmpty == state_); 51 DCHECK(kClosed == state_ || kCreated == state_ || kEmpty == state_);
52 } 52 }
53 53
54 // static 54 // static
55 scoped_refptr<AudioInputController> AudioInputController::Create( 55 scoped_refptr<AudioInputController> AudioInputController::Create(
56 AudioManager* audio_manager, 56 AudioManager* audio_manager,
57 EventHandler* event_handler, 57 EventHandler* event_handler,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 void AudioInputController::SetDataIsActive(bool enabled) { 373 void AudioInputController::SetDataIsActive(bool enabled) {
374 base::subtle::Release_Store(&data_is_active_, enabled); 374 base::subtle::Release_Store(&data_is_active_, enabled);
375 } 375 }
376 376
377 bool AudioInputController::GetDataIsActive() { 377 bool AudioInputController::GetDataIsActive() {
378 return (base::subtle::Acquire_Load(&data_is_active_) != false); 378 return (base::subtle::Acquire_Load(&data_is_active_) != false);
379 } 379 }
380 380
381 } // namespace media 381 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_device_thread.cc ('k') | media/audio/audio_input_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698