| 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 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "third_party/WebKit/public/platform/WebVector.h" | 24 #include "third_party/WebKit/public/platform/WebVector.h" |
| 25 #include "third_party/skia/include/utils/SkMatrix44.h" | 25 #include "third_party/skia/include/utils/SkMatrix44.h" |
| 26 | 26 |
| 27 namespace blink { | 27 namespace blink { |
| 28 class WebFilterOperations; | 28 class WebFilterOperations; |
| 29 class WebLayerClient; | 29 class WebLayerClient; |
| 30 struct WebFloatRect; | 30 struct WebFloatRect; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace base { | 33 namespace base { |
| 34 namespace debug { | 34 namespace trace_event { |
| 35 class ConvertableToTraceFormat; | 35 class ConvertableToTraceFormat; |
| 36 } | 36 } |
| 37 |
| 38 // TODO(ssid): remove these aliases after the tracing clients are moved to the |
| 39 // new trace_event namespace. See crbug.com/451032. ETA: March 2015. |
| 40 namespace debug { |
| 41 using ::base::trace_event::ConvertableToTraceFormat; |
| 37 } | 42 } |
| 43 } // namespace base |
| 38 | 44 |
| 39 namespace cc { | 45 namespace cc { |
| 40 class Layer; | 46 class Layer; |
| 41 } | 47 } |
| 42 | 48 |
| 43 namespace cc_blink { | 49 namespace cc_blink { |
| 44 | 50 |
| 45 class WebToCCAnimationDelegateAdapter; | 51 class WebToCCAnimationDelegateAdapter; |
| 46 | 52 |
| 47 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { | 53 class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 virtual void setHaveScrollEventHandlers(bool have_scroll_event_handlers); | 122 virtual void setHaveScrollEventHandlers(bool have_scroll_event_handlers); |
| 117 virtual bool haveScrollEventHandlers() const; | 123 virtual bool haveScrollEventHandlers() const; |
| 118 virtual void setShouldScrollOnMainThread(bool scroll_on_main); | 124 virtual void setShouldScrollOnMainThread(bool scroll_on_main); |
| 119 virtual bool shouldScrollOnMainThread() const; | 125 virtual bool shouldScrollOnMainThread() const; |
| 120 virtual void setNonFastScrollableRegion( | 126 virtual void setNonFastScrollableRegion( |
| 121 const blink::WebVector<blink::WebRect>& region); | 127 const blink::WebVector<blink::WebRect>& region); |
| 122 virtual blink::WebVector<blink::WebRect> nonFastScrollableRegion() const; | 128 virtual blink::WebVector<blink::WebRect> nonFastScrollableRegion() const; |
| 123 virtual void setTouchEventHandlerRegion( | 129 virtual void setTouchEventHandlerRegion( |
| 124 const blink::WebVector<blink::WebRect>& region); | 130 const blink::WebVector<blink::WebRect>& region); |
| 125 virtual blink::WebVector<blink::WebRect> touchEventHandlerRegion() const; | 131 virtual blink::WebVector<blink::WebRect> touchEventHandlerRegion() const; |
| 132 virtual void setScrollBlocksOn(blink::WebScrollBlocksOn); |
| 133 virtual blink::WebScrollBlocksOn scrollBlocksOn() const; |
| 126 virtual void setIsContainerForFixedPositionLayers(bool is_container); | 134 virtual void setIsContainerForFixedPositionLayers(bool is_container); |
| 127 virtual bool isContainerForFixedPositionLayers() const; | 135 virtual bool isContainerForFixedPositionLayers() const; |
| 128 virtual void setPositionConstraint( | 136 virtual void setPositionConstraint( |
| 129 const blink::WebLayerPositionConstraint& constraint); | 137 const blink::WebLayerPositionConstraint& constraint); |
| 130 virtual blink::WebLayerPositionConstraint positionConstraint() const; | 138 virtual blink::WebLayerPositionConstraint positionConstraint() const; |
| 131 virtual void setScrollClient(blink::WebLayerScrollClient* client); | 139 virtual void setScrollClient(blink::WebLayerScrollClient* client); |
| 132 virtual bool isOrphan() const; | 140 virtual bool isOrphan() const; |
| 133 virtual void setWebLayerClient(blink::WebLayerClient* client); | 141 virtual void setWebLayerClient(blink::WebLayerClient* client); |
| 134 | 142 |
| 135 // LayerClient implementation. | 143 // LayerClient implementation. |
| 136 scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo() override; | 144 scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo() override; |
| 137 | 145 |
| 138 virtual void setScrollParent(blink::WebLayer* parent); | 146 virtual void setScrollParent(blink::WebLayer* parent); |
| 139 virtual void setClipParent(blink::WebLayer* parent); | 147 virtual void setClipParent(blink::WebLayer* parent); |
| 140 | 148 |
| 141 protected: | 149 protected: |
| 142 scoped_refptr<cc::Layer> layer_; | 150 scoped_refptr<cc::Layer> layer_; |
| 143 blink::WebLayerClient* web_layer_client_; | 151 blink::WebLayerClient* web_layer_client_; |
| 144 | 152 |
| 145 private: | 153 private: |
| 146 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; | 154 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; |
| 147 | 155 |
| 148 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); | 156 DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); |
| 149 }; | 157 }; |
| 150 | 158 |
| 151 } // namespace cc_blink | 159 } // namespace cc_blink |
| 152 | 160 |
| 153 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ | 161 #endif // CC_BLINK_WEB_LAYER_IMPL_H_ |
| OLD | NEW |