OLD | NEW |
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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 std::unique_ptr<Border> CreateSolidSidedBorder(int top, | 239 std::unique_ptr<Border> CreateSolidSidedBorder(int top, |
240 int left, | 240 int left, |
241 int bottom, | 241 int bottom, |
242 int right, | 242 int right, |
243 SkColor color) { | 243 SkColor color) { |
244 return base::MakeUnique<SolidSidedBorder>( | 244 return base::MakeUnique<SolidSidedBorder>( |
245 gfx::Insets(top, left, bottom, right), color); | 245 gfx::Insets(top, left, bottom, right), color); |
246 } | 246 } |
247 | 247 |
248 // static | |
249 std::unique_ptr<Border> CreatePaddedBorder(std::unique_ptr<Border> border, | 248 std::unique_ptr<Border> CreatePaddedBorder(std::unique_ptr<Border> border, |
250 const gfx::Insets& insets) { | 249 const gfx::Insets& insets) { |
251 return base::MakeUnique<ExtraInsetsBorder>(std::move(border), insets); | 250 return base::MakeUnique<ExtraInsetsBorder>(std::move(border), insets); |
252 } | 251 } |
253 | 252 |
254 // static | |
255 std::unique_ptr<Border> CreateBorderPainter(std::unique_ptr<Painter> painter, | 253 std::unique_ptr<Border> CreateBorderPainter(std::unique_ptr<Painter> painter, |
256 const gfx::Insets& insets) { | 254 const gfx::Insets& insets) { |
257 return base::WrapUnique(new BorderPainter(std::move(painter), insets)); | 255 return base::WrapUnique(new BorderPainter(std::move(painter), insets)); |
258 } | 256 } |
259 | 257 |
260 } // namespace views | 258 } // namespace views |
OLD | NEW |