| 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; |
| 30 struct WebFloatRect; | 31 struct WebFloatRect; |
| 31 } | 32 } |
| 32 | 33 |
| 33 namespace base { | 34 namespace base { |
| 34 namespace trace_event { | 35 namespace trace_event { |
| 35 class ConvertableToTraceFormat; | 36 class ConvertableToTraceFormat; |
| 36 } | 37 } |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace cc { | 40 namespace cc { |
| 40 class Layer; | 41 class Layer; |
| 41 class LayerSettings; | 42 class LayerSettings; |
| 42 } | 43 } |
| 43 | 44 |
| 44 namespace cc_blink { | 45 namespace cc_blink { |
| 45 | 46 |
| 46 class WebToCCAnimationDelegateAdapter; | 47 class WebToCCAnimationDelegateAdapter; |
| 47 | 48 |
| 48 class WebLayerImpl : public blink::WebLayer { | 49 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { |
| 49 public: | 50 public: |
| 50 CC_BLINK_EXPORT WebLayerImpl(); | 51 CC_BLINK_EXPORT WebLayerImpl(); |
| 51 CC_BLINK_EXPORT explicit WebLayerImpl(scoped_refptr<cc::Layer>); | 52 CC_BLINK_EXPORT explicit WebLayerImpl(scoped_refptr<cc::Layer>); |
| 52 ~WebLayerImpl() override; | 53 ~WebLayerImpl() override; |
| 53 | 54 |
| 54 CC_BLINK_EXPORT static void SetLayerSettings( | 55 CC_BLINK_EXPORT static void SetLayerSettings( |
| 55 const cc::LayerSettings& settings); | 56 const cc::LayerSettings& settings); |
| 56 CC_BLINK_EXPORT static const cc::LayerSettings& LayerSettings(); | 57 CC_BLINK_EXPORT static const cc::LayerSettings& LayerSettings(); |
| 57 | 58 |
| 58 CC_BLINK_EXPORT cc::Layer* layer() const; | 59 CC_BLINK_EXPORT cc::Layer* layer() const; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 override; | 139 override; |
| 139 blink::WebVector<std::pair<int64_t, blink::WebRect>> frameTimingRequests() | 140 blink::WebVector<std::pair<int64_t, blink::WebRect>> frameTimingRequests() |
| 140 const override; | 141 const override; |
| 141 void setIsContainerForFixedPositionLayers(bool is_container) override; | 142 void setIsContainerForFixedPositionLayers(bool is_container) override; |
| 142 bool isContainerForFixedPositionLayers() const override; | 143 bool isContainerForFixedPositionLayers() const override; |
| 143 void setPositionConstraint( | 144 void setPositionConstraint( |
| 144 const blink::WebLayerPositionConstraint& constraint) override; | 145 const blink::WebLayerPositionConstraint& constraint) override; |
| 145 blink::WebLayerPositionConstraint positionConstraint() const override; | 146 blink::WebLayerPositionConstraint positionConstraint() const override; |
| 146 void setScrollClient(blink::WebLayerScrollClient* client) override; | 147 void setScrollClient(blink::WebLayerScrollClient* client) override; |
| 147 bool isOrphan() const override; | 148 bool isOrphan() const override; |
| 148 void setLayerClient(cc::LayerClient* client) override; | 149 void setWebLayerClient(blink::WebLayerClient* client) override; |
| 149 const cc::Layer* ccLayer() const override; | 150 |
| 151 // LayerClient implementation. |
| 152 scoped_refptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo() |
| 153 override; |
| 150 | 154 |
| 151 void setScrollParent(blink::WebLayer* parent) override; | 155 void setScrollParent(blink::WebLayer* parent) override; |
| 152 void setClipParent(blink::WebLayer* parent) override; | 156 void setClipParent(blink::WebLayer* parent) override; |
| 153 | 157 |
| 154 protected: | 158 protected: |
| 155 scoped_refptr<cc::Layer> layer_; | 159 scoped_refptr<cc::Layer> layer_; |
| 160 blink::WebLayerClient* web_layer_client_; |
| 156 | 161 |
| 157 bool contents_opaque_is_fixed_; | 162 bool contents_opaque_is_fixed_; |
| 158 | 163 |
| 159 private: | 164 private: |
| 160 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; | 165 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; |
| 161 | 166 |
| 162 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); | 167 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); |
| 163 }; | 168 }; |
| 164 | 169 |
| 165 } // namespace cc_blink | 170 } // namespace cc_blink |
| 166 | 171 |
| 167 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ | 172 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ |
| OLD | NEW |