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/mojo/clients/mojo_android_overlay.h" | 5 #include "media/mojo/clients/mojo_android_overlay.h" |
6 | 6 |
7 #include "gpu/ipc/common/gpu_surface_lookup.h" | 7 #include "gpu/ipc/common/gpu_surface_lookup.h" |
8 #include "services/service_manager/public/cpp/connect.h" | 8 #include "services/service_manager/public/cpp/connect.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 config_.is_ready(this); | 66 config_.is_ready(this); |
67 } | 67 } |
68 | 68 |
69 void MojoAndroidOverlay::OnDestroyed() { | 69 void MojoAndroidOverlay::OnDestroyed() { |
70 // Note that |overlay_ptr_| might not be bound yet, or we might not have ever | 70 // Note that |overlay_ptr_| might not be bound yet, or we might not have ever |
71 // gotten a surface. Regardless, the overlay cannot be used. | 71 // gotten a surface. Regardless, the overlay cannot be used. |
72 | 72 |
73 if (!received_surface_) | 73 if (!received_surface_) |
74 config_.is_failed(this); | 74 config_.is_failed(this); |
75 else | 75 else |
76 config_.is_destroyed(this); | 76 RunSurfaceDestroyedCallbacks(); |
77 | 77 |
78 // Note: we do not delete |overlay_ptr_| here. Our client must delete us to | 78 // Note: we do not delete |overlay_ptr_| here. Our client must delete us to |
79 // signal that we should do that, since it still might be in use. | 79 // signal that we should do that, since it still might be in use. |
80 } | 80 } |
81 | 81 |
82 } // namespace media | 82 } // namespace media |
OLD | NEW |