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

Side by Side Diff: cc/layers/ui_resource_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/texture_layer_unittest.cc ('k') | cc/layers/ui_resource_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_RESOURCE_LAYER_H_ 5 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_H_
6 #define CC_LAYERS_UI_RESOURCE_LAYER_H_ 6 #define CC_LAYERS_UI_RESOURCE_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/resources/ui_resource_client.h" 13 #include "cc/resources/ui_resource_client.h"
13 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class LayerTreeHost; 18 class LayerTreeHost;
18 class ScopedUIResource; 19 class ScopedUIResource;
19 20
(...skipping 27 matching lines...) Expand all
47 virtual UIResourceId id() = 0; 48 virtual UIResourceId id() = 0;
48 virtual ~UIResourceHolder(); 49 virtual ~UIResourceHolder();
49 }; 50 };
50 51
51 protected: 52 protected:
52 UIResourceLayer(); 53 UIResourceLayer();
53 ~UIResourceLayer() override; 54 ~UIResourceLayer() override;
54 55
55 bool HasDrawableContent() const override; 56 bool HasDrawableContent() const override;
56 57
57 scoped_ptr<UIResourceHolder> ui_resource_holder_; 58 std::unique_ptr<UIResourceHolder> ui_resource_holder_;
58 SkBitmap bitmap_; 59 SkBitmap bitmap_;
59 60
60 gfx::PointF uv_top_left_; 61 gfx::PointF uv_top_left_;
61 gfx::PointF uv_bottom_right_; 62 gfx::PointF uv_bottom_right_;
62 float vertex_opacity_[4]; 63 float vertex_opacity_[4];
63 64
64 private: 65 private:
65 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 66 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
66 void RecreateUIResourceHolder(); 67 void RecreateUIResourceHolder();
67 68
68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayer); 69 DISALLOW_COPY_AND_ASSIGN(UIResourceLayer);
69 }; 70 };
70 71
71 } // namespace cc 72 } // namespace cc
72 73
73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_H_ 74 #endif // CC_LAYERS_UI_RESOURCE_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | cc/layers/ui_resource_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698