OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/mojo/clients/mojo_renderer.h" | 5 #include "media/mojo/clients/mojo_renderer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 DCHECK(task_runner_->BelongsToCurrentThread()); | 267 DCHECK(task_runner_->BelongsToCurrentThread()); |
268 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); | 268 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); |
269 } | 269 } |
270 | 270 |
271 void MojoRenderer::OnEnded() { | 271 void MojoRenderer::OnEnded() { |
272 DVLOG(1) << __FUNCTION__; | 272 DVLOG(1) << __FUNCTION__; |
273 DCHECK(task_runner_->BelongsToCurrentThread()); | 273 DCHECK(task_runner_->BelongsToCurrentThread()); |
274 client_->OnEnded(); | 274 client_->OnEnded(); |
275 } | 275 } |
276 | 276 |
| 277 void MojoRenderer::InitiateScopedSurfaceRequest( |
| 278 const ReceiveSurfaceRequestTokenCB& receive_request_token_cb) { |
| 279 DVLOG(1) << __FUNCTION__; |
| 280 |
| 281 remote_renderer_->InitiateScopedSurfaceRequest(receive_request_token_cb); |
| 282 } |
| 283 |
277 void MojoRenderer::OnError() { | 284 void MojoRenderer::OnError() { |
278 DVLOG(1) << __FUNCTION__; | 285 DVLOG(1) << __FUNCTION__; |
279 DCHECK(task_runner_->BelongsToCurrentThread()); | 286 DCHECK(task_runner_->BelongsToCurrentThread()); |
280 DCHECK(init_cb_.is_null()); | 287 DCHECK(init_cb_.is_null()); |
281 | 288 |
282 encountered_error_ = true; | 289 encountered_error_ = true; |
283 | 290 |
284 // TODO(tim): Should we plumb error code from remote renderer? | 291 // TODO(tim): Should we plumb error code from remote renderer? |
285 // http://crbug.com/410451. | 292 // http://crbug.com/410451. |
286 client_->OnError(PIPELINE_ERROR_DECODE); | 293 client_->OnError(PIPELINE_ERROR_DECODE); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); | 408 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); |
402 | 409 |
403 if (!flush_cb_.is_null()) | 410 if (!flush_cb_.is_null()) |
404 base::ResetAndReturn(&flush_cb_).Run(); | 411 base::ResetAndReturn(&flush_cb_).Run(); |
405 | 412 |
406 if (!cdm_attached_cb_.is_null()) | 413 if (!cdm_attached_cb_.is_null()) |
407 base::ResetAndReturn(&cdm_attached_cb_).Run(false); | 414 base::ResetAndReturn(&cdm_attached_cb_).Run(false); |
408 } | 415 } |
409 | 416 |
410 } // namespace media | 417 } // namespace media |
OLD | NEW |