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

Side by Side Diff: media/base/pipeline_impl.cc

Issue 2689863002: Change ownership of PipelineImpl (Closed)
Patch Set: Proper rebase Created 3 years, 10 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 | media/blink/webmediaplayer_impl.h » ('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/base/pipeline_impl.h" 5 #include "media/base/pipeline_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 if (!seek_cb_.is_null()) { 1249 if (!seek_cb_.is_null()) {
1250 base::ResetAndReturn(&seek_cb_).Run(error); 1250 base::ResetAndReturn(&seek_cb_).Run(error);
1251 } else if (!suspend_cb_.is_null()) { 1251 } else if (!suspend_cb_.is_null()) {
1252 base::ResetAndReturn(&suspend_cb_).Run(error); 1252 base::ResetAndReturn(&suspend_cb_).Run(error);
1253 } else { 1253 } else {
1254 DCHECK(client_); 1254 DCHECK(client_);
1255 client_->OnError(error); 1255 client_->OnError(error);
1256 } 1256 }
1257 1257
1258 // Any kind of error stops the pipeline. 1258 // Any kind of error stops the pipeline.
1259 //
1260 // TODO (tguilbert): Move this out to PipelineController to make the state
1261 // changes more consistent. See crbug.com/695734.
1259 Stop(); 1262 Stop();
1260 } 1263 }
1261 1264
1262 void PipelineImpl::OnEnded() { 1265 void PipelineImpl::OnEnded() {
1263 DVLOG(2) << __func__; 1266 DVLOG(2) << __func__;
1264 DCHECK(thread_checker_.CalledOnValidThread()); 1267 DCHECK(thread_checker_.CalledOnValidThread());
1265 DCHECK(IsRunning()); 1268 DCHECK(IsRunning());
1266 1269
1267 DCHECK(client_); 1270 DCHECK(client_);
1268 client_->OnEnded(); 1271 client_->OnEnded();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 void PipelineImpl::OnSuspendDone() { 1360 void PipelineImpl::OnSuspendDone() {
1358 DVLOG(3) << __func__; 1361 DVLOG(3) << __func__;
1359 DCHECK(thread_checker_.CalledOnValidThread()); 1362 DCHECK(thread_checker_.CalledOnValidThread());
1360 DCHECK(IsRunning()); 1363 DCHECK(IsRunning());
1361 1364
1362 DCHECK(!suspend_cb_.is_null()); 1365 DCHECK(!suspend_cb_.is_null());
1363 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); 1366 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK);
1364 } 1367 }
1365 1368
1366 } // namespace media 1369 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698