| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class LayerClient; | 46 class LayerClient; |
| 47 class FilterOperations; | 47 class FilterOperations; |
| 48 struct ElementId; | 48 struct ElementId; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace blink { | 51 namespace blink { |
| 52 | 52 |
| 53 class WebLayerScrollClient; | 53 class WebLayerScrollClient; |
| 54 struct WebFloatPoint; | 54 struct WebFloatPoint; |
| 55 struct WebLayerPositionConstraint; | 55 struct WebLayerPositionConstraint; |
| 56 struct WebLayerStickyPositionConstraint; |
| 56 | 57 |
| 57 class WebLayer { | 58 class WebLayer { |
| 58 public: | 59 public: |
| 59 virtual ~WebLayer() { } | 60 virtual ~WebLayer() { } |
| 60 | 61 |
| 61 // Returns a positive ID that will be unique across all WebLayers allocated
in this process. | 62 // Returns a positive ID that will be unique across all WebLayers allocated
in this process. |
| 62 virtual int id() const = 0; | 63 virtual int id() const = 0; |
| 63 | 64 |
| 64 // Sets a region of the layer as invalid, i.e. needs to update its content. | 65 // Sets a region of the layer as invalid, i.e. needs to update its content. |
| 65 virtual void invalidateRect(const WebRect&) = 0; | 66 virtual void invalidateRect(const WebRect&) = 0; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 virtual WebVector<WebRect> touchEventHandlerRegion() const = 0; | 182 virtual WebVector<WebRect> touchEventHandlerRegion() const = 0; |
| 182 | 183 |
| 183 virtual void setIsContainerForFixedPositionLayers(bool) = 0; | 184 virtual void setIsContainerForFixedPositionLayers(bool) = 0; |
| 184 virtual bool isContainerForFixedPositionLayers() const = 0; | 185 virtual bool isContainerForFixedPositionLayers() const = 0; |
| 185 | 186 |
| 186 // This function sets layer position constraint. The constraint will be used | 187 // This function sets layer position constraint. The constraint will be used |
| 187 // to adjust layer position during threaded scrolling. | 188 // to adjust layer position during threaded scrolling. |
| 188 virtual void setPositionConstraint(const WebLayerPositionConstraint&) = 0; | 189 virtual void setPositionConstraint(const WebLayerPositionConstraint&) = 0; |
| 189 virtual WebLayerPositionConstraint positionConstraint() const = 0; | 190 virtual WebLayerPositionConstraint positionConstraint() const = 0; |
| 190 | 191 |
| 192 // Sets the sticky position constraint. This will be used to adjust sticky |
| 193 // position objects during threaded scrolling. |
| 194 virtual void setStickyPositionConstraint(const WebLayerStickyPositionConstra
int&) = 0; |
| 195 virtual WebLayerStickyPositionConstraint stickyPositionConstraint() const =
0; |
| 196 |
| 191 // The scroll client is notified when the scroll position of the WebLayer | 197 // The scroll client is notified when the scroll position of the WebLayer |
| 192 // changes. Only a single scroll client can be set for a WebLayer at a time. | 198 // changes. Only a single scroll client can be set for a WebLayer at a time. |
| 193 // The WebLayer does not take ownership of the scroll client, and it is the | 199 // The WebLayer does not take ownership of the scroll client, and it is the |
| 194 // responsibility of the client to reset the layer's scroll client before | 200 // responsibility of the client to reset the layer's scroll client before |
| 195 // deleting the scroll client. | 201 // deleting the scroll client. |
| 196 virtual void setScrollClient(WebLayerScrollClient*) = 0; | 202 virtual void setScrollClient(WebLayerScrollClient*) = 0; |
| 197 | 203 |
| 198 // Sets the cc-side layer client. | 204 // Sets the cc-side layer client. |
| 199 virtual void setLayerClient(cc::LayerClient*) = 0; | 205 virtual void setLayerClient(cc::LayerClient*) = 0; |
| 200 | 206 |
| 201 // Gets the underlying cc layer. | 207 // Gets the underlying cc layer. |
| 202 virtual const cc::Layer* ccLayer() const = 0; | 208 virtual const cc::Layer* ccLayer() const = 0; |
| 203 virtual cc::Layer* ccLayer() = 0; | 209 virtual cc::Layer* ccLayer() = 0; |
| 204 | 210 |
| 205 virtual void setElementId(const cc::ElementId&) = 0; | 211 virtual void setElementId(const cc::ElementId&) = 0; |
| 206 virtual cc::ElementId elementId() const = 0; | 212 virtual cc::ElementId elementId() const = 0; |
| 207 | 213 |
| 208 virtual void setCompositorMutableProperties(uint32_t) = 0; | 214 virtual void setCompositorMutableProperties(uint32_t) = 0; |
| 209 virtual uint32_t compositorMutableProperties() const = 0; | 215 virtual uint32_t compositorMutableProperties() const = 0; |
| 210 | 216 |
| 211 virtual void setHasWillChangeTransformHint(bool) = 0; | 217 virtual void setHasWillChangeTransformHint(bool) = 0; |
| 212 }; | 218 }; |
| 213 | 219 |
| 214 } // namespace blink | 220 } // namespace blink |
| 215 | 221 |
| 216 #endif // WebLayer_h | 222 #endif // WebLayer_h |
| OLD | NEW |