| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/gpu/content_video_view_overlay.h" | 5 #include "media/gpu/content_video_view_overlay.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "gpu/ipc/common/gpu_surface_lookup.h" | 10 #include "gpu/ipc/common/gpu_surface_lookup.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 if (surface_.IsEmpty()) { | 53 if (surface_.IsEmpty()) { |
| 54 config_.is_failed(this); | 54 config_.is_failed(this); |
| 55 // |this| may be deleted. | 55 // |this| may be deleted. |
| 56 return; | 56 return; |
| 57 } | 57 } |
| 58 | 58 |
| 59 config_.is_ready(this); | 59 config_.is_ready(this); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void ContentVideoViewOverlay::OnSurfaceDestroyed() { | 62 void ContentVideoViewOverlay::OnSurfaceDestroyed() { |
| 63 config_.is_destroyed(this); | 63 RunDestructionCallbacks(); |
| 64 // |this| may be deleted, or deletion might be posted elsewhere. | 64 // |this| may be deleted, or deletion might be posted elsewhere. |
| 65 } | 65 } |
| 66 | 66 |
| 67 int32_t ContentVideoViewOverlay::GetSurfaceId() { | 67 int32_t ContentVideoViewOverlay::GetSurfaceId() { |
| 68 return surface_id_; | 68 return surface_id_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace media | 71 } // namespace media |
| OLD | NEW |