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

Unified 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: Rebasing onto master. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« public/platform/WebFrameTime.h ('K') | « public/platform/WebFrameTime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebWidget.h
diff --git a/public/web/WebWidget.h b/public/web/WebWidget.h
index 54b00f3506d41f3f114ebfb022abf5ac6b577916..785513e9e46e2b313d7c581ccad39f63b366854a 100644
--- a/public/web/WebWidget.h
+++ b/public/web/WebWidget.h
@@ -33,12 +33,15 @@
#include "../platform/WebCanvas.h"
#include "../platform/WebCommon.h"
+#include "../platform/WebFrameTime.h"
#include "../platform/WebRect.h"
#include "../platform/WebSize.h"
#include "WebCompositionUnderline.h"
#include "WebTextDirection.h"
#include "WebTextInputInfo.h"
+#include <limits>
+
namespace blink {
class WebCompositeAndReadbackAsyncCallback;
@@ -88,7 +91,17 @@ public:
// Called to update imperative animation state. This should be called before
// paint, although the client can rate-limit these calls.
- virtual void animate(double monotonicFrameBeginTime) { }
+ // FIXME(mithro): Remove this function once Chrome side patch lands.
+ void animate(double monotonicFrameBeginTime)
+ {
+ animate(
+ WebFrameTime(
+ monotonicFrameBeginTime,
+ std::numeric_limits<double>::infinity(),
+ monotonicFrameBeginTime,
+ monotonicFrameBeginTime + 0.016666));
+ }
+ virtual void animate(WebFrameTime frameTime) { }
// Called to layout the WebWidget. This MUST be called before Paint,
// and it may result in calls to WebWidgetClient::didInvalidateRect.
« public/platform/WebFrameTime.h ('K') | « public/platform/WebFrameTime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698