Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: ash/common/wm/window_state.cc

Issue 2411913003: Converts ash/wm/mru_window_tracker_unittest.cc to use AshTest (Closed)
Patch Set: comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/BUILD.gn ('k') | ash/mus/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/common/BUILD.gn ('k') | ash/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698