| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // to adjust layer position during threaded scrolling. | 195 // to adjust layer position during threaded scrolling. |
| 196 virtual void SetPositionConstraint(const WebLayerPositionConstraint&) = 0; | 196 virtual void SetPositionConstraint(const WebLayerPositionConstraint&) = 0; |
| 197 virtual WebLayerPositionConstraint PositionConstraint() const = 0; | 197 virtual WebLayerPositionConstraint PositionConstraint() const = 0; |
| 198 | 198 |
| 199 // Sets the sticky position constraint. This will be used to adjust sticky | 199 // Sets the sticky position constraint. This will be used to adjust sticky |
| 200 // position objects during threaded scrolling. | 200 // position objects during threaded scrolling. |
| 201 virtual void SetStickyPositionConstraint( | 201 virtual void SetStickyPositionConstraint( |
| 202 const WebLayerStickyPositionConstraint&) = 0; | 202 const WebLayerStickyPositionConstraint&) = 0; |
| 203 virtual WebLayerStickyPositionConstraint StickyPositionConstraint() const = 0; | 203 virtual WebLayerStickyPositionConstraint StickyPositionConstraint() const = 0; |
| 204 | 204 |
| 205 // Sets the main thread offset applied to the sticky element. This will be |
| 206 // used to calculate the actual sticky position offset from cc side. |
| 207 virtual void SetStickyMainThreadOffset(const WebSize&) = 0; |
| 208 virtual WebSize StickyMainThreadOffset() const = 0; |
| 209 |
| 205 // The scroll client is notified when the scroll position of the WebLayer | 210 // The scroll client is notified when the scroll position of the WebLayer |
| 206 // changes. Only a single scroll client can be set for a WebLayer at a time. | 211 // changes. Only a single scroll client can be set for a WebLayer at a time. |
| 207 // The WebLayer does not take ownership of the scroll client, and it is the | 212 // The WebLayer does not take ownership of the scroll client, and it is the |
| 208 // responsibility of the client to reset the layer's scroll client before | 213 // responsibility of the client to reset the layer's scroll client before |
| 209 // deleting the scroll client. | 214 // deleting the scroll client. |
| 210 virtual void SetScrollClient(WebLayerScrollClient*) = 0; | 215 virtual void SetScrollClient(WebLayerScrollClient*) = 0; |
| 211 | 216 |
| 212 // Sets the cc-side layer client. | 217 // Sets the cc-side layer client. |
| 213 virtual void SetLayerClient(cc::LayerClient*) = 0; | 218 virtual void SetLayerClient(cc::LayerClient*) = 0; |
| 214 | 219 |
| 215 // Gets the underlying cc layer. | 220 // Gets the underlying cc layer. |
| 216 virtual const cc::Layer* CcLayer() const = 0; | 221 virtual const cc::Layer* CcLayer() const = 0; |
| 217 virtual cc::Layer* CcLayer() = 0; | 222 virtual cc::Layer* CcLayer() = 0; |
| 218 | 223 |
| 219 virtual void SetElementId(const cc::ElementId&) = 0; | 224 virtual void SetElementId(const cc::ElementId&) = 0; |
| 220 virtual cc::ElementId GetElementId() const = 0; | 225 virtual cc::ElementId GetElementId() const = 0; |
| 221 | 226 |
| 222 virtual void SetCompositorMutableProperties(uint32_t) = 0; | 227 virtual void SetCompositorMutableProperties(uint32_t) = 0; |
| 223 virtual uint32_t CompositorMutableProperties() const = 0; | 228 virtual uint32_t CompositorMutableProperties() const = 0; |
| 224 | 229 |
| 225 virtual void SetHasWillChangeTransformHint(bool) = 0; | 230 virtual void SetHasWillChangeTransformHint(bool) = 0; |
| 226 | 231 |
| 227 // Called on the scroll layer to trigger showing the overlay scrollbars. | 232 // Called on the scroll layer to trigger showing the overlay scrollbars. |
| 228 virtual void ShowScrollbars() = 0; | 233 virtual void ShowScrollbars() = 0; |
| 229 }; | 234 }; |
| 230 | 235 |
| 231 } // namespace blink | 236 } // namespace blink |
| 232 | 237 |
| 233 #endif // WebLayer_h | 238 #endif // WebLayer_h |
| OLD | NEW |