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

Side by Side Diff: cc/layers/nine_patch_layer.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 | « cc/layers/layer_utils_unittest.cc ('k') | cc/layers/nine_patch_layer.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CC_LAYERS_NINE_PATCH_LAYER_H_ 5 #ifndef CC_LAYERS_NINE_PATCH_LAYER_H_
6 #define CC_LAYERS_NINE_PATCH_LAYER_H_ 6 #define CC_LAYERS_NINE_PATCH_LAYER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
11 #include "cc/layers/layer.h" 12 #include "cc/layers/layer.h"
12 #include "cc/layers/ui_resource_layer.h" 13 #include "cc/layers/ui_resource_layer.h"
13 #include "cc/resources/ui_resource_client.h" 14 #include "cc/resources/ui_resource_client.h"
14 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
15 16
16 namespace cc { 17 namespace cc {
17 18
18 class LayerTreeHost; 19 class LayerTreeHost;
19 class ScopedUIResource; 20 class ScopedUIResource;
(...skipping 17 matching lines...) Expand all
37 // on the edges of the layer. The corners are unscaled, the top and bottom 38 // on the edges of the layer. The corners are unscaled, the top and bottom
38 // rects are x-stretched to fit, and the left and right rects are 39 // rects are x-stretched to fit, and the left and right rects are
39 // y-stretched to fit. 40 // y-stretched to fit.
40 void SetAperture(const gfx::Rect& aperture); 41 void SetAperture(const gfx::Rect& aperture);
41 void SetFillCenter(bool fill_center); 42 void SetFillCenter(bool fill_center);
42 void SetNearestNeighbor(bool nearest_neighbor); 43 void SetNearestNeighbor(bool nearest_neighbor);
43 44
44 private: 45 private:
45 NinePatchLayer(); 46 NinePatchLayer();
46 ~NinePatchLayer() override; 47 ~NinePatchLayer() override;
47 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 48 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
48 49
49 gfx::Rect border_; 50 gfx::Rect border_;
50 bool fill_center_; 51 bool fill_center_;
51 bool nearest_neighbor_; 52 bool nearest_neighbor_;
52 53
53 // The transparent center region that shows the parent layer's contents in 54 // The transparent center region that shows the parent layer's contents in
54 // image space. 55 // image space.
55 gfx::Rect image_aperture_; 56 gfx::Rect image_aperture_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(NinePatchLayer); 58 DISALLOW_COPY_AND_ASSIGN(NinePatchLayer);
58 }; 59 };
59 60
60 } // namespace cc 61 } // namespace cc
61 62
62 #endif // CC_LAYERS_NINE_PATCH_LAYER_H_ 63 #endif // CC_LAYERS_NINE_PATCH_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_utils_unittest.cc ('k') | cc/layers/nine_patch_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698