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.
5 #include "cc/blink/web_to_cc_animation_delegate_adapter.h"
6 #include "third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h"
10 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter(
11 blink::WebCompositorAnimationDelegate
* delegate
)
12 : delegate_(delegate
) {
15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(
16 base::TimeTicks monotonic_time
,
17 cc::Animation::TargetProperty target_property
,
19 delegate_
->notifyAnimationStarted(
20 (monotonic_time
- base::TimeTicks()).InSecondsF(),
21 #if WEB_COMPOSITOR_ANIMATION_DELEGATE_TAKES_GROUP
24 static_cast<blink::WebCompositorAnimation::TargetProperty
>(
29 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
30 base::TimeTicks monotonic_time
,
31 cc::Animation::TargetProperty target_property
,
33 delegate_
->notifyAnimationFinished(
34 (monotonic_time
- base::TimeTicks()).InSecondsF(),
35 #if WEB_COMPOSITOR_ANIMATION_DELEGATE_TAKES_GROUP
38 static_cast<blink::WebCompositorAnimation::TargetProperty
>(
43 } // namespace cc_blink