OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "apps/size_constraints.h" | 5 #include "apps/size_constraints.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ui/gfx/insets.h" | 9 #include "ui/gfx/geometry/insets.h" |
10 | 10 |
11 namespace apps { | 11 namespace apps { |
12 | 12 |
13 SizeConstraints::SizeConstraints() | 13 SizeConstraints::SizeConstraints() |
14 : maximum_size_(kUnboundedSize, kUnboundedSize) {} | 14 : maximum_size_(kUnboundedSize, kUnboundedSize) {} |
15 | 15 |
16 SizeConstraints::SizeConstraints(const gfx::Size& min_size, | 16 SizeConstraints::SizeConstraints(const gfx::Size& min_size, |
17 const gfx::Size& max_size) | 17 const gfx::Size& max_size) |
18 : minimum_size_(min_size), maximum_size_(max_size) {} | 18 : minimum_size_(min_size), maximum_size_(max_size) {} |
19 | 19 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 void SizeConstraints::set_minimum_size(const gfx::Size& min_size) { | 75 void SizeConstraints::set_minimum_size(const gfx::Size& min_size) { |
76 minimum_size_ = min_size; | 76 minimum_size_ = min_size; |
77 } | 77 } |
78 | 78 |
79 void SizeConstraints::set_maximum_size(const gfx::Size& max_size) { | 79 void SizeConstraints::set_maximum_size(const gfx::Size& max_size) { |
80 maximum_size_ = max_size; | 80 maximum_size_ = max_size; |
81 } | 81 } |
82 | 82 |
83 } // namespace apps | 83 } // namespace apps |
OLD | NEW |