| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/test/animation_test_common.h" | 5 #include "cc/test/animation_test_common.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
| 9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
| 10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 FakeTransformTransition::FakeTransformTransition(double duration) | 152 FakeTransformTransition::FakeTransformTransition(double duration) |
| 153 : duration_(base::TimeDelta::FromSecondsD(duration)) { | 153 : duration_(base::TimeDelta::FromSecondsD(duration)) { |
| 154 } | 154 } |
| 155 | 155 |
| 156 FakeTransformTransition::~FakeTransformTransition() {} | 156 FakeTransformTransition::~FakeTransformTransition() {} |
| 157 | 157 |
| 158 base::TimeDelta FakeTransformTransition::Duration() const { | 158 base::TimeDelta FakeTransformTransition::Duration() const { |
| 159 return duration_; | 159 return duration_; |
| 160 } | 160 } |
| 161 | 161 |
| 162 gfx::Transform FakeTransformTransition::GetValue(base::TimeDelta time) const { | 162 TransformOperations FakeTransformTransition::GetValue( |
| 163 return gfx::Transform(); | 163 base::TimeDelta time) const { |
| 164 return TransformOperations(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 bool FakeTransformTransition::AnimatedBoundsForBox(const gfx::BoxF& box, | 167 bool FakeTransformTransition::AnimatedBoundsForBox(const gfx::BoxF& box, |
| 167 gfx::BoxF* bounds) const { | 168 gfx::BoxF* bounds) const { |
| 168 return false; | 169 return false; |
| 169 } | 170 } |
| 170 | 171 |
| 171 bool FakeTransformTransition::IsTranslation() const { return true; } | 172 bool FakeTransformTransition::IsTranslation() const { return true; } |
| 172 | 173 |
| 173 bool FakeTransformTransition::PreservesAxisAlignment() const { | 174 bool FakeTransformTransition::PreservesAxisAlignment() const { |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 scoped_refptr<AnimationPlayer> player = | 395 scoped_refptr<AnimationPlayer> player = |
| 395 AnimationPlayer::Create(AnimationIdProvider::NextPlayerId()); | 396 AnimationPlayer::Create(AnimationIdProvider::NextPlayerId()); |
| 396 timeline->AttachPlayer(player); | 397 timeline->AttachPlayer(player); |
| 397 player->AttachElement(element_id); | 398 player->AttachElement(element_id); |
| 398 DCHECK(player->element_animations()); | 399 DCHECK(player->element_animations()); |
| 399 return AddOpacityTransitionToPlayer(player.get(), duration, start_opacity, | 400 return AddOpacityTransitionToPlayer(player.get(), duration, start_opacity, |
| 400 end_opacity, use_timing_function); | 401 end_opacity, use_timing_function); |
| 401 } | 402 } |
| 402 | 403 |
| 403 } // namespace cc | 404 } // namespace cc |
| OLD | NEW |