| OLD | NEW |
| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 DCHECK(!shell_surface_->scoped_configure_); | 211 DCHECK(!shell_surface_->scoped_configure_); |
| 212 shell_surface_->scoped_configure_ = this; | 212 shell_surface_->scoped_configure_ = this; |
| 213 } | 213 } |
| 214 | 214 |
| 215 ShellSurface::ScopedConfigure::~ScopedConfigure() { | 215 ShellSurface::ScopedConfigure::~ScopedConfigure() { |
| 216 DCHECK_EQ(shell_surface_->scoped_configure_, this); | 216 DCHECK_EQ(shell_surface_->scoped_configure_, this); |
| 217 shell_surface_->scoped_configure_ = nullptr; | 217 shell_surface_->scoped_configure_ = nullptr; |
| 218 if (needs_configure_ || force_configure_) | 218 if (needs_configure_ || force_configure_) |
| 219 shell_surface_->Configure(); | 219 shell_surface_->Configure(); |
| 220 // ScopedConfigure instance might have suppressed a widget bounds update. | 220 // ScopedConfigure instance might have suppressed a widget bounds update. |
| 221 if (shell_surface_->widget_) | 221 if (shell_surface_->widget_) { |
| 222 shell_surface_->UpdateWidgetBounds(); | 222 shell_surface_->UpdateWidgetBounds(); |
| 223 shell_surface_->UpdateShadow(); |
| 224 } |
| 223 } | 225 } |
| 224 | 226 |
| 225 //////////////////////////////////////////////////////////////////////////////// | 227 //////////////////////////////////////////////////////////////////////////////// |
| 226 // ShellSurface, ScopedAnimationsDisabled: | 228 // ShellSurface, ScopedAnimationsDisabled: |
| 227 | 229 |
| 228 ShellSurface::ScopedAnimationsDisabled::ScopedAnimationsDisabled( | 230 ShellSurface::ScopedAnimationsDisabled::ScopedAnimationsDisabled( |
| 229 ShellSurface* shell_surface) | 231 ShellSurface* shell_surface) |
| 230 : shell_surface_(shell_surface) { | 232 : shell_surface_(shell_surface) { |
| 231 if (shell_surface_->widget_) { | 233 if (shell_surface_->widget_) { |
| 232 aura::Window* window = shell_surface_->widget_->GetNativeWindow(); | 234 aura::Window* window = shell_surface_->widget_->GetNativeWindow(); |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 shadow_overlay_->layer()->Add(shadow->layer()); | 1292 shadow_overlay_->layer()->Add(shadow->layer()); |
| 1291 window->AddChild(shadow_overlay_); | 1293 window->AddChild(shadow_overlay_); |
| 1292 shadow_overlay_->Show(); | 1294 shadow_overlay_->Show(); |
| 1293 } | 1295 } |
| 1294 shadow_overlay_->SetBounds(shadow_bounds); | 1296 shadow_overlay_->SetBounds(shadow_bounds); |
| 1295 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); | 1297 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); |
| 1296 } | 1298 } |
| 1297 } | 1299 } |
| 1298 | 1300 |
| 1299 } // namespace exo | 1301 } // namespace exo |
| OLD | NEW |