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

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

Issue 2784563003: WebRTC Audio private API: removing WebRtcAudioPrivate(Set/Get)ActiveSinkFunction (Closed)
Patch Set: nitfixes Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_output_delegate_impl.h" 5 #include "content/browser/renderer_host/media/audio_output_delegate_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // 132 //
133 // It's fine if this task is canceled during shutdown, since the 133 // It's fine if this task is canceled during shutdown, since the
134 // mirroring manager doesn't require that all diverters are 134 // mirroring manager doesn't require that all diverters are
135 // removed. 135 // removed.
136 mirroring_manager->RemoveDiverter(controller.get()); 136 mirroring_manager->RemoveDiverter(controller.get());
137 }, 137 },
138 mirroring_manager_, base::Passed(&controller_event_handler_), 138 mirroring_manager_, base::Passed(&controller_event_handler_),
139 base::Passed(&reader_), controller_)); 139 base::Passed(&reader_), controller_));
140 } 140 }
141 141
142 scoped_refptr<media::AudioOutputController>
143 AudioOutputDelegateImpl::GetController() const {
144 return controller_;
145 }
146
147 int AudioOutputDelegateImpl::GetStreamId() const { 142 int AudioOutputDelegateImpl::GetStreamId() const {
148 return stream_id_; 143 return stream_id_;
149 } 144 }
150 145
151 void AudioOutputDelegateImpl::OnPlayStream() { 146 void AudioOutputDelegateImpl::OnPlayStream() {
152 DCHECK_CURRENTLY_ON(BrowserThread::IO); 147 DCHECK_CURRENTLY_ON(BrowserThread::IO);
153 controller_->Play(); 148 controller_->Play();
154 audio_log_->OnStarted(stream_id_); 149 audio_log_->OnStarted(stream_id_);
155 } 150 }
156 151
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 189 }
195 } 190 }
196 191
197 void AudioOutputDelegateImpl::OnError() { 192 void AudioOutputDelegateImpl::OnError() {
198 DCHECK_CURRENTLY_ON(BrowserThread::IO); 193 DCHECK_CURRENTLY_ON(BrowserThread::IO);
199 194
200 audio_log_->OnError(stream_id_); 195 audio_log_->OnError(stream_id_);
201 subscriber_->OnStreamError(stream_id_); 196 subscriber_->OnStreamError(stream_id_);
202 } 197 }
203 198
199 media::AudioOutputController* AudioOutputDelegateImpl::GetControllerForTesting()
200 const {
201 return controller_.get();
202 }
Devlin 2017/04/05 14:13:55 drive-by nit: \n
o1ka 2017/04/06 12:18:29 Done.
204 } // namespace content 203 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698