OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "ash/common/system/tray/size_range_layout.h" | 7 #include "ash/system/tray/size_range_layout.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/views/layout/fill_layout.h" | 10 #include "ui/views/layout/fill_layout.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 // static | 14 // static |
15 | 15 |
16 const int SizeRangeLayout::kAbsoluteMinSize = 0; | 16 const int SizeRangeLayout::kAbsoluteMinSize = 0; |
17 const int SizeRangeLayout::kAbsoluteMaxSize = std::numeric_limits<int>::max(); | 17 const int SizeRangeLayout::kAbsoluteMaxSize = std::numeric_limits<int>::max(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void SizeRangeLayout::ViewRemoved(views::View* host, views::View* view) { | 88 void SizeRangeLayout::ViewRemoved(views::View* host, views::View* view) { |
89 layout_manager_->ViewRemoved(host, view); | 89 layout_manager_->ViewRemoved(host, view); |
90 } | 90 } |
91 | 91 |
92 void SizeRangeLayout::ClampSizeToRange(gfx::Size* size) const { | 92 void SizeRangeLayout::ClampSizeToRange(gfx::Size* size) const { |
93 size->SetToMax(min_size_); | 93 size->SetToMax(min_size_); |
94 size->SetToMin(max_size_); | 94 size->SetToMin(max_size_); |
95 } | 95 } |
96 | 96 |
97 } // namespace ash | 97 } // namespace ash |
OLD | NEW |