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

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

Issue 809903005: ui/views: Cleanup usage of scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no need of Pass() Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/views/border.h" 5 #include "ui/views/border.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/painter.h" 10 #include "ui/views/painter.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } // namespace 121 } // namespace
122 122
123 Border::Border() { 123 Border::Border() {
124 } 124 }
125 125
126 Border::~Border() { 126 Border::~Border() {
127 } 127 }
128 128
129 // static 129 // static
130 scoped_ptr<Border> Border::NullBorder() { 130 scoped_ptr<Border> Border::NullBorder() {
131 return scoped_ptr<Border>(); 131 return nullptr;
132 } 132 }
133 133
134 // static 134 // static
135 scoped_ptr<Border> Border::CreateSolidBorder(int thickness, SkColor color) { 135 scoped_ptr<Border> Border::CreateSolidBorder(int thickness, SkColor color) {
136 return scoped_ptr<Border>(new SolidBorder(thickness, color)); 136 return make_scoped_ptr(new SolidBorder(thickness, color));
137 } 137 }
138 138
139 // static 139 // static
140 scoped_ptr<Border> Border::CreateEmptyBorder(int top, 140 scoped_ptr<Border> Border::CreateEmptyBorder(int top,
141 int left, 141 int left,
142 int bottom, 142 int bottom,
143 int right) { 143 int right) {
144 return scoped_ptr<Border>(new EmptyBorder(top, left, bottom, right)); 144 return make_scoped_ptr(new EmptyBorder(top, left, bottom, right));
145 } 145 }
146 146
147 // static 147 // static
148 scoped_ptr<Border> Border::CreateSolidSidedBorder(int top, 148 scoped_ptr<Border> Border::CreateSolidSidedBorder(int top,
149 int left, 149 int left,
150 int bottom, 150 int bottom,
151 int right, 151 int right,
152 SkColor color) { 152 SkColor color) {
153 return scoped_ptr<Border>( 153 return make_scoped_ptr(new SidedSolidBorder(top, left, bottom, right, color));
154 new SidedSolidBorder(top, left, bottom, right, color));
155 } 154 }
156 155
157 // static 156 // static
158 scoped_ptr<Border> Border::CreateBorderPainter(Painter* painter, 157 scoped_ptr<Border> Border::CreateBorderPainter(Painter* painter,
159 const gfx::Insets& insets) { 158 const gfx::Insets& insets) {
160 return scoped_ptr<Border>(new BorderPainter(painter, insets)); 159 return make_scoped_ptr(new BorderPainter(painter, insets));
161 } 160 }
162 161
163 } // namespace views 162 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698