| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class FilterOperations; | 49 class FilterOperations; |
| 50 struct ElementId; | 50 struct ElementId; |
| 51 } | 51 } |
| 52 | 52 |
| 53 namespace blink { | 53 namespace blink { |
| 54 | 54 |
| 55 class WebLayerScrollClient; | 55 class WebLayerScrollClient; |
| 56 struct WebFloatPoint; | 56 struct WebFloatPoint; |
| 57 struct WebLayerPositionConstraint; | 57 struct WebLayerPositionConstraint; |
| 58 struct WebLayerStickyPositionConstraint; | 58 struct WebLayerStickyPositionConstraint; |
| 59 struct WebSnapPointList; |
| 59 | 60 |
| 60 class WebLayer { | 61 class WebLayer { |
| 61 public: | 62 public: |
| 62 virtual ~WebLayer() {} | 63 virtual ~WebLayer() {} |
| 63 | 64 |
| 64 static constexpr int kInvalidLayerId = cc::Layer::INVALID_ID; | 65 static constexpr int kInvalidLayerId = cc::Layer::INVALID_ID; |
| 65 | 66 |
| 66 // Returns a positive ID that will be unique across all WebLayers allocated in | 67 // Returns a positive ID that will be unique across all WebLayers allocated in |
| 67 // this process. | 68 // this process. |
| 68 virtual int Id() const = 0; | 69 virtual int Id() const = 0; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 const WebLayerStickyPositionConstraint&) = 0; | 203 const WebLayerStickyPositionConstraint&) = 0; |
| 203 virtual WebLayerStickyPositionConstraint StickyPositionConstraint() const = 0; | 204 virtual WebLayerStickyPositionConstraint StickyPositionConstraint() const = 0; |
| 204 | 205 |
| 205 // The scroll client is notified when the scroll position of the WebLayer | 206 // 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. | 207 // 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 | 208 // 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 | 209 // responsibility of the client to reset the layer's scroll client before |
| 209 // deleting the scroll client. | 210 // deleting the scroll client. |
| 210 virtual void SetScrollClient(WebLayerScrollClient*) = 0; | 211 virtual void SetScrollClient(WebLayerScrollClient*) = 0; |
| 211 | 212 |
| 213 virtual void SetScrollSnapOffsets(const WebSnapPointList&) = 0; |
| 214 |
| 212 // Sets the cc-side layer client. | 215 // Sets the cc-side layer client. |
| 213 virtual void SetLayerClient(cc::LayerClient*) = 0; | 216 virtual void SetLayerClient(cc::LayerClient*) = 0; |
| 214 | 217 |
| 215 // Gets the underlying cc layer. | 218 // Gets the underlying cc layer. |
| 216 virtual const cc::Layer* CcLayer() const = 0; | 219 virtual const cc::Layer* CcLayer() const = 0; |
| 217 virtual cc::Layer* CcLayer() = 0; | 220 virtual cc::Layer* CcLayer() = 0; |
| 218 | 221 |
| 219 virtual void SetElementId(const cc::ElementId&) = 0; | 222 virtual void SetElementId(const cc::ElementId&) = 0; |
| 220 virtual cc::ElementId GetElementId() const = 0; | 223 virtual cc::ElementId GetElementId() const = 0; |
| 221 | 224 |
| 222 virtual void SetCompositorMutableProperties(uint32_t) = 0; | 225 virtual void SetCompositorMutableProperties(uint32_t) = 0; |
| 223 virtual uint32_t CompositorMutableProperties() const = 0; | 226 virtual uint32_t CompositorMutableProperties() const = 0; |
| 224 | 227 |
| 225 virtual void SetHasWillChangeTransformHint(bool) = 0; | 228 virtual void SetHasWillChangeTransformHint(bool) = 0; |
| 226 | 229 |
| 227 // Called on the scroll layer to trigger showing the overlay scrollbars. | 230 // Called on the scroll layer to trigger showing the overlay scrollbars. |
| 228 virtual void ShowScrollbars() = 0; | 231 virtual void ShowScrollbars() = 0; |
| 229 }; | 232 }; |
| 230 | 233 |
| 231 } // namespace blink | 234 } // namespace blink |
| 232 | 235 |
| 233 #endif // WebLayer_h | 236 #endif // WebLayer_h |
| OLD | NEW |