| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |