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

Side by Side Diff: components/exo/shell_surface.cc

Issue 2277463004: Update widget bounds after ScopedConfigure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/shell_surface.h" 5 #include "components/exo/shell_surface.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm/window_resizer.h" 9 #include "ash/common/wm/window_resizer.h"
10 #include "ash/common/wm/window_state.h" 10 #include "ash/common/wm/window_state.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 DCHECK(!shell_surface_->scoped_configure_); 212 DCHECK(!shell_surface_->scoped_configure_);
213 shell_surface_->scoped_configure_ = this; 213 shell_surface_->scoped_configure_ = this;
214 } 214 }
215 215
216 ShellSurface::ScopedConfigure::~ScopedConfigure() { 216 ShellSurface::ScopedConfigure::~ScopedConfigure() {
217 DCHECK_EQ(shell_surface_->scoped_configure_, this); 217 DCHECK_EQ(shell_surface_->scoped_configure_, this);
218 shell_surface_->scoped_configure_ = nullptr; 218 shell_surface_->scoped_configure_ = nullptr;
219 if (needs_configure_ || force_configure_) 219 if (needs_configure_ || force_configure_)
220 shell_surface_->Configure(); 220 shell_surface_->Configure();
221 // ScopedConfigure instance might have suppressed a widget bounds update. 221 // ScopedConfigure instance might have suppressed a widget bounds update.
222 if (shell_surface_->widget_) 222 if (shell_surface_->widget_) {
223 shell_surface_->UpdateWidgetBounds(); 223 shell_surface_->UpdateWidgetBounds();
224 shell_surface_->UpdateShadow();
225 }
224 } 226 }
225 227
226 //////////////////////////////////////////////////////////////////////////////// 228 ////////////////////////////////////////////////////////////////////////////////
227 // ShellSurface, ScopedAnimationsDisabled: 229 // ShellSurface, ScopedAnimationsDisabled:
228 230
229 ShellSurface::ScopedAnimationsDisabled::ScopedAnimationsDisabled( 231 ShellSurface::ScopedAnimationsDisabled::ScopedAnimationsDisabled(
230 ShellSurface* shell_surface) 232 ShellSurface* shell_surface)
231 : shell_surface_(shell_surface) { 233 : shell_surface_(shell_surface) {
232 if (shell_surface_->widget_) { 234 if (shell_surface_->widget_) {
233 aura::Window* window = shell_surface_->widget_->GetNativeWindow(); 235 aura::Window* window = shell_surface_->widget_->GetNativeWindow();
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 shadow_overlay_->layer()->Add(shadow->layer()); 1287 shadow_overlay_->layer()->Add(shadow->layer());
1286 window->AddChild(shadow_overlay_); 1288 window->AddChild(shadow_overlay_);
1287 shadow_overlay_->Show(); 1289 shadow_overlay_->Show();
1288 } 1290 }
1289 shadow_overlay_->SetBounds(shadow_bounds); 1291 shadow_overlay_->SetBounds(shadow_bounds);
1290 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); 1292 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size()));
1291 } 1293 }
1292 } 1294 }
1293 1295
1294 } // namespace exo 1296 } // namespace exo
OLDNEW
« 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