| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 DCHECK(task_runner_->BelongsToCurrentThread()); | 261 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 262 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); | 262 client_->OnBufferingStateChange(static_cast<media::BufferingState>(state)); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void MojoRenderer::OnEnded() { | 265 void MojoRenderer::OnEnded() { |
| 266 DVLOG(1) << __FUNCTION__; | 266 DVLOG(1) << __FUNCTION__; |
| 267 DCHECK(task_runner_->BelongsToCurrentThread()); | 267 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 268 client_->OnEnded(); | 268 client_->OnEnded(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void MojoRenderer::InitiateScopedSurfaceRequest( |
| 272 ReceiveSurfaceRequestTokenCB receive_request_token_cb) { |
| 273 DVLOG(1) << __FUNCTION__; |
| 274 |
| 275 remote_renderer_->InitiateScopedSurfaceRequest(receive_request_token_cb); |
| 276 } |
| 277 |
| 271 void MojoRenderer::OnError() { | 278 void MojoRenderer::OnError() { |
| 272 DVLOG(1) << __FUNCTION__; | 279 DVLOG(1) << __FUNCTION__; |
| 273 DCHECK(task_runner_->BelongsToCurrentThread()); | 280 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 274 DCHECK(init_cb_.is_null()); | 281 DCHECK(init_cb_.is_null()); |
| 275 | 282 |
| 276 encountered_error_ = true; | 283 encountered_error_ = true; |
| 277 | 284 |
| 278 // TODO(tim): Should we plumb error code from remote renderer? | 285 // TODO(tim): Should we plumb error code from remote renderer? |
| 279 // http://crbug.com/410451. | 286 // http://crbug.com/410451. |
| 280 client_->OnError(PIPELINE_ERROR_DECODE); | 287 client_->OnError(PIPELINE_ERROR_DECODE); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); | 402 base::ResetAndReturn(&init_cb_).Run(PIPELINE_ERROR_INITIALIZATION_FAILED); |
| 396 | 403 |
| 397 if (!flush_cb_.is_null()) | 404 if (!flush_cb_.is_null()) |
| 398 base::ResetAndReturn(&flush_cb_).Run(); | 405 base::ResetAndReturn(&flush_cb_).Run(); |
| 399 | 406 |
| 400 if (!cdm_attached_cb_.is_null()) | 407 if (!cdm_attached_cb_.is_null()) |
| 401 base::ResetAndReturn(&cdm_attached_cb_).Run(false); | 408 base::ResetAndReturn(&cdm_attached_cb_).Run(false); |
| 402 } | 409 } |
| 403 | 410 |
| 404 } // namespace media | 411 } // namespace media |
| OLD | NEW |