OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "cc/blink/web_to_cc_animation_delegate_adapter.h" | 5 #include "cc/blink/web_to_cc_animation_delegate_adapter.h" |
6 #include "third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h" | 6 #include "third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h" |
7 | 7 |
8 namespace cc_blink { | 8 namespace cc_blink { |
9 | 9 |
10 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( | 10 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( |
11 blink::WebCompositorAnimationDelegate* delegate) | 11 blink::WebCompositorAnimationDelegate* delegate) |
12 : delegate_(delegate) { | 12 : delegate_(delegate) { |
13 } | 13 } |
14 | 14 |
15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( | 15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( |
16 base::TimeTicks monotonic_time, | 16 base::TimeTicks monotonic_time, |
17 cc::Animation::TargetProperty target_property, | 17 cc::AnimationTargetProperty target_property, |
18 int group) { | 18 int group) { |
19 delegate_->notifyAnimationStarted( | 19 delegate_->notifyAnimationStarted( |
20 (monotonic_time - base::TimeTicks()).InSecondsF(), group); | 20 (monotonic_time - base::TimeTicks()).InSecondsF(), group); |
21 } | 21 } |
22 | 22 |
23 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( | 23 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( |
24 base::TimeTicks monotonic_time, | 24 base::TimeTicks monotonic_time, |
25 cc::Animation::TargetProperty target_property, | 25 cc::AnimationTargetProperty target_property, |
26 int group) { | 26 int group) { |
27 delegate_->notifyAnimationFinished( | 27 delegate_->notifyAnimationFinished( |
28 (monotonic_time - base::TimeTicks()).InSecondsF(), group); | 28 (monotonic_time - base::TimeTicks()).InSecondsF(), group); |
29 } | 29 } |
30 | 30 |
31 void WebToCCAnimationDelegateAdapter::NotifyAnimationAborted( | 31 void WebToCCAnimationDelegateAdapter::NotifyAnimationAborted( |
32 base::TimeTicks monotonic_time, | 32 base::TimeTicks monotonic_time, |
33 cc::Animation::TargetProperty target_property, | 33 cc::AnimationTargetProperty target_property, |
34 int group) { | 34 int group) { |
35 delegate_->notifyAnimationAborted( | 35 delegate_->notifyAnimationAborted( |
36 (monotonic_time - base::TimeTicks()).InSecondsF(), group); | 36 (monotonic_time - base::TimeTicks()).InSecondsF(), group); |
37 } | 37 } |
38 | 38 |
39 } // namespace cc_blink | 39 } // namespace cc_blink |
OLD | NEW |