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

Unified Diff: ui/views/border.cc

Issue 2480813003: Reduce views::Border creation verbosity by promoting factory functions (Closed)
Patch Set: fix bad merge Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/border.h ('k') | ui/views/border_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/border.cc
diff --git a/ui/views/border.cc b/ui/views/border.cc
index bac093ec914e348a36dd0adc5997cefba88b76f8..6baf545b809e2361d4c07ddfb17a6c523c8bd55e 100644
--- a/ui/views/border.cc
+++ b/ui/views/border.cc
@@ -207,64 +207,53 @@ gfx::Size BorderPainter::GetMinimumSize() const {
} // namespace
-Border::Border() {
-}
+Border::Border() {}
-Border::~Border() {
-}
+Border::~Border() {}
-// static
-std::unique_ptr<Border> Border::NullBorder() {
+std::unique_ptr<Border> NullBorder() {
return nullptr;
}
-// static
-std::unique_ptr<Border> Border::CreateSolidBorder(int thickness,
- SkColor color) {
+std::unique_ptr<Border> CreateSolidBorder(int thickness, SkColor color) {
return base::MakeUnique<SolidSidedBorder>(gfx::Insets(thickness), color);
}
-// static
-std::unique_ptr<Border> Border::CreateEmptyBorder(const gfx::Insets& insets) {
+std::unique_ptr<Border> CreateEmptyBorder(const gfx::Insets& insets) {
return base::MakeUnique<EmptyBorder>(insets);
}
-// static
-std::unique_ptr<Border> Border::CreateRoundedRectBorder(int thickness,
- int corner_radius,
- SkColor color) {
+std::unique_ptr<Border> CreateRoundedRectBorder(int thickness,
+ int corner_radius,
+ SkColor color) {
return base::MakeUnique<RoundedRectBorder>(thickness, corner_radius, color);
}
-// static
-std::unique_ptr<Border> Border::CreateEmptyBorder(int top,
- int left,
- int bottom,
- int right) {
+std::unique_ptr<Border> CreateEmptyBorder(int top,
+ int left,
+ int bottom,
+ int right) {
return CreateEmptyBorder(gfx::Insets(top, left, bottom, right));
}
-// static
-std::unique_ptr<Border> Border::CreateSolidSidedBorder(int top,
- int left,
- int bottom,
- int right,
- SkColor color) {
+std::unique_ptr<Border> CreateSolidSidedBorder(int top,
+ int left,
+ int bottom,
+ int right,
+ SkColor color) {
return base::MakeUnique<SolidSidedBorder>(
gfx::Insets(top, left, bottom, right), color);
}
// static
-std::unique_ptr<Border> Border::CreatePaddedBorder(
- std::unique_ptr<Border> border,
- const gfx::Insets& insets) {
+std::unique_ptr<Border> CreatePaddedBorder(std::unique_ptr<Border> border,
+ const gfx::Insets& insets) {
return base::MakeUnique<ExtraInsetsBorder>(std::move(border), insets);
}
// static
-std::unique_ptr<Border> Border::CreateBorderPainter(
- std::unique_ptr<Painter> painter,
- const gfx::Insets& insets) {
+std::unique_ptr<Border> CreateBorderPainter(std::unique_ptr<Painter> painter,
+ const gfx::Insets& insets) {
return base::WrapUnique(new BorderPainter(std::move(painter), insets));
}
« no previous file with comments | « ui/views/border.h ('k') | ui/views/border_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698