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

Side by Side Diff: ui/base/nine_image_painter_factory.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 unified diff | Download patch
« no previous file with comments | « ui/base/models/tree_node_model_unittest.cc ('k') | ui/base/nine_image_painter_factory.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 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 #ifndef UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_ 5 #ifndef UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_
6 #define UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_ 6 #define UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "ui/base/ui_base_export.h" 10 #include "ui/base/ui_base_export.h"
10 11
11 // A macro to define arrays of IDR constants used with CreateImageGridPainter. 12 // A macro to define arrays of IDR constants used with CreateImageGridPainter.
12 #define IMAGE_GRID(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \ 13 #define IMAGE_GRID(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \
13 x ## _LEFT, x ## _CENTER, x ## _RIGHT, \ 14 x ## _LEFT, x ## _CENTER, x ## _RIGHT, \
14 x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, } 15 x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, }
15 16
16 // Defines an empty image for use in macros for creating an image grid for a 17 // Defines an empty image for use in macros for creating an image grid for a
17 // ring of eight images. 18 // ring of eight images.
18 #define EMPTY_IMAGE 0 19 #define EMPTY_IMAGE 0
(...skipping 17 matching lines...) Expand all
36 x ## _BOTTOM, EMPTY_IMAGE, EMPTY_IMAGE} 37 x ## _BOTTOM, EMPTY_IMAGE, EMPTY_IMAGE}
37 38
38 namespace gfx { 39 namespace gfx {
39 class NineImagePainter; 40 class NineImagePainter;
40 } 41 }
41 42
42 namespace ui { 43 namespace ui {
43 44
44 // Creates a NineImagePainter from an array of image ids. It's expected the 45 // Creates a NineImagePainter from an array of image ids. It's expected the
45 // array came from the IMAGE_GRID macro. 46 // array came from the IMAGE_GRID macro.
46 UI_BASE_EXPORT scoped_ptr<gfx::NineImagePainter> CreateNineImagePainter( 47 UI_BASE_EXPORT std::unique_ptr<gfx::NineImagePainter> CreateNineImagePainter(
47 const int image_ids[]); 48 const int image_ids[]);
48 49
49 } // namespace ui 50 } // namespace ui
50 51
51 #endif // UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_ 52 #endif // UI_BASE_NINE_IMAGE_PAINTER_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/base/models/tree_node_model_unittest.cc ('k') | ui/base/nine_image_painter_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698