| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 return GetStateType() == WINDOW_STATE_TYPE_DOCKED || | 105 return GetStateType() == WINDOW_STATE_TYPE_DOCKED || |
| 106 GetStateType() == WINDOW_STATE_TYPE_DOCKED_MINIMIZED; | 106 GetStateType() == WINDOW_STATE_TYPE_DOCKED_MINIMIZED; |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool WindowState::IsUserPositionable() const { | 109 bool WindowState::IsUserPositionable() const { |
| 110 return (window_->GetType() == ui::wm::WINDOW_TYPE_NORMAL || | 110 return (window_->GetType() == ui::wm::WINDOW_TYPE_NORMAL || |
| 111 window_->GetType() == ui::wm::WINDOW_TYPE_PANEL); | 111 window_->GetType() == ui::wm::WINDOW_TYPE_PANEL); |
| 112 } | 112 } |
| 113 | 113 |
| 114 bool WindowState::ShouldBeExcludedFromMru() const { | 114 bool WindowState::ShouldBeExcludedFromMru() const { |
| 115 return (window_->GetBoolProperty(ash::WmWindowProperty::EXCLUDE_FROM_MRU)); | 115 return window_->GetBoolProperty(ash::WmWindowProperty::EXCLUDE_FROM_MRU); |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool WindowState::CanMaximize() const { | 118 bool WindowState::CanMaximize() const { |
| 119 // Window must have the kCanMaximizeKey and have no maximum width or height. | 119 // Window must have the kCanMaximizeKey and have no maximum width or height. |
| 120 if (!window_->CanMaximize()) | 120 if (!window_->CanMaximize()) |
| 121 return false; | 121 return false; |
| 122 | 122 |
| 123 if (!window_->HasNonClientArea()) | 123 if (!window_->HasNonClientArea()) |
| 124 return true; | 124 return true; |
| 125 | 125 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 if (!window_->GetTargetVisibility()) { | 396 if (!window_->GetTargetVisibility()) { |
| 397 SetBoundsConstrained(new_bounds); | 397 SetBoundsConstrained(new_bounds); |
| 398 return; | 398 return; |
| 399 } | 399 } |
| 400 | 400 |
| 401 window_->SetBoundsDirectCrossFade(new_bounds); | 401 window_->SetBoundsDirectCrossFade(new_bounds); |
| 402 } | 402 } |
| 403 | 403 |
| 404 } // namespace wm | 404 } // namespace wm |
| 405 } // namespace ash | 405 } // namespace ash |
| OLD | NEW |