OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebWidget_h | 31 #ifndef WebWidget_h |
32 #define WebWidget_h | 32 #define WebWidget_h |
33 | 33 |
34 #include "../platform/WebCanvas.h" | 34 #include "../platform/WebCanvas.h" |
35 #include "../platform/WebCommon.h" | 35 #include "../platform/WebCommon.h" |
| 36 #include "../platform/WebFrameTime.h" |
36 #include "../platform/WebRect.h" | 37 #include "../platform/WebRect.h" |
37 #include "../platform/WebSize.h" | 38 #include "../platform/WebSize.h" |
38 #include "WebCompositionUnderline.h" | 39 #include "WebCompositionUnderline.h" |
39 #include "WebTextDirection.h" | 40 #include "WebTextDirection.h" |
40 #include "WebTextInputInfo.h" | 41 #include "WebTextInputInfo.h" |
41 | 42 |
| 43 #include <limits> |
| 44 |
42 namespace blink { | 45 namespace blink { |
43 | 46 |
44 class WebCompositeAndReadbackAsyncCallback; | 47 class WebCompositeAndReadbackAsyncCallback; |
45 class WebInputEvent; | 48 class WebInputEvent; |
46 class WebLayerTreeView; | 49 class WebLayerTreeView; |
47 class WebMouseEvent; | 50 class WebMouseEvent; |
48 class WebString; | 51 class WebString; |
49 struct WebPoint; | 52 struct WebPoint; |
50 struct WebRenderingStats; | 53 struct WebRenderingStats; |
51 template <typename T> class WebVector; | 54 template <typename T> class WebVector; |
(...skipping 29 matching lines...) Expand all Loading... |
81 // Called to notify the WebWidget of entering/exiting fullscreen mode. The | 84 // Called to notify the WebWidget of entering/exiting fullscreen mode. The |
82 // resize method may be called between will{Enter,Exit}FullScreen and | 85 // resize method may be called between will{Enter,Exit}FullScreen and |
83 // did{Enter,Exit}FullScreen. | 86 // did{Enter,Exit}FullScreen. |
84 virtual void willEnterFullScreen() { } | 87 virtual void willEnterFullScreen() { } |
85 virtual void didEnterFullScreen() { } | 88 virtual void didEnterFullScreen() { } |
86 virtual void willExitFullScreen() { } | 89 virtual void willExitFullScreen() { } |
87 virtual void didExitFullScreen() { } | 90 virtual void didExitFullScreen() { } |
88 | 91 |
89 // Called to update imperative animation state. This should be called before | 92 // Called to update imperative animation state. This should be called before |
90 // paint, although the client can rate-limit these calls. | 93 // paint, although the client can rate-limit these calls. |
91 virtual void animate(double monotonicFrameBeginTime) { } | 94 // FIXME(mithro): Remove this function once Chrome side patch lands. |
| 95 void animate(double monotonicFrameBeginTime) |
| 96 { |
| 97 animate( |
| 98 WebFrameTime( |
| 99 monotonicFrameBeginTime, |
| 100 std::numeric_limits<double>::infinity(), |
| 101 monotonicFrameBeginTime, |
| 102 monotonicFrameBeginTime + 0.016666)); |
| 103 } |
| 104 virtual void animate(WebFrameTime frameTime) { } |
92 | 105 |
93 // Called to layout the WebWidget. This MUST be called before Paint, | 106 // Called to layout the WebWidget. This MUST be called before Paint, |
94 // and it may result in calls to WebWidgetClient::didInvalidateRect. | 107 // and it may result in calls to WebWidgetClient::didInvalidateRect. |
95 virtual void layout() { } | 108 virtual void layout() { } |
96 | 109 |
97 // Called to paint the rectangular region within the WebWidget | 110 // Called to paint the rectangular region within the WebWidget |
98 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call | 111 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call |
99 // Layout before calling this method. It is okay to call paint | 112 // Layout before calling this method. It is okay to call paint |
100 // multiple times once layout has been called, assuming no other | 113 // multiple times once layout has been called, assuming no other |
101 // changes are made to the WebWidget (e.g., once events are | 114 // changes are made to the WebWidget (e.g., once events are |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // content. | 256 // content. |
244 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI
TE */ } | 257 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI
TE */ } |
245 | 258 |
246 protected: | 259 protected: |
247 ~WebWidget() { } | 260 ~WebWidget() { } |
248 }; | 261 }; |
249 | 262 |
250 } // namespace blink | 263 } // namespace blink |
251 | 264 |
252 #endif | 265 #endif |
OLD | NEW |