| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/common/wm/window_state.h" | 5 #include "ash/common/wm/window_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/wm/default_state.h" | 9 #include "ash/common/wm/default_state.h" |
| 10 #include "ash/common/wm/window_positioning_utils.h" | 10 #include "ash/common/wm/window_positioning_utils.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 bool WindowState::IsMaximized() const { | 68 bool WindowState::IsMaximized() const { |
| 69 return GetStateType() == WINDOW_STATE_TYPE_MAXIMIZED; | 69 return GetStateType() == WINDOW_STATE_TYPE_MAXIMIZED; |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool WindowState::IsFullscreen() const { | 72 bool WindowState::IsFullscreen() const { |
| 73 return GetStateType() == WINDOW_STATE_TYPE_FULLSCREEN; | 73 return GetStateType() == WINDOW_STATE_TYPE_FULLSCREEN; |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool WindowState::IsMaximizedOrFullscreenOrPinned() const { | 76 bool WindowState::IsMaximizedOrFullscreenOrPinned() const { |
| 77 return GetStateType() == WINDOW_STATE_TYPE_MAXIMIZED || | 77 return GetStateType() == WINDOW_STATE_TYPE_MAXIMIZED || |
| 78 GetStateType() == WINDOW_STATE_TYPE_FULLSCREEN || | 78 GetStateType() == WINDOW_STATE_TYPE_FULLSCREEN || IsPinned(); |
| 79 GetStateType() == WINDOW_STATE_TYPE_PINNED; | |
| 80 } | 79 } |
| 81 | 80 |
| 82 bool WindowState::IsSnapped() const { | 81 bool WindowState::IsSnapped() const { |
| 83 return GetStateType() == WINDOW_STATE_TYPE_LEFT_SNAPPED || | 82 return GetStateType() == WINDOW_STATE_TYPE_LEFT_SNAPPED || |
| 84 GetStateType() == WINDOW_STATE_TYPE_RIGHT_SNAPPED; | 83 GetStateType() == WINDOW_STATE_TYPE_RIGHT_SNAPPED; |
| 85 } | 84 } |
| 86 | 85 |
| 87 bool WindowState::IsPinned() const { | 86 bool WindowState::IsPinned() const { |
| 88 return GetStateType() == WINDOW_STATE_TYPE_PINNED; | 87 return GetStateType() == WINDOW_STATE_TYPE_PINNED || |
| 88 GetStateType() == WINDOW_STATE_TYPE_TRUSTED_PINNED; |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool WindowState::IsNormalStateType() const { | 91 bool WindowState::IsNormalStateType() const { |
| 92 return GetStateType() == WINDOW_STATE_TYPE_NORMAL || | 92 return GetStateType() == WINDOW_STATE_TYPE_NORMAL || |
| 93 GetStateType() == WINDOW_STATE_TYPE_DEFAULT; | 93 GetStateType() == WINDOW_STATE_TYPE_DEFAULT; |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool WindowState::IsNormalOrSnapped() const { | 96 bool WindowState::IsNormalOrSnapped() const { |
| 97 return IsNormalStateType() || IsSnapped(); | 97 return IsNormalStateType() || IsSnapped(); |
| 98 } | 98 } |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 if (!window_->GetTargetVisibility()) { | 395 if (!window_->GetTargetVisibility()) { |
| 396 SetBoundsConstrained(new_bounds); | 396 SetBoundsConstrained(new_bounds); |
| 397 return; | 397 return; |
| 398 } | 398 } |
| 399 | 399 |
| 400 window_->SetBoundsDirectCrossFade(new_bounds); | 400 window_->SetBoundsDirectCrossFade(new_bounds); |
| 401 } | 401 } |
| 402 | 402 |
| 403 } // namespace wm | 403 } // namespace wm |
| 404 } // namespace ash | 404 } // namespace ash |
| OLD | NEW |