| 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" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 CompositorAnimationPlayer::CompositorAnimationPlayer() | 14 CompositorAnimationPlayer::CompositorAnimationPlayer() |
| 15 : m_animationPlayer(cc::AnimationPlayer::Create(cc::AnimationIdProvider::Nex
tPlayerId())) | 15 : m_animationPlayer(cc::AnimationPlayer::Create(cc::AnimationIdProvider::Nex
tPlayerId())) |
| 16 , m_delegate() |
| 16 { | 17 { |
| 17 } | 18 } |
| 18 | 19 |
| 19 CompositorAnimationPlayer::~CompositorAnimationPlayer() | 20 CompositorAnimationPlayer::~CompositorAnimationPlayer() |
| 20 { | 21 { |
| 21 } | 22 } |
| 22 | 23 |
| 23 cc::AnimationPlayer* CompositorAnimationPlayer::animationPlayer() const | 24 cc::AnimationPlayer* CompositorAnimationPlayer::animationPlayer() const |
| 24 { | 25 { |
| 25 return m_animationPlayer.get(); | 26 return m_animationPlayer.get(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void CompositorAnimationPlayer::NotifyAnimationAborted( | 89 void CompositorAnimationPlayer::NotifyAnimationAborted( |
| 89 base::TimeTicks monotonicTime, | 90 base::TimeTicks monotonicTime, |
| 90 cc::Animation::TargetProperty targetProperty, | 91 cc::Animation::TargetProperty targetProperty, |
| 91 int group) | 92 int group) |
| 92 { | 93 { |
| 93 ASSERT(m_delegate); | 94 ASSERT(m_delegate); |
| 94 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).InSec
ondsF(), group); | 95 m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).InSec
ondsF(), group); |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace blink | 98 } // namespace blink |
| OLD | NEW |