OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CanvasSurfaceLayerBridge_h | 5 #ifndef CanvasSurfaceLayerBridge_h |
6 #define CanvasSurfaceLayerBridge_h | 6 #define CanvasSurfaceLayerBridge_h |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
10 #include <memory> | 10 #include "wtf/OwnPtr.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 // TODO(611796): replace SolidColorLayer with SurfaceLayer | 13 // TODO(611796): replace SolidColorLayer with SurfaceLayer |
14 class SolidColorLayer; | 14 class SolidColorLayer; |
15 } | 15 } |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class WebLayer; | 19 class WebLayer; |
20 | 20 |
21 class PLATFORM_EXPORT CanvasSurfaceLayerBridge { | 21 class PLATFORM_EXPORT CanvasSurfaceLayerBridge { |
22 public: | 22 public: |
23 explicit CanvasSurfaceLayerBridge(); | 23 explicit CanvasSurfaceLayerBridge(); |
24 ~CanvasSurfaceLayerBridge(); | 24 ~CanvasSurfaceLayerBridge(); |
25 WebLayer* getWebLayer() const { return m_webLayer.get(); } | 25 WebLayer* getWebLayer() const { return m_webLayer.get(); } |
26 | 26 |
27 private: | 27 private: |
28 scoped_refptr<cc::SolidColorLayer> m_solidColorLayer; | 28 scoped_refptr<cc::SolidColorLayer> m_solidColorLayer; |
29 std::unique_ptr<WebLayer> m_webLayer; | 29 OwnPtr<WebLayer> m_webLayer; |
30 }; | 30 }; |
31 | 31 |
32 } | 32 } |
33 | 33 |
34 #endif // CanvasSurfaceLayerBridge | 34 #endif // CanvasSurfaceLayerBridge |
OLD | NEW |