OLD | NEW |
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 CC_BLINK_WEB_LAYER_IMPL_H_ | 5 #ifndef CC_BLINK_WEB_LAYER_IMPL_H_ |
6 #define CC_BLINK_WEB_LAYER_IMPL_H_ | 6 #define CC_BLINK_WEB_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "cc/blink/cc_blink_export.h" | 13 #include "cc/blink/cc_blink_export.h" |
14 #include "cc/layers/layer_client.h" | 14 #include "cc/layers/layer_client.h" |
15 #include "third_party/WebKit/public/platform/WebCString.h" | 15 #include "third_party/WebKit/public/platform/WebCString.h" |
16 #include "third_party/WebKit/public/platform/WebColor.h" | 16 #include "third_party/WebKit/public/platform/WebColor.h" |
17 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" | 17 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" |
18 #include "third_party/WebKit/public/platform/WebDoublePoint.h" | 18 #include "third_party/WebKit/public/platform/WebDoublePoint.h" |
19 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 19 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
20 #include "third_party/WebKit/public/platform/WebLayer.h" | 20 #include "third_party/WebKit/public/platform/WebLayer.h" |
21 #include "third_party/WebKit/public/platform/WebPoint.h" | 21 #include "third_party/WebKit/public/platform/WebPoint.h" |
22 #include "third_party/WebKit/public/platform/WebRect.h" | 22 #include "third_party/WebKit/public/platform/WebRect.h" |
23 #include "third_party/WebKit/public/platform/WebSize.h" | 23 #include "third_party/WebKit/public/platform/WebSize.h" |
24 #include "third_party/WebKit/public/platform/WebString.h" | 24 #include "third_party/WebKit/public/platform/WebString.h" |
25 #include "third_party/WebKit/public/platform/WebVector.h" | 25 #include "third_party/WebKit/public/platform/WebVector.h" |
26 #include "third_party/skia/include/utils/SkMatrix44.h" | 26 #include "third_party/skia/include/utils/SkMatrix44.h" |
27 | 27 |
28 namespace blink { | 28 namespace blink { |
29 class WebFilterOperations; | 29 class WebFilterOperations; |
30 class WebLayerClient; | |
31 struct WebFloatRect; | 30 struct WebFloatRect; |
32 } | 31 } |
33 | 32 |
34 namespace base { | 33 namespace base { |
35 namespace trace_event { | 34 namespace trace_event { |
36 class ConvertableToTraceFormat; | 35 class ConvertableToTraceFormat; |
37 } | 36 } |
38 } | 37 } |
39 | 38 |
40 namespace cc { | 39 namespace cc { |
41 class Layer; | 40 class Layer; |
42 class LayerSettings; | 41 class LayerSettings; |
43 } | 42 } |
44 | 43 |
45 namespace cc_blink { | 44 namespace cc_blink { |
46 | 45 |
47 class WebToCCAnimationDelegateAdapter; | 46 class WebToCCAnimationDelegateAdapter; |
48 | 47 |
49 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { | 48 class WebLayerImpl : public blink::WebLayer { |
50 public: | 49 public: |
51 CC_BLINK_EXPORT WebLayerImpl(); | 50 CC_BLINK_EXPORT WebLayerImpl(); |
52 CC_BLINK_EXPORT explicit WebLayerImpl(scoped_refptr<cc::Layer>); | 51 CC_BLINK_EXPORT explicit WebLayerImpl(scoped_refptr<cc::Layer>); |
53 ~WebLayerImpl() override; | 52 ~WebLayerImpl() override; |
54 | 53 |
55 CC_BLINK_EXPORT static void SetLayerSettings( | 54 CC_BLINK_EXPORT static void SetLayerSettings( |
56 const cc::LayerSettings& settings); | 55 const cc::LayerSettings& settings); |
57 CC_BLINK_EXPORT static const cc::LayerSettings& LayerSettings(); | 56 CC_BLINK_EXPORT static const cc::LayerSettings& LayerSettings(); |
58 | 57 |
59 CC_BLINK_EXPORT cc::Layer* layer() const; | 58 CC_BLINK_EXPORT cc::Layer* layer() const; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 override; | 138 override; |
140 blink::WebVector<std::pair<int64_t, blink::WebRect>> frameTimingRequests() | 139 blink::WebVector<std::pair<int64_t, blink::WebRect>> frameTimingRequests() |
141 const override; | 140 const override; |
142 void setIsContainerForFixedPositionLayers(bool is_container) override; | 141 void setIsContainerForFixedPositionLayers(bool is_container) override; |
143 bool isContainerForFixedPositionLayers() const override; | 142 bool isContainerForFixedPositionLayers() const override; |
144 void setPositionConstraint( | 143 void setPositionConstraint( |
145 const blink::WebLayerPositionConstraint& constraint) override; | 144 const blink::WebLayerPositionConstraint& constraint) override; |
146 blink::WebLayerPositionConstraint positionConstraint() const override; | 145 blink::WebLayerPositionConstraint positionConstraint() const override; |
147 void setScrollClient(blink::WebLayerScrollClient* client) override; | 146 void setScrollClient(blink::WebLayerScrollClient* client) override; |
148 bool isOrphan() const override; | 147 bool isOrphan() const override; |
149 void setWebLayerClient(blink::WebLayerClient* client) override; | 148 void setLayerClient(cc::LayerClient* client) override; |
150 | 149 const cc::Layer* ccLayer() const override; |
151 // LayerClient implementation. | |
152 scoped_refptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo() | |
153 override; | |
154 | 150 |
155 void setScrollParent(blink::WebLayer* parent) override; | 151 void setScrollParent(blink::WebLayer* parent) override; |
156 void setClipParent(blink::WebLayer* parent) override; | 152 void setClipParent(blink::WebLayer* parent) override; |
157 | 153 |
158 protected: | 154 protected: |
159 scoped_refptr<cc::Layer> layer_; | 155 scoped_refptr<cc::Layer> layer_; |
160 blink::WebLayerClient* web_layer_client_; | |
161 | 156 |
162 bool contents_opaque_is_fixed_; | 157 bool contents_opaque_is_fixed_; |
163 | 158 |
164 private: | 159 private: |
165 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; | 160 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; |
166 | 161 |
167 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); | 162 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); |
168 }; | 163 }; |
169 | 164 |
170 } // namespace cc_blink | 165 } // namespace cc_blink |
171 | 166 |
172 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ | 167 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ |
OLD | NEW |