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

Unified Diff: ui/views/style/platform_style.cc

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/style/platform_style.h ('k') | ui/views/style/platform_style_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/platform_style.cc
diff --git a/ui/views/style/platform_style.cc b/ui/views/style/platform_style.cc
index 84847674108255f47ad9738ef62e6cbff90f5725..9027c6632dd0f0365d3ca45922c63e357c996c3c 100644
--- a/ui/views/style/platform_style.cc
+++ b/ui/views/style/platform_style.cc
@@ -4,6 +4,7 @@
#include "ui/views/style/platform_style.h"
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
@@ -45,32 +46,32 @@ gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled,
}
// static
-scoped_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() {
- return make_scoped_ptr(new FocusableBorder());
+std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() {
+ return base::WrapUnique(new FocusableBorder());
}
// static
-scoped_ptr<Background> PlatformStyle::CreateComboboxBackground() {
+std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground() {
return nullptr;
}
// static
-scoped_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
+std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
Button::ButtonStyle style) {
if (!ui::MaterialDesignController::IsModeMaterial() ||
style != Button::STYLE_TEXTBUTTON) {
- return make_scoped_ptr(new LabelButtonAssetBorder(style));
+ return base::WrapUnique(new LabelButtonAssetBorder(style));
}
- scoped_ptr<LabelButtonBorder> border(new views::LabelButtonBorder());
+ std::unique_ptr<LabelButtonBorder> border(new views::LabelButtonBorder());
border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle(
Button::STYLE_TEXTBUTTON));
return border;
}
// static
-scoped_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
- return make_scoped_ptr(new NativeScrollBar(is_horizontal));
+std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
+ return base::WrapUnique(new NativeScrollBar(is_horizontal));
}
// static
@@ -103,7 +104,7 @@ void PlatformStyle::ApplyLabelButtonTextStyle(
#if !defined(DESKTOP_LINUX)
// static
-scoped_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
+std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
LabelButton* button) {
return button->CreateDefaultBorder();
}
« no previous file with comments | « ui/views/style/platform_style.h ('k') | ui/views/style/platform_style_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698