| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "sky/viewer/cc/web_to_cc_animation_delegate_adapter.h" | |
| 6 #include "sky/engine/public/platform/WebCompositorAnimationDelegate.h" | |
| 7 | |
| 8 namespace sky_viewer_cc { | |
| 9 | |
| 10 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( | |
| 11 blink::WebCompositorAnimationDelegate* delegate) | |
| 12 : delegate_(delegate) { | |
| 13 } | |
| 14 | |
| 15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( | |
| 16 base::TimeTicks monotonic_time, | |
| 17 cc::Animation::TargetProperty target_property, | |
| 18 int group) { | |
| 19 delegate_->notifyAnimationStarted( | |
| 20 (monotonic_time - base::TimeTicks()).InSecondsF(), | |
| 21 static_cast<blink::WebCompositorAnimation::TargetProperty>( | |
| 22 target_property)); | |
| 23 } | |
| 24 | |
| 25 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( | |
| 26 base::TimeTicks monotonic_time, | |
| 27 cc::Animation::TargetProperty target_property, | |
| 28 int group) { | |
| 29 delegate_->notifyAnimationFinished( | |
| 30 (monotonic_time - base::TimeTicks()).InSecondsF(), | |
| 31 static_cast<blink::WebCompositorAnimation::TargetProperty>( | |
| 32 target_property)); | |
| 33 } | |
| 34 | |
| 35 } // namespace sky_viewer_cc | |
| OLD | NEW |