| 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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 return gfx::Size(1, 1); | 917 return gfx::Size(1, 1); |
| 918 } | 918 } |
| 919 | 919 |
| 920 //////////////////////////////////////////////////////////////////////////////// | 920 //////////////////////////////////////////////////////////////////////////////// |
| 921 // ash::wm::WindowStateObserver overrides: | 921 // ash::wm::WindowStateObserver overrides: |
| 922 | 922 |
| 923 void ShellSurface::OnPreWindowStateTypeChange( | 923 void ShellSurface::OnPreWindowStateTypeChange( |
| 924 ash::wm::WindowState* window_state, | 924 ash::wm::WindowState* window_state, |
| 925 ash::wm::WindowStateType old_type) { | 925 ash::wm::WindowStateType old_type) { |
| 926 ash::wm::WindowStateType new_type = window_state->GetStateType(); | 926 ash::wm::WindowStateType new_type = window_state->GetStateType(); |
| 927 if (old_type == ash::wm::WINDOW_STATE_TYPE_MINIMIZED || |
| 928 new_type == ash::wm::WINDOW_STATE_TYPE_MINIMIZED) { |
| 929 return; |
| 930 } |
| 931 |
| 927 if (ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(old_type) || | 932 if (ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(old_type) || |
| 928 ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(new_type)) { | 933 ash::wm::IsMaximizedOrFullscreenOrPinnedWindowStateType(new_type)) { |
| 929 // When transitioning in/out of maximized or fullscreen mode we need to | 934 // When transitioning in/out of maximized or fullscreen mode we need to |
| 930 // make sure we have a configure callback before we allow the default | 935 // make sure we have a configure callback before we allow the default |
| 931 // cross-fade animations. The configure callback provides a mechanism for | 936 // cross-fade animations. The configure callback provides a mechanism for |
| 932 // the client to inform us that a frame has taken the state change into | 937 // the client to inform us that a frame has taken the state change into |
| 933 // account and without this cross-fade animations are unreliable. | 938 // account and without this cross-fade animations are unreliable. |
| 934 | 939 |
| 935 // TODO(domlaskowski): For shell surfaces whose bounds are controlled by the | 940 // TODO(domlaskowski): For shell surfaces whose bounds are controlled by the |
| 936 // client, the configure callback does not yet support window state changes. | 941 // client, the configure callback does not yet support window state changes. |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 // small style shadow for them. | 1621 // small style shadow for them. |
| 1617 if (!activatable_) | 1622 if (!activatable_) |
| 1618 shadow->SetElevation(wm::ShadowElevation::SMALL); | 1623 shadow->SetElevation(wm::ShadowElevation::SMALL); |
| 1619 // We don't have rounded corners unless frame is enabled. | 1624 // We don't have rounded corners unless frame is enabled. |
| 1620 if (!frame_enabled_) | 1625 if (!frame_enabled_) |
| 1621 shadow->SetRoundedCornerRadius(0); | 1626 shadow->SetRoundedCornerRadius(0); |
| 1622 } | 1627 } |
| 1623 } | 1628 } |
| 1624 | 1629 |
| 1625 } // namespace exo | 1630 } // namespace exo |
| OLD | NEW |