| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 DISALLOW_COPY_AND_ASSIGN(Border); | 61 DISALLOW_COPY_AND_ASSIGN(Border); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // Convenience for creating a scoped_ptr with no Border. | 64 // Convenience for creating a scoped_ptr with no Border. |
| 65 VIEWS_EXPORT std::unique_ptr<Border> NullBorder(); | 65 VIEWS_EXPORT std::unique_ptr<Border> NullBorder(); |
| 66 | 66 |
| 67 // Creates a border that is a simple line of the specified thickness and color. | 67 // Creates a border that is a simple line of the specified thickness and color. |
| 68 VIEWS_EXPORT std::unique_ptr<Border> CreateSolidBorder(int thickness, | 68 VIEWS_EXPORT std::unique_ptr<Border> CreateSolidBorder(int thickness, |
| 69 SkColor color); | 69 SkColor color); |
| 70 | 70 |
| 71 // Creates a border that is a simple line of the specified thickness and color, |
| 72 // using rounding that works well for views that are painted directly to a |
| 73 // a widget. |
| 74 VIEWS_EXPORT std::unique_ptr<Border> CreateSolidWidgetBorder(int thickness, |
| 75 SkColor color); |
| 76 |
| 71 // Creates a border that is a rounded rectangle of the specified thickness and | 77 // Creates a border that is a rounded rectangle of the specified thickness and |
| 72 // color. | 78 // color. |
| 73 VIEWS_EXPORT std::unique_ptr<Border> CreateRoundedRectBorder(int thickness, | 79 VIEWS_EXPORT std::unique_ptr<Border> CreateRoundedRectBorder(int thickness, |
| 74 int corner_radius, | 80 int corner_radius, |
| 75 SkColor color); | 81 SkColor color); |
| 76 | 82 |
| 77 // Creates a border for reserving space. The returned border does not paint | 83 // Creates a border for reserving space. The returned border does not paint |
| 78 // anything. | 84 // anything. |
| 79 VIEWS_EXPORT std::unique_ptr<Border> CreateEmptyBorder( | 85 VIEWS_EXPORT std::unique_ptr<Border> CreateEmptyBorder( |
| 80 const gfx::Insets& insets); | 86 const gfx::Insets& insets); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 106 | 112 |
| 107 // Creates a Border from the specified Painter. |insets| define size of an area | 113 // Creates a Border from the specified Painter. |insets| define size of an area |
| 108 // allocated for a Border. | 114 // allocated for a Border. |
| 109 VIEWS_EXPORT std::unique_ptr<Border> CreateBorderPainter( | 115 VIEWS_EXPORT std::unique_ptr<Border> CreateBorderPainter( |
| 110 std::unique_ptr<Painter> painter, | 116 std::unique_ptr<Painter> painter, |
| 111 const gfx::Insets& insets); | 117 const gfx::Insets& insets); |
| 112 | 118 |
| 113 } // namespace views | 119 } // namespace views |
| 114 | 120 |
| 115 #endif // UI_VIEWS_BORDER_H_ | 121 #endif // UI_VIEWS_BORDER_H_ |
| OLD | NEW |