Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Side by Side Diff: public/web/WebWidget.h

Issue 321373003: Changing animate to beginFrame and use struct rather than naked double to allow extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding another FIXME comment. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « public/web/WebBeginFrameArgs.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
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/WebRect.h" 36 #include "../platform/WebRect.h"
37 #include "../platform/WebSize.h" 37 #include "../platform/WebSize.h"
38 #include "WebBeginFrameArgs.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
42 namespace blink { 43 namespace blink {
43 44
44 class WebCompositeAndReadbackAsyncCallback; 45 class WebCompositeAndReadbackAsyncCallback;
45 class WebInputEvent; 46 class WebInputEvent;
46 class WebLayerTreeView; 47 class WebLayerTreeView;
47 class WebMouseEvent; 48 class WebMouseEvent;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Called to notify the WebWidget of entering/exiting fullscreen mode. The 82 // Called to notify the WebWidget of entering/exiting fullscreen mode. The
82 // resize method may be called between will{Enter,Exit}FullScreen and 83 // resize method may be called between will{Enter,Exit}FullScreen and
83 // did{Enter,Exit}FullScreen. 84 // did{Enter,Exit}FullScreen.
84 virtual void willEnterFullScreen() { } 85 virtual void willEnterFullScreen() { }
85 virtual void didEnterFullScreen() { } 86 virtual void didEnterFullScreen() { }
86 virtual void willExitFullScreen() { } 87 virtual void willExitFullScreen() { }
87 virtual void didExitFullScreen() { } 88 virtual void didExitFullScreen() { }
88 89
89 // Called to update imperative animation state. This should be called before 90 // Called to update imperative animation state. This should be called before
90 // paint, although the client can rate-limit these calls. 91 // paint, although the client can rate-limit these calls.
91 virtual void animate(double monotonicFrameBeginTime) { } 92 // FIXME: Remove this function once Chrome side patch lands.
93 void animate(double monotonicFrameBeginTime)
94 {
95 beginFrame(WebBeginFrameArgs(monotonicFrameBeginTime));
96 }
97 virtual void beginFrame(const WebBeginFrameArgs& frameTime) { }
92 98
93 // Called to layout the WebWidget. This MUST be called before Paint, 99 // Called to layout the WebWidget. This MUST be called before Paint,
94 // and it may result in calls to WebWidgetClient::didInvalidateRect. 100 // and it may result in calls to WebWidgetClient::didInvalidateRect.
95 virtual void layout() { } 101 virtual void layout() { }
96 102
97 // Called to paint the rectangular region within the WebWidget 103 // Called to paint the rectangular region within the WebWidget
98 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call 104 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call
99 // Layout before calling this method. It is okay to call paint 105 // Layout before calling this method. It is okay to call paint
100 // multiple times once layout has been called, assuming no other 106 // multiple times once layout has been called, assuming no other
101 // changes are made to the WebWidget (e.g., once events are 107 // changes are made to the WebWidget (e.g., once events are
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // content. 249 // content.
244 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } 250 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ }
245 251
246 protected: 252 protected:
247 ~WebWidget() { } 253 ~WebWidget() { }
248 }; 254 };
249 255
250 } // namespace blink 256 } // namespace blink
251 257
252 #endif 258 #endif
OLDNEW
« no previous file with comments | « public/web/WebBeginFrameArgs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698