| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/common/frame/custom_frame_view_ash.h" | 9 #include "ash/common/frame/custom_frame_view_ash.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
| (...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1438 widget_->GetWindowBoundsInScreen().origin()); | 1438 widget_->GetWindowBoundsInScreen().origin()); |
| 1439 } | 1439 } |
| 1440 break; | 1440 break; |
| 1441 } | 1441 } |
| 1442 | 1442 |
| 1443 // Set |ignore_window_bounds_changes_| as this change to window bounds | 1443 // Set |ignore_window_bounds_changes_| as this change to window bounds |
| 1444 // should not result in a configure request. | 1444 // should not result in a configure request. |
| 1445 DCHECK(!ignore_window_bounds_changes_); | 1445 DCHECK(!ignore_window_bounds_changes_); |
| 1446 ignore_window_bounds_changes_ = true; | 1446 ignore_window_bounds_changes_ = true; |
| 1447 if (widget_->GetWindowBoundsInScreen() != new_widget_bounds) | 1447 if (widget_->GetWindowBoundsInScreen() != new_widget_bounds) |
| 1448 widget_->SetBounds(new_widget_bounds); | 1448 widget_->GetNativeWindow()->SetBounds(new_widget_bounds); |
| 1449 ignore_window_bounds_changes_ = false; | 1449 ignore_window_bounds_changes_ = false; |
| 1450 } | 1450 } |
| 1451 | 1451 |
| 1452 void ShellSurface::UpdateSurfaceBounds() { | 1452 void ShellSurface::UpdateSurfaceBounds() { |
| 1453 gfx::Rect client_view_bounds = | 1453 gfx::Rect client_view_bounds = |
| 1454 widget_->non_client_view()->frame_view()->GetBoundsForClientView(); | 1454 widget_->non_client_view()->frame_view()->GetBoundsForClientView(); |
| 1455 | 1455 |
| 1456 surface_->window()->SetBounds( | 1456 surface_->window()->SetBounds( |
| 1457 gfx::Rect(GetSurfaceOrigin() + client_view_bounds.OffsetFromOrigin(), | 1457 gfx::Rect(GetSurfaceOrigin() + client_view_bounds.OffsetFromOrigin(), |
| 1458 surface_->window()->layer()->size())); | 1458 surface_->window()->layer()->size())); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 // small style shadow for them. | 1616 // small style shadow for them. |
| 1617 if (!activatable_) | 1617 if (!activatable_) |
| 1618 shadow->SetElevation(wm::ShadowElevation::SMALL); | 1618 shadow->SetElevation(wm::ShadowElevation::SMALL); |
| 1619 // We don't have rounded corners unless frame is enabled. | 1619 // We don't have rounded corners unless frame is enabled. |
| 1620 if (!frame_enabled_) | 1620 if (!frame_enabled_) |
| 1621 shadow->SetRoundedCornerRadius(0); | 1621 shadow->SetRoundedCornerRadius(0); |
| 1622 } | 1622 } |
| 1623 } | 1623 } |
| 1624 | 1624 |
| 1625 } // namespace exo | 1625 } // namespace exo |
| OLD | NEW |