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

Unified Diff: services/ui/ws/server_window.cc

Issue 2400723003: Mus+Ash: Use standard cc mechanism for surface lifetime. (Closed)
Patch Set: Only AddObserver once Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/server_window.cc
diff --git a/services/ui/ws/server_window.cc b/services/ui/ws/server_window.cc
index b15e52101cc96f01bd09556eaf41e21634538257..12a3c2679e3f7c0ad5255d708fdcddb95d078dfd 100644
--- a/services/ui/ws/server_window.cc
+++ b/services/ui/ws/server_window.cc
@@ -77,6 +77,10 @@ void ServerWindow::RemoveObserver(ServerWindowObserver* observer) {
observers_.RemoveObserver(observer);
}
+bool ServerWindow::HasObserver(ServerWindowObserver* observer) {
+ return observers_.HasObserver(observer);
+}
+
void ServerWindow::CreateSurface(mojom::SurfaceType surface_type,
mojo::InterfaceRequest<mojom::Surface> request,
mojom::SurfaceClientPtr client) {
@@ -360,18 +364,6 @@ bool ServerWindow::IsDrawn() const {
return root == window;
}
-void ServerWindow::DestroySurfacesScheduledForDestruction() {
- if (!surface_manager_)
- return;
- ServerWindowSurface* surface = surface_manager_->GetDefaultSurface();
- if (surface)
- surface->DestroySurfacesScheduledForDestruction();
-
- surface = surface_manager_->GetUnderlaySurface();
- if (surface)
- surface->DestroySurfacesScheduledForDestruction();
-}
-
ServerWindowSurfaceManager* ServerWindow::GetOrCreateSurfaceManager() {
if (!surface_manager_.get())
surface_manager_ = base::MakeUnique<ServerWindowSurfaceManager>(this);
« no previous file with comments | « services/ui/ws/server_window.h ('k') | services/ui/ws/server_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698