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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 bool WindowState::IsSnapped() const { | 80 bool WindowState::IsSnapped() const { |
81 return GetStateType() == WINDOW_STATE_TYPE_LEFT_SNAPPED || | 81 return GetStateType() == WINDOW_STATE_TYPE_LEFT_SNAPPED || |
82 GetStateType() == WINDOW_STATE_TYPE_RIGHT_SNAPPED; | 82 GetStateType() == WINDOW_STATE_TYPE_RIGHT_SNAPPED; |
83 } | 83 } |
84 | 84 |
85 bool WindowState::IsPinned() const { | 85 bool WindowState::IsPinned() const { |
86 return GetStateType() == WINDOW_STATE_TYPE_PINNED || | 86 return GetStateType() == WINDOW_STATE_TYPE_PINNED || |
87 GetStateType() == WINDOW_STATE_TYPE_TRUSTED_PINNED; | 87 GetStateType() == WINDOW_STATE_TYPE_TRUSTED_PINNED; |
88 } | 88 } |
89 | 89 |
| 90 bool WindowState::IsTrustedPinned() const { |
| 91 return GetStateType() == WINDOW_STATE_TYPE_TRUSTED_PINNED; |
| 92 } |
| 93 |
90 bool WindowState::IsNormalStateType() const { | 94 bool WindowState::IsNormalStateType() const { |
91 return GetStateType() == WINDOW_STATE_TYPE_NORMAL || | 95 return GetStateType() == WINDOW_STATE_TYPE_NORMAL || |
92 GetStateType() == WINDOW_STATE_TYPE_DEFAULT; | 96 GetStateType() == WINDOW_STATE_TYPE_DEFAULT; |
93 } | 97 } |
94 | 98 |
95 bool WindowState::IsNormalOrSnapped() const { | 99 bool WindowState::IsNormalOrSnapped() const { |
96 return IsNormalStateType() || IsSnapped(); | 100 return IsNormalStateType() || IsSnapped(); |
97 } | 101 } |
98 | 102 |
99 bool WindowState::IsActive() const { | 103 bool WindowState::IsActive() const { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 if (!window_->GetTargetVisibility()) { | 390 if (!window_->GetTargetVisibility()) { |
387 SetBoundsConstrained(new_bounds); | 391 SetBoundsConstrained(new_bounds); |
388 return; | 392 return; |
389 } | 393 } |
390 | 394 |
391 window_->SetBoundsDirectCrossFade(new_bounds); | 395 window_->SetBoundsDirectCrossFade(new_bounds); |
392 } | 396 } |
393 | 397 |
394 } // namespace wm | 398 } // namespace wm |
395 } // namespace ash | 399 } // namespace ash |
OLD | NEW |