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 30 matching lines...) Expand all Loading... | |
41 | 41 |
42 namespace WebKit { | 42 namespace WebKit { |
43 class WebAnimationDelegate; | 43 class WebAnimationDelegate; |
44 class WebFilterOperations; | 44 class WebFilterOperations; |
45 class WebLayerScrollClient; | 45 class WebLayerScrollClient; |
46 struct WebFloatPoint; | 46 struct WebFloatPoint; |
47 struct WebFloatRect; | 47 struct WebFloatRect; |
48 struct WebLayerPositionConstraint; | 48 struct WebLayerPositionConstraint; |
49 struct WebSize; | 49 struct WebSize; |
50 | 50 |
51 class WebLayerImpl; | 51 class WebLayer; |
52 | |
53 class WebLayerClient { | |
enne (OOO)
2013/07/30 17:31:05
Can you put this interface in a separate file, lik
qiankun
2013/07/31 11:16:28
Done.
| |
54 public: | |
enne (OOO)
2013/07/30 17:31:05
style nit: "public:" should be left-aligned and th
qiankun
2013/07/31 11:16:28
Done.
| |
55 virtual WebString debugName(WebLayer*) { return WebString(); } | |
jamesr
2013/07/30 17:37:40
since this is going to be implemented inside Blink
qiankun
2013/07/31 11:16:28
Done.
| |
56 | |
57 protected: | |
58 virtual ~WebLayerClient() { } | |
59 }; | |
52 | 60 |
53 class WebLayer { | 61 class WebLayer { |
54 public: | 62 public: |
55 virtual ~WebLayer() { } | 63 virtual ~WebLayer() { } |
56 | 64 |
57 // Returns a positive ID that will be unique across all WebLayers allocated in this process. | 65 // Returns a positive ID that will be unique across all WebLayers allocated in this process. |
58 virtual int id() const = 0; | 66 virtual int id() const = 0; |
59 | 67 |
60 // Sets a region of the layer as invalid, i.e. needs to update its content. | 68 // Sets a region of the layer as invalid, i.e. needs to update its content. |
61 virtual void invalidateRect(const WebFloatRect&) = 0; | 69 virtual void invalidateRect(const WebFloatRect&) = 0; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 // responsibility of the client to reset the layer's scroll client before | 214 // responsibility of the client to reset the layer's scroll client before |
207 // deleting the scroll client. | 215 // deleting the scroll client. |
208 virtual void setScrollClient(WebLayerScrollClient*) = 0; | 216 virtual void setScrollClient(WebLayerScrollClient*) = 0; |
209 | 217 |
210 // Forces this layer to use a render surface. There is no benefit in doing | 218 // Forces this layer to use a render surface. There is no benefit in doing |
211 // so, but this is to facilitate benchmarks and tests. | 219 // so, but this is to facilitate benchmarks and tests. |
212 virtual void setForceRenderSurface(bool) = 0; | 220 virtual void setForceRenderSurface(bool) = 0; |
213 | 221 |
214 // True if the layer is not part of a tree attached to a WebLayerTreeView. | 222 // True if the layer is not part of a tree attached to a WebLayerTreeView. |
215 virtual bool isOrphan() const = 0; | 223 virtual bool isOrphan() const = 0; |
224 | |
225 virtual void setWebLayerClient(WebKit::WebLayerClient*) = 0; | |
jamesr
2013/07/30 17:37:40
Why is this a setter instead of being construction
qiankun
2013/07/31 11:16:28
WebLayer's client may not exist when the Weblayer
| |
216 }; | 226 }; |
217 | 227 |
218 } // namespace WebKit | 228 } // namespace WebKit |
219 | 229 |
220 #endif // WebLayer_h | 230 #endif // WebLayer_h |
OLD | NEW |