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

Unified Diff: ui/views/border.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 months 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/animation/test/test_ink_drop_host.cc ('k') | ui/views/border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/border.h
diff --git a/ui/views/border.h b/ui/views/border.h
index e09dbeb09c8cd1f776aaedd99dd60050bce84754..1afc55c8bc5ad7a5882ac7c10f0688ce9773093a 100644
--- a/ui/views/border.h
+++ b/ui/views/border.h
@@ -5,8 +5,9 @@
#ifndef UI_VIEWS_BORDER_H_
#define UI_VIEWS_BORDER_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/views_export.h"
@@ -43,39 +44,40 @@ class VIEWS_EXPORT Border {
virtual ~Border();
// Convenience for creating a scoped_ptr with no Border.
- static scoped_ptr<Border> NullBorder();
+ static std::unique_ptr<Border> NullBorder();
// Creates a border that is a simple line of the specified thickness and
// color.
- static scoped_ptr<Border> CreateSolidBorder(int thickness, SkColor color);
+ static std::unique_ptr<Border> CreateSolidBorder(int thickness,
+ SkColor color);
// Creates a border that is a rounded rectangle of the specified thickness and
// color.
- static scoped_ptr<Border> CreateRoundedRectBorder(int thickness,
- int corner_radius,
- SkColor color);
+ static std::unique_ptr<Border> CreateRoundedRectBorder(int thickness,
+ int corner_radius,
+ SkColor color);
// Creates a border for reserving space. The returned border does not
// paint anything.
- static scoped_ptr<Border> CreateEmptyBorder(const gfx::Insets& insets);
- static scoped_ptr<Border> CreateEmptyBorder(int top,
- int left,
- int bottom,
- int right);
+ static std::unique_ptr<Border> CreateEmptyBorder(const gfx::Insets& insets);
+ static std::unique_ptr<Border> CreateEmptyBorder(int top,
+ int left,
+ int bottom,
+ int right);
// Creates a border of the specified color, and specified thickness on each
// side.
- static scoped_ptr<Border> CreateSolidSidedBorder(int top,
- int left,
- int bottom,
- int right,
- SkColor color);
+ static std::unique_ptr<Border> CreateSolidSidedBorder(int top,
+ int left,
+ int bottom,
+ int right,
+ SkColor color);
// Creates a Border from the specified Painter. The border owns the painter,
// thus the painter is deleted when the Border is deleted.
// |insets| define size of an area allocated for a Border.
- static scoped_ptr<Border> CreateBorderPainter(Painter* painter,
- const gfx::Insets& insets);
+ static std::unique_ptr<Border> CreateBorderPainter(Painter* painter,
+ const gfx::Insets& insets);
// Renders the border for the specified view.
virtual void Paint(const View& view, gfx::Canvas* canvas) = 0;
« no previous file with comments | « ui/views/animation/test/test_ink_drop_host.cc ('k') | ui/views/border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698