| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "platform/animation/CompositorAnimationPlayer.h" | 5 #include "platform/animation/CompositorAnimationPlayer.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_id_provider.h" | 7 #include "cc/animation/animation_id_provider.h" |
| 8 #include "platform/animation/CompositorAnimation.h" | 8 #include "platform/animation/CompositorAnimation.h" |
| 9 #include "public/platform/WebCompositorAnimationDelegate.h" | 9 #include "public/platform/WebCompositorAnimationDelegate.h" |
| 10 #include "public/platform/WebLayer.h" | 10 #include "public/platform/WebLayer.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void CompositorAnimationPlayer::abortAnimation(int animationId) | 65 void CompositorAnimationPlayer::abortAnimation(int animationId) |
| 66 { | 66 { |
| 67 m_animationPlayer->AbortAnimation(animationId); | 67 m_animationPlayer->AbortAnimation(animationId); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void CompositorAnimationPlayer::NotifyAnimationStarted( | 70 void CompositorAnimationPlayer::NotifyAnimationStarted( |
| 71 base::TimeTicks monotonicTime, | 71 base::TimeTicks monotonicTime, |
| 72 cc::Animation::TargetProperty targetProperty, | 72 cc::Animation::TargetProperty targetProperty, |
| 73 int group) | 73 int group) |
| 74 { | 74 { |
| 75 ASSERT(m_delegate); | 75 if (m_delegate) |
| 76 m_delegate->notifyAnimationStarted((monotonicTime - base::TimeTicks()).InSec
ondsF(), group); | 76 m_delegate->notifyAnimationStarted((monotonicTime - base::TimeTicks()).I
nSecondsF(), group); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void CompositorAnimationPlayer::NotifyAnimationFinished( | 79 void CompositorAnimationPlayer::NotifyAnimationFinished( |
| 80 base::TimeTicks monotonicTime, | 80 base::TimeTicks monotonicTime, |
| 81 cc::Animation::TargetProperty targetProperty, | 81 cc::Animation::TargetProperty targetProperty, |
| 82 int group) | 82 int group) |
| 83 { | 83 { |
| 84 ASSERT(m_delegate); | 84 if (m_delegate) |
| 85 m_delegate->notifyAnimationFinished((monotonicTime - base::TimeTicks()).InSe
condsF(), group); | 85 m_delegate->notifyAnimationFinished((monotonicTime - base::TimeTicks()).
InSecondsF(), group); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void CompositorAnimationPlayer::NotifyAnimationAborted( | 88 void CompositorAnimationPlayer::NotifyAnimationAborted( |
| 89 base::TimeTicks monotonicTime, | 89 base::TimeTicks monotonicTime, |
| 90 cc::Animation::TargetProperty targetProperty, | 90 cc::Animation::TargetProperty targetProperty, |
| 91 int group) | 91 int group) |
| 92 { | 92 { |
| 93 ASSERT(m_delegate); | 93 if (m_delegate) |
| 94 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).InSec
ondsF(), group); | 94 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).I
nSecondsF(), group); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |