| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // This is not a requirement of the scroll parent. | 166 // This is not a requirement of the scroll parent. |
| 167 virtual void setClipParent(WebLayer*) = 0; | 167 virtual void setClipParent(WebLayer*) = 0; |
| 168 | 168 |
| 169 // Scrolling | 169 // Scrolling |
| 170 virtual void setScrollPosition(WebPoint) = 0; | 170 virtual void setScrollPosition(WebPoint) = 0; |
| 171 virtual WebPoint scrollPosition() const = 0; | 171 virtual WebPoint scrollPosition() const = 0; |
| 172 | 172 |
| 173 virtual WebSize maxScrollPosition() const = 0; | 173 virtual WebSize maxScrollPosition() const = 0; |
| 174 | 174 |
| 175 // To set a WebLayer as scrollable we must specify the corresponding clip la
yer. | 175 // To set a WebLayer as scrollable we must specify the corresponding clip la
yer. |
| 176 // TODO(wjmaclean) Make this pure virtual once https://codereview.chromium.o
rg/23983047 lands. | 176 virtual void setScrollClipLayer(WebLayer*) = 0; |
| 177 virtual void setScrollClipLayer(WebLayer*) { } | |
| 178 virtual bool scrollable() const = 0; | 177 virtual bool scrollable() const = 0; |
| 179 | |
| 180 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; | 178 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; |
| 181 virtual bool userScrollableHorizontal() const = 0; | 179 virtual bool userScrollableHorizontal() const = 0; |
| 182 virtual bool userScrollableVertical() const = 0; | 180 virtual bool userScrollableVertical() const = 0; |
| 183 | 181 |
| 184 virtual void setHaveWheelEventHandlers(bool) = 0; | 182 virtual void setHaveWheelEventHandlers(bool) = 0; |
| 185 virtual bool haveWheelEventHandlers() const = 0; | 183 virtual bool haveWheelEventHandlers() const = 0; |
| 186 | 184 |
| 187 virtual void setShouldScrollOnMainThread(bool) = 0; | 185 virtual void setShouldScrollOnMainThread(bool) = 0; |
| 188 virtual bool shouldScrollOnMainThread() const = 0; | 186 virtual bool shouldScrollOnMainThread() const = 0; |
| 189 | 187 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 209 virtual void setScrollClient(WebLayerScrollClient*) = 0; | 207 virtual void setScrollClient(WebLayerScrollClient*) = 0; |
| 210 | 208 |
| 211 // Forces this layer to use a render surface. There is no benefit in doing | 209 // Forces this layer to use a render surface. There is no benefit in doing |
| 212 // so, but this is to facilitate benchmarks and tests. | 210 // so, but this is to facilitate benchmarks and tests. |
| 213 virtual void setForceRenderSurface(bool) = 0; | 211 virtual void setForceRenderSurface(bool) = 0; |
| 214 | 212 |
| 215 // True if the layer is not part of a tree attached to a WebLayerTreeView. | 213 // True if the layer is not part of a tree attached to a WebLayerTreeView. |
| 216 virtual bool isOrphan() const = 0; | 214 virtual bool isOrphan() const = 0; |
| 217 | 215 |
| 218 virtual void setWebLayerClient(WebLayerClient*) = 0; | 216 virtual void setWebLayerClient(WebLayerClient*) = 0; |
| 219 | |
| 220 // TODO(wjmaclean) Remove next two lines once https://codereview.chromium.or
g/23983047 lands. | |
| 221 virtual void setMaxScrollPosition(WebSize) { } | |
| 222 virtual void setScrollable(bool) { } | |
| 223 }; | 217 }; |
| 224 | 218 |
| 225 } // namespace blink | 219 } // namespace blink |
| 226 | 220 |
| 227 #endif // WebLayer_h | 221 #endif // WebLayer_h |
| OLD | NEW |