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 "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adap
ter.h" | 5 #include "cc/blink/web_to_cc_animation_delegate_adapter.h" |
6 | 6 |
7 namespace content { | 7 namespace cc_blink { |
8 | 8 |
9 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( | 9 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( |
10 blink::WebCompositorAnimationDelegate* delegate) | 10 blink::WebCompositorAnimationDelegate* delegate) |
11 : delegate_(delegate) { | 11 : delegate_(delegate) { |
12 } | 12 } |
13 | 13 |
14 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( | 14 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted( |
15 base::TimeTicks monotonic_time, | 15 base::TimeTicks monotonic_time, |
16 cc::Animation::TargetProperty target_property) { | 16 cc::Animation::TargetProperty target_property) { |
17 delegate_->notifyAnimationStarted( | 17 delegate_->notifyAnimationStarted( |
18 (monotonic_time - base::TimeTicks()).InSecondsF(), | 18 (monotonic_time - base::TimeTicks()).InSecondsF(), |
19 static_cast<blink::WebCompositorAnimation::TargetProperty>( | 19 static_cast<blink::WebCompositorAnimation::TargetProperty>( |
20 target_property)); | 20 target_property)); |
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::Animation::TargetProperty target_property) { |
26 delegate_->notifyAnimationFinished( | 26 delegate_->notifyAnimationFinished( |
27 (monotonic_time - base::TimeTicks()).InSecondsF(), | 27 (monotonic_time - base::TimeTicks()).InSecondsF(), |
28 static_cast<blink::WebCompositorAnimation::TargetProperty>( | 28 static_cast<blink::WebCompositorAnimation::TargetProperty>( |
29 target_property)); | 29 target_property)); |
30 } | 30 } |
31 | 31 |
32 } // namespace content | 32 } // namespace cc_blink |
33 | |
OLD | NEW |