Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapt er.h" | 5 #include "webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapt er.h" |
| 6 | 6 |
| 7 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h" | 7 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h" |
| 8 | 8 |
| 9 namespace webkit { | 9 namespace webkit { |
| 10 | 10 |
| 11 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( | 11 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( |
| 12 blink::WebAnimationDelegate* delegate) | 12 blink::WebAnimationDelegate* delegate) |
| 13 : delegate_(delegate) {} | 13 : delegate_(delegate) {} |
| 14 | 14 |
| 15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( | 15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( |
| 16 double wall_clock_time, | 16 double wall_clock_time, |
| 17 base::TimeTicks monotonic_time, | 17 base::TimeTicks monotonic_time, |
| 18 cc::Animation::TargetProperty target_property) { | 18 cc::Animation::TargetProperty target_property) { |
| 19 delegate_->notifyAnimationStarted( | 19 delegate_->notifyAnimationStarted( |
|
ajuma
2014/03/03 15:26:04
Suggestion: Do this CL first, using an #ifdef so t
| |
| 20 wall_clock_time, | |
| 21 (monotonic_time - base::TimeTicks()).InSecondsF(), | 20 (monotonic_time - base::TimeTicks()).InSecondsF(), |
| 22 static_cast<blink::WebAnimation::TargetProperty>(target_property)); | 21 static_cast<blink::WebAnimation::TargetProperty>(target_property)); |
| 23 } | 22 } |
| 24 | 23 |
| 25 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( | 24 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( |
| 26 double wall_clock_time, | 25 double wall_clock_time, |
| 27 base::TimeTicks monotonic_time, | 26 base::TimeTicks monotonic_time, |
| 28 cc::Animation::TargetProperty target_property) { | 27 cc::Animation::TargetProperty target_property) { |
| 29 delegate_->notifyAnimationFinished( | 28 delegate_->notifyAnimationFinished( |
| 30 wall_clock_time, | |
| 31 (monotonic_time - base::TimeTicks()).InSecondsF(), | 29 (monotonic_time - base::TimeTicks()).InSecondsF(), |
| 32 static_cast<blink::WebAnimation::TargetProperty>(target_property)); | 30 static_cast<blink::WebAnimation::TargetProperty>(target_property)); |
| 33 } | 31 } |
| 34 | 32 |
| 35 } // namespace webkit | 33 } // namespace webkit |
| OLD | NEW |