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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // A layer will not respect any clips established by layers between it and | 164 // A layer will not respect any clips established by layers between it and |
165 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. | 165 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. |
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 // TODO(wjmaclean) Remove next line once https://codereview.chromium.org/239
83047 lands. |
173 virtual void setMaxScrollPosition(WebSize) = 0; | 174 virtual void setMaxScrollPosition(WebSize) = 0; |
174 virtual WebSize maxScrollPosition() const = 0; | 175 virtual WebSize maxScrollPosition() const = 0; |
175 | 176 |
| 177 // TODO(wjmaclean) Remove next line once https://codereview.chromium.org/239
83047 lands. |
176 virtual void setScrollable(bool) = 0; | 178 virtual void setScrollable(bool) = 0; |
| 179 // To set a WebLayer as scrollable we must specify the corresponding clip la
yer. |
| 180 // TODO(wjmaclean) Make this pure virtual once https://codereview.chromium.o
rg/23983047 lands. |
| 181 virtual void setScrollClipLayer(WebLayer*) { } |
177 virtual bool scrollable() const = 0; | 182 virtual bool scrollable() const = 0; |
178 | 183 |
179 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; | 184 virtual void setUserScrollable(bool horizontal, bool vertical) = 0; |
180 virtual bool userScrollableHorizontal() const = 0; | 185 virtual bool userScrollableHorizontal() const = 0; |
181 virtual bool userScrollableVertical() const = 0; | 186 virtual bool userScrollableVertical() const = 0; |
182 | 187 |
183 virtual void setHaveWheelEventHandlers(bool) = 0; | 188 virtual void setHaveWheelEventHandlers(bool) = 0; |
184 virtual bool haveWheelEventHandlers() const = 0; | 189 virtual bool haveWheelEventHandlers() const = 0; |
185 | 190 |
186 virtual void setShouldScrollOnMainThread(bool) = 0; | 191 virtual void setShouldScrollOnMainThread(bool) = 0; |
(...skipping 26 matching lines...) Expand all Loading... |
213 | 218 |
214 // True if the layer is not part of a tree attached to a WebLayerTreeView. | 219 // True if the layer is not part of a tree attached to a WebLayerTreeView. |
215 virtual bool isOrphan() const = 0; | 220 virtual bool isOrphan() const = 0; |
216 | 221 |
217 virtual void setWebLayerClient(WebLayerClient*) = 0; | 222 virtual void setWebLayerClient(WebLayerClient*) = 0; |
218 }; | 223 }; |
219 | 224 |
220 } // namespace blink | 225 } // namespace blink |
221 | 226 |
222 #endif // WebLayer_h | 227 #endif // WebLayer_h |
OLD | NEW |