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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 Border(); | 42 Border(); |
43 virtual ~Border(); | 43 virtual ~Border(); |
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 that is a rounded rectangle of the specified thickness and |
| 53 // color. |
| 54 static scoped_ptr<Border> CreateRoundedRectBorder(int thickness, |
| 55 int corner_radius, |
| 56 SkColor color); |
| 57 |
52 // Creates a border for reserving space. The returned border does not | 58 // Creates a border for reserving space. The returned border does not |
53 // paint anything. | 59 // paint anything. |
54 static scoped_ptr<Border> CreateEmptyBorder(const gfx::Insets& insets); | 60 static scoped_ptr<Border> CreateEmptyBorder(const gfx::Insets& insets); |
55 static scoped_ptr<Border> CreateEmptyBorder(int top, | 61 static scoped_ptr<Border> CreateEmptyBorder(int top, |
56 int left, | 62 int left, |
57 int bottom, | 63 int bottom, |
58 int right); | 64 int right); |
59 | 65 |
60 // Creates a border of the specified color, and specified thickness on each | 66 // Creates a border of the specified color, and specified thickness on each |
61 // side. | 67 // side. |
(...skipping 23 matching lines...) Expand all Loading... |
85 // content laid out relative to these images. | 91 // content laid out relative to these images. |
86 virtual gfx::Size GetMinimumSize() const = 0; | 92 virtual gfx::Size GetMinimumSize() const = 0; |
87 | 93 |
88 private: | 94 private: |
89 DISALLOW_COPY_AND_ASSIGN(Border); | 95 DISALLOW_COPY_AND_ASSIGN(Border); |
90 }; | 96 }; |
91 | 97 |
92 } // namespace views | 98 } // namespace views |
93 | 99 |
94 #endif // UI_VIEWS_BORDER_H_ | 100 #endif // UI_VIEWS_BORDER_H_ |
OLD | NEW |