| Index: media/gpu/content_video_view_overlay.cc
|
| diff --git a/media/gpu/content_video_view_overlay.cc b/media/gpu/content_video_view_overlay.cc
|
| index 31da81eec53ff3482e986e2ef2b417b3faa7cf61..8fc56f7aecce78e32e86026dc88839ddef81f1eb 100644
|
| --- a/media/gpu/content_video_view_overlay.cc
|
| +++ b/media/gpu/content_video_view_overlay.cc
|
| @@ -11,10 +11,9 @@
|
|
|
| namespace media {
|
|
|
| -ContentVideoViewOverlay::ContentVideoViewOverlay(
|
| - int surface_id,
|
| - const AndroidOverlay::Config& config)
|
| - : surface_id_(surface_id), config_(config), weak_factory_(this) {
|
| +ContentVideoViewOverlay::ContentVideoViewOverlay(int surface_id,
|
| + AndroidOverlayConfig config)
|
| + : surface_id_(surface_id), config_(std::move(config)), weak_factory_(this) {
|
| if (ContentVideoViewOverlayAllocator::GetInstance()->AllocateSurface(this)) {
|
| // We have the surface -- post a callback to our OnSurfaceAvailable.
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| @@ -41,7 +40,7 @@ const base::android::JavaRef<jobject>& ContentVideoViewOverlay::GetJavaSurface()
|
| void ContentVideoViewOverlay::OnSurfaceAvailable(bool success) {
|
| if (!success) {
|
| // Notify that the surface won't be available.
|
| - config_.failed_cb.Run(this);
|
| + config_.is_failed(this);
|
| // |this| may be deleted.
|
| return;
|
| }
|
| @@ -52,16 +51,16 @@ void ContentVideoViewOverlay::OnSurfaceAvailable(bool success) {
|
|
|
| // If no surface was returned, then fail instead.
|
| if (surface_.IsEmpty()) {
|
| - config_.failed_cb.Run(this);
|
| + config_.is_failed(this);
|
| // |this| may be deleted.
|
| return;
|
| }
|
|
|
| - config_.ready_cb.Run(this);
|
| + config_.is_ready(this);
|
| }
|
|
|
| void ContentVideoViewOverlay::OnSurfaceDestroyed() {
|
| - config_.destroyed_cb.Run(this);
|
| + config_.is_destroyed(this);
|
| // |this| may be deleted, or deletion might be posted elsewhere.
|
| }
|
|
|
|
|