OLD | NEW |
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_HEADS_UP_DISPLAY_LAYER_H_ | 5 #ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ |
6 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ | 6 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
13 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
14 #include "third_party/skia/include/core/SkTypeface.h" | 14 #include "third_party/skia/include/core/SkTypeface.h" |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 |
18 namespace proto { | 18 namespace proto { |
19 class LayerNode; | 19 class LayerNode; |
20 } // namespace proto | 20 } // namespace proto |
21 | 21 |
22 class CC_EXPORT HeadsUpDisplayLayer : public Layer { | 22 class CC_EXPORT HeadsUpDisplayLayer : public Layer { |
23 public: | 23 public: |
24 static scoped_refptr<HeadsUpDisplayLayer> Create(); | 24 static scoped_refptr<HeadsUpDisplayLayer> Create(); |
25 | 25 |
26 void PrepareForCalculateDrawProperties( | 26 void PrepareForCalculateDrawProperties( |
27 const gfx::Size& device_viewport, float device_scale_factor); | 27 const gfx::Size& device_viewport, float device_scale_factor); |
28 | 28 |
29 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 29 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
30 | 30 |
31 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 31 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; |
32 | 32 |
33 // Layer overrides. | 33 // Layer overrides. |
34 void PushPropertiesTo(LayerImpl* layer) override; | 34 void PushPropertiesTo(LayerImpl* layer) override; |
35 | 35 |
36 protected: | 36 protected: |
37 HeadsUpDisplayLayer(); | 37 HeadsUpDisplayLayer(); |
38 bool HasDrawableContent() const override; | 38 bool HasDrawableContent() const override; |
39 | 39 |
40 private: | 40 private: |
41 ~HeadsUpDisplayLayer() override; | 41 ~HeadsUpDisplayLayer() override; |
42 | 42 |
43 skia::RefPtr<SkTypeface> typeface_; | 43 skia::RefPtr<SkTypeface> typeface_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayer); | 45 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayer); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace cc | 48 } // namespace cc |
49 | 49 |
50 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ | 50 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ |
OLD | NEW |