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

Side by Side Diff: Source/web/PageWidgetDelegate.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: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 static inline FrameView* mainFrameView(Page* page) 50 static inline FrameView* mainFrameView(Page* page)
51 { 51 {
52 if (!page) 52 if (!page)
53 return 0; 53 return 0;
54 // FIXME: Can we remove this check? 54 // FIXME: Can we remove this check?
55 if (!page->mainFrame()) 55 if (!page->mainFrame())
56 return 0; 56 return 0;
57 return page->mainFrame()->view(); 57 return page->mainFrame()->view();
58 } 58 }
59 59
60 void PageWidgetDelegate::animate(Page* page, double monotonicFrameBeginTime) 60 void PageWidgetDelegate::animate(Page* page, WebFrameTime frameTime)
61 { 61 {
62 RefPtr<FrameView> view = mainFrameView(page); 62 RefPtr<FrameView> view = mainFrameView(page);
63 if (!view) 63 if (!view)
64 return; 64 return;
65 page->autoscrollController().animate(monotonicFrameBeginTime); 65 page->autoscrollController().animate(frameTime);
66 page->animator().serviceScriptedAnimations(monotonicFrameBeginTime); 66 page->animator().serviceScriptedAnimations(frameTime.frameTime());
67 } 67 }
68 68
69 void PageWidgetDelegate::layout(Page* page) 69 void PageWidgetDelegate::layout(Page* page)
70 { 70 {
71 if (!page || !page->mainFrame()) 71 if (!page || !page->mainFrame())
72 return; 72 return;
73 page->animator().updateLayoutAndStyleForPainting(); 73 page->animator().updateLayoutAndStyleForPainting();
74 } 74 }
75 75
76 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background) 76 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas* canvas, const WebRect& rect, CanvasBackground background)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 { 202 {
203 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event)); 203 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event));
204 } 204 }
205 205
206 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo uchEvent& event) 206 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo uchEvent& event)
207 { 207 {
208 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event)); 208 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event));
209 } 209 }
210 210
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698