OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_BORDER_H_ | 5 #ifndef UI_VIEWS_BORDER_H_ |
6 #define UI_VIEWS_BORDER_H_ | 6 #define UI_VIEWS_BORDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // Convenience for creating a scoped_ptr with no Border. | 45 // Convenience for creating a scoped_ptr with no Border. |
46 static scoped_ptr<Border> NullBorder(); | 46 static scoped_ptr<Border> NullBorder(); |
47 | 47 |
48 // Creates a border that is a simple line of the specified thickness and | 48 // Creates a border that is a simple line of the specified thickness and |
49 // color. | 49 // color. |
50 static scoped_ptr<Border> CreateSolidBorder(int thickness, SkColor color); | 50 static scoped_ptr<Border> CreateSolidBorder(int thickness, SkColor color); |
51 | 51 |
52 // Creates a border for reserving space. The returned border does not | 52 // Creates a border for reserving space. The returned border does not |
53 // paint anything. | 53 // paint anything. |
| 54 static scoped_ptr<Border> CreateEmptyBorder(const gfx::Insets& insets); |
54 static scoped_ptr<Border> CreateEmptyBorder(int top, | 55 static scoped_ptr<Border> CreateEmptyBorder(int top, |
55 int left, | 56 int left, |
56 int bottom, | 57 int bottom, |
57 int right); | 58 int right); |
58 | 59 |
59 // Creates a border of the specified color, and specified thickness on each | 60 // Creates a border of the specified color, and specified thickness on each |
60 // side. | 61 // side. |
61 static scoped_ptr<Border> CreateSolidSidedBorder(int top, | 62 static scoped_ptr<Border> CreateSolidSidedBorder(int top, |
62 int left, | 63 int left, |
63 int bottom, | 64 int bottom, |
(...skipping 20 matching lines...) Expand all Loading... |
84 // content laid out relative to these images. | 85 // content laid out relative to these images. |
85 virtual gfx::Size GetMinimumSize() const = 0; | 86 virtual gfx::Size GetMinimumSize() const = 0; |
86 | 87 |
87 private: | 88 private: |
88 DISALLOW_COPY_AND_ASSIGN(Border); | 89 DISALLOW_COPY_AND_ASSIGN(Border); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace views | 92 } // namespace views |
92 | 93 |
93 #endif // UI_VIEWS_BORDER_H_ | 94 #endif // UI_VIEWS_BORDER_H_ |
OLD | NEW |