OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/base/nine_image_painter_factory.h" | 5 #include "ui/base/nine_image_painter_factory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 if (image_ids[i] != 0) | 22 if (image_ids[i] != 0) |
23 images[i] = *rb.GetImageSkiaNamed(image_ids[i]); | 23 images[i] = *rb.GetImageSkiaNamed(image_ids[i]); |
24 } | 24 } |
25 return images; | 25 return images; |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 std::unique_ptr<gfx::NineImagePainter> CreateNineImagePainter( | 30 std::unique_ptr<gfx::NineImagePainter> CreateNineImagePainter( |
31 const int image_ids[]) { | 31 const int image_ids[]) { |
32 return base::WrapUnique( | 32 return base::MakeUnique<gfx::NineImagePainter>(ImageIdsToImages(image_ids)); |
33 new gfx::NineImagePainter(ImageIdsToImages(image_ids))); | |
34 } | 33 } |
35 | 34 |
36 } // namespace ui | 35 } // namespace ui |
OLD | NEW |