Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: ui/views/border.h

Issue 1428623005: views::Border: Added CreateRoundedRectBorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boxlayout-collapse_when_hidden
Patch Set: Explain why the float version is preferred. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« ui/gfx/canvas.h ('K') | « ui/gfx/canvas.cc ('k') | ui/views/border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698