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

Side by Side Diff: webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc

Issue 11191068: Remove WTF::currentTime() / WTF::monotonicallyIncreasingTime() uses from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/compositor_bindings/web_to_ccinput_handler_adapter.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 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "web_to_ccinput_handler_adapter.h" 7 #include "web_to_ccinput_handler_adapter.h"
8 8
9 #include "cc/stubs/int_point.h" 9 #include "cc/stubs/int_point.h"
10 #include "cc/stubs/int_size.h" 10 #include "cc/stubs/int_size.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 virtual void pinchGestureEnd() OVERRIDE 75 virtual void pinchGestureEnd() OVERRIDE
76 { 76 {
77 m_client->pinchGestureEnd(); 77 m_client->pinchGestureEnd();
78 } 78 }
79 79
80 virtual void startPageScaleAnimation(WebSize targetPosition, 80 virtual void startPageScaleAnimation(WebSize targetPosition,
81 bool anchorPoint, 81 bool anchorPoint,
82 float pageScale, 82 float pageScale,
83 double startTime, 83 double startTimeSec,
84 double duration) OVERRIDE 84 double durationSec) OVERRIDE
85 { 85 {
86 base::TimeTicks startTime = base::TimeTicks::FromInternalValue(startTime Sec * base::Time::kMicrosecondsPerSecond);
87 base::TimeDelta duration = base::TimeDelta::FromMicroseconds(durationSec * base::Time::kMicrosecondsPerSecond);
86 m_client->startPageScaleAnimation(convert(targetPosition), anchorPoint, pageScale, startTime, duration); 88 m_client->startPageScaleAnimation(convert(targetPosition), anchorPoint, pageScale, startTime, duration);
87 } 89 }
88 90
89 virtual void scheduleAnimation() OVERRIDE 91 virtual void scheduleAnimation() OVERRIDE
90 { 92 {
91 m_client->scheduleAnimation(); 93 m_client->scheduleAnimation();
92 } 94 }
93 95
94 private: 96 private:
95 cc::InputHandlerClient* m_client; 97 cc::InputHandlerClient* m_client;
96 }; 98 };
97 99
98 100
99 void WebToCCInputHandlerAdapter::bindToClient(cc::InputHandlerClient* client) 101 void WebToCCInputHandlerAdapter::bindToClient(cc::InputHandlerClient* client)
100 { 102 {
101 m_clientAdapter.reset(new ClientAdapter(client)); 103 m_clientAdapter.reset(new ClientAdapter(client));
102 m_handler->bindToClient(m_clientAdapter.get()); 104 m_handler->bindToClient(m_clientAdapter.get());
103 } 105 }
104 106
105 void WebToCCInputHandlerAdapter::animate(double monotonicTime) 107 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time)
106 { 108 {
107 m_handler->animate(monotonicTime); 109 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF();
110 m_handler->animate(monotonicTimeSeconds);
108 } 111 }
109 112
110 } 113 }
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_to_ccinput_handler_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698