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

Side by Side Diff: Source/web/WebViewImpl.cpp

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 | « Source/web/WebViewImpl.h ('k') | public/web/WebBeginFrameArgs.h » ('j') | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 #include "public/platform/Platform.h" 112 #include "public/platform/Platform.h"
113 #include "public/platform/WebDragData.h" 113 #include "public/platform/WebDragData.h"
114 #include "public/platform/WebFloatPoint.h" 114 #include "public/platform/WebFloatPoint.h"
115 #include "public/platform/WebGestureCurve.h" 115 #include "public/platform/WebGestureCurve.h"
116 #include "public/platform/WebImage.h" 116 #include "public/platform/WebImage.h"
117 #include "public/platform/WebLayerTreeView.h" 117 #include "public/platform/WebLayerTreeView.h"
118 #include "public/platform/WebVector.h" 118 #include "public/platform/WebVector.h"
119 #include "public/web/WebAXObject.h" 119 #include "public/web/WebAXObject.h"
120 #include "public/web/WebActiveWheelFlingParameters.h" 120 #include "public/web/WebActiveWheelFlingParameters.h"
121 #include "public/web/WebAutofillClient.h" 121 #include "public/web/WebAutofillClient.h"
122 #include "public/web/WebBeginFrameArgs.h"
122 #include "public/web/WebFrameClient.h" 123 #include "public/web/WebFrameClient.h"
123 #include "public/web/WebHitTestResult.h" 124 #include "public/web/WebHitTestResult.h"
124 #include "public/web/WebInputElement.h" 125 #include "public/web/WebInputElement.h"
125 #include "public/web/WebMediaPlayerAction.h" 126 #include "public/web/WebMediaPlayerAction.h"
126 #include "public/web/WebNode.h" 127 #include "public/web/WebNode.h"
127 #include "public/web/WebPlugin.h" 128 #include "public/web/WebPlugin.h"
128 #include "public/web/WebPluginAction.h" 129 #include "public/web/WebPluginAction.h"
129 #include "public/web/WebRange.h" 130 #include "public/web/WebRange.h"
130 #include "public/web/WebTextInputInfo.h" 131 #include "public/web/WebTextInputInfo.h"
131 #include "public/web/WebViewClient.h" 132 #include "public/web/WebViewClient.h"
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 void WebViewImpl::willExitFullScreen() 1694 void WebViewImpl::willExitFullScreen()
1694 { 1695 {
1695 m_fullscreenController->willExitFullScreen(); 1696 m_fullscreenController->willExitFullScreen();
1696 } 1697 }
1697 1698
1698 void WebViewImpl::didExitFullScreen() 1699 void WebViewImpl::didExitFullScreen()
1699 { 1700 {
1700 m_fullscreenController->didExitFullScreen(); 1701 m_fullscreenController->didExitFullScreen();
1701 } 1702 }
1702 1703
1703 void WebViewImpl::animate(double monotonicFrameBeginTime) 1704 void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime)
1704 { 1705 {
1705 TRACE_EVENT0("blink", "WebViewImpl::animate"); 1706 TRACE_EVENT0("blink", "WebViewImpl::beginFrame");
1706 1707
1708 double monotonicFrameBeginTime = frameTime.lastFrameTimeMonotonic;
1707 if (!monotonicFrameBeginTime) 1709 if (!monotonicFrameBeginTime)
1708 monotonicFrameBeginTime = monotonicallyIncreasingTime(); 1710 monotonicFrameBeginTime = monotonicallyIncreasingTime();
1709 1711
1710 // Create synthetic wheel events as necessary for fling. 1712 // Create synthetic wheel events as necessary for fling.
1711 if (m_gestureAnimation) { 1713 if (m_gestureAnimation) {
1712 if (m_gestureAnimation->animate(monotonicFrameBeginTime)) 1714 if (m_gestureAnimation->animate(monotonicFrameBeginTime))
1713 scheduleAnimation(); 1715 scheduleAnimation();
1714 else { 1716 else {
1715 endActiveFlingAnimation(); 1717 endActiveFlingAnimation();
1716 1718
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after
4214 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4216 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4215 4217
4216 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4218 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4217 return false; 4219 return false;
4218 4220
4219 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4221 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4220 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4222 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4221 } 4223 }
4222 4224
4223 } // namespace blink 4225 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebBeginFrameArgs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698