Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: cc/blink/web_to_cc_animation_delegate_adapter.cc

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix copyrights and years. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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::Animation::TargetProperty target_property,
18 int group) { 18 int group) {
19 delegate_->notifyAnimationStarted( 19 delegate_->notifyAnimationStarted(
20 (monotonic_time - base::TimeTicks()).InSecondsF(), 20 (monotonic_time - base::TimeTicks()).InSecondsF(), group);
21 #if WEB_COMPOSITOR_ANIMATION_DELEGATE_TAKES_GROUP
22 group);
23 #else
24 static_cast<blink::WebCompositorAnimation::TargetProperty>(
25 target_property));
26 #endif
27 } 21 }
28 22
29 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( 23 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
30 base::TimeTicks monotonic_time, 24 base::TimeTicks monotonic_time,
31 cc::Animation::TargetProperty target_property, 25 cc::Animation::TargetProperty target_property,
32 int group) { 26 int group) {
33 delegate_->notifyAnimationFinished( 27 delegate_->notifyAnimationFinished(
34 (monotonic_time - base::TimeTicks()).InSecondsF(), 28 (monotonic_time - base::TimeTicks()).InSecondsF(), group);
35 #if WEB_COMPOSITOR_ANIMATION_DELEGATE_TAKES_GROUP
36 group);
37 #else
38 static_cast<blink::WebCompositorAnimation::TargetProperty>(
39 target_property));
40 #endif
41 } 29 }
42 30
43 void WebToCCAnimationDelegateAdapter::NotifyAnimationAborted( 31 void WebToCCAnimationDelegateAdapter::NotifyAnimationAborted(
44 base::TimeTicks monotonic_time, 32 base::TimeTicks monotonic_time,
45 cc::Animation::TargetProperty target_property, 33 cc::Animation::TargetProperty target_property,
46 int group) { 34 int group) {
47 delegate_->notifyAnimationAborted( 35 delegate_->notifyAnimationAborted(
48 (monotonic_time - base::TimeTicks()).InSecondsF(), group); 36 (monotonic_time - base::TimeTicks()).InSecondsF(), group);
49 } 37 }
50 38
51 } // namespace cc_blink 39 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_scroll_offset_animation_curve_impl.cc ('k') | cc/blink/web_transform_animation_curve_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698