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

Unified Diff: components/exo/shell_surface.cc

Issue 2157863002: exo: Close widget at the top of ShellSurface dtor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 83a78a9215b6dfa8a43de35e25cfa4e00fb3526b..bead01c79bf79d0f17595f3d45e8c123262f0a52 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -236,15 +236,6 @@ ShellSurface::ShellSurface(Surface* surface)
ShellSurface::~ShellSurface() {
DCHECK(!scoped_configure_);
- ash::Shell::GetInstance()->activation_client()->RemoveObserver(this);
- if (surface_) {
- if (scale_ != 1.0)
- surface_->window()->SetTransform(gfx::Transform());
- surface_->SetSurfaceDelegate(nullptr);
- surface_->RemoveSurfaceObserver(this);
- }
- if (parent_)
- parent_->RemoveObserver(this);
if (resizer_)
EndDrag(false /* revert */);
if (widget_) {
@@ -254,6 +245,15 @@ ShellSurface::~ShellSurface() {
widget_->Hide();
widget_->CloseNow();
}
+ ash::Shell::GetInstance()->activation_client()->RemoveObserver(this);
+ if (parent_)
+ parent_->RemoveObserver(this);
+ if (surface_) {
+ if (scale_ != 1.0)
+ surface_->window()->SetTransform(gfx::Transform());
+ surface_->SetSurfaceDelegate(nullptr);
+ surface_->RemoveSurfaceObserver(this);
+ }
}
void ShellSurface::AcknowledgeConfigure(uint32_t serial) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698