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 |
11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
13 * | 13 * |
14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef WebLayerTreeView_h | 26 #ifndef WebLayerTreeView_h |
27 #define WebLayerTreeView_h | 27 #define WebLayerTreeView_h |
28 | 28 |
| 29 #include "WebColor.h" |
29 #include "WebCommon.h" | 30 #include "WebCommon.h" |
30 #include "WebPrivatePtr.h" | 31 #include "WebPrivatePtr.h" |
31 | 32 |
32 namespace WebCore { | 33 namespace WebCore { |
33 class CCLayerTreeHost; | 34 class CCLayerTreeHost; |
34 struct CCSettings; | 35 struct CCSettings; |
35 } | 36 } |
36 | 37 |
37 namespace WebKit { | 38 namespace WebKit { |
38 class WebGraphicsContext3D; | 39 class WebGraphicsContext3D; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Returns a unique identifier that can be used on the compositor thread to
request a | 102 // Returns a unique identifier that can be used on the compositor thread to
request a |
102 // WebCompositorInputHandler instance. | 103 // WebCompositorInputHandler instance. |
103 WEBKIT_EXPORT int compositorIdentifier(); | 104 WEBKIT_EXPORT int compositorIdentifier(); |
104 | 105 |
105 | 106 |
106 // View properties --------------------------------------------------- | 107 // View properties --------------------------------------------------- |
107 | 108 |
108 WEBKIT_EXPORT void setViewportSize(const WebSize&); | 109 WEBKIT_EXPORT void setViewportSize(const WebSize&); |
109 WEBKIT_EXPORT WebSize viewportSize() const; | 110 WEBKIT_EXPORT WebSize viewportSize() const; |
110 | 111 |
| 112 // Sets the background color for the viewport. |
| 113 WEBKIT_EXPORT void setBackgroundColor(WebColor); |
| 114 |
111 // Sets whether this view is visible. In threaded mode, a view that is not v
isible will not | 115 // Sets whether this view is visible. In threaded mode, a view that is not v
isible will not |
112 // composite or trigger updateAnimations() or layout() calls until it become
s visible. | 116 // composite or trigger updateAnimations() or layout() calls until it become
s visible. |
113 WEBKIT_EXPORT void setVisible(bool); | 117 WEBKIT_EXPORT void setVisible(bool); |
114 | 118 |
115 // Sets the current page scale factor and minimum / maximum limits. Both lim
its are initially 1 (no page scale allowed). | 119 // Sets the current page scale factor and minimum / maximum limits. Both lim
its are initially 1 (no page scale allowed). |
116 WEBKIT_EXPORT void setPageScaleFactorAndLimits(float pageScaleFactor, float
minimum, float maximum); | 120 WEBKIT_EXPORT void setPageScaleFactorAndLimits(float pageScaleFactor, float
minimum, float maximum); |
117 | 121 |
118 // Starts an animation of the page scale to a target scale factor and scroll
offset. | 122 // Starts an animation of the page scale to a target scale factor and scroll
offset. |
119 // If useAnchor is true, destination is a point on the screen that will rema
in fixed for the duration of the animation. | 123 // If useAnchor is true, destination is a point on the screen that will rema
in fixed for the duration of the animation. |
120 // If useAnchor is false, destination is the final top-left scroll position. | 124 // If useAnchor is false, destination is the final top-left scroll position. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 182 } |
179 | 183 |
180 inline bool operator!=(const WebLayerTreeView& a, const WebLayerTreeView& b) | 184 inline bool operator!=(const WebLayerTreeView& a, const WebLayerTreeView& b) |
181 { | 185 { |
182 return !(a == b); | 186 return !(a == b); |
183 } | 187 } |
184 | 188 |
185 } // namespace WebKit | 189 } // namespace WebKit |
186 | 190 |
187 #endif // WebLayerTreeView_h | 191 #endif // WebLayerTreeView_h |
OLD | NEW |