Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: media/mojo/clients/mojo_android_overlay.cc

Issue 2883913003: Add multiple destruction callbacks to AndroidOverlay. (Closed)
Patch Set: rebased.... though i got not conflicts? Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/gpu/content_video_view_overlay.cc ('k') | media/mojo/clients/mojo_android_overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698