OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 "platform/animation/WebToCCAnimationDelegateAdapter.h" |
| 6 |
| 7 #include "public/platform/WebCompositorAnimationDelegate.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( |
| 12 blink::WebCompositorAnimationDelegate* delegate) |
| 13 : m_delegate(delegate) |
| 14 { |
| 15 } |
| 16 |
| 17 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( |
| 18 base::TimeTicks monotonicTime, |
| 19 cc::Animation::TargetProperty targetProperty, |
| 20 int group) |
| 21 { |
| 22 m_delegate->notifyAnimationStarted( |
| 23 (monotonicTime - base::TimeTicks()).InSecondsF(), |
| 24 group); |
| 25 } |
| 26 |
| 27 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( |
| 28 base::TimeTicks monotonicTime, |
| 29 cc::Animation::TargetProperty targetProperty, |
| 30 int group) |
| 31 { |
| 32 m_delegate->notifyAnimationFinished( |
| 33 (monotonicTime - base::TimeTicks()).InSecondsF(), |
| 34 group); |
| 35 } |
| 36 |
| 37 void WebToCCAnimationDelegateAdapter::NotifyAnimationAborted( |
| 38 base::TimeTicks monotonicTime, |
| 39 cc::Animation::TargetProperty targetProperty, |
| 40 int group) |
| 41 { |
| 42 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).InSec
ondsF(), group); |
| 43 } |
| 44 |
| 45 } // namespace blink |
OLD | NEW |