| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/gfx/compositor/layer_animation_manager.h" | 5 #include "ui/gfx/compositor/layer_animation_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "ui/base/animation/animation_container.h" | 9 #include "ui/base/animation/animation_container.h" |
| 10 #include "ui/base/animation/animation.h" | 10 #include "ui/base/animation/animation.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 default: | 165 default: |
| 166 NOTREACHED(); | 166 NOTREACHED(); |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 layer_->ScheduleDraw(); | 169 layer_->ScheduleDraw(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 void LayerAnimationManager::AnimationEnded(const ui::Animation* animation) { | 172 void LayerAnimationManager::AnimationEnded(const ui::Animation* animation) { |
| 173 AnimationProgressed(animation); | 173 AnimationProgressed(animation); |
| 174 if (layer_->delegate()) |
| 175 layer_->delegate()->OnLayerAnimationEnded(animation); |
| 174 } | 176 } |
| 175 | 177 |
| 176 void LayerAnimationManager::StopAnimating(AnimationProperty property) { | 178 void LayerAnimationManager::StopAnimating(AnimationProperty property) { |
| 177 if (!IsAnimating(property)) | 179 if (!IsAnimating(property)) |
| 178 return; | 180 return; |
| 179 | 181 |
| 180 elements_.erase(property); | 182 elements_.erase(property); |
| 181 } | 183 } |
| 182 | 184 |
| 183 LayerAnimatorDelegate* LayerAnimationManager::delegate() { | 185 LayerAnimatorDelegate* LayerAnimationManager::delegate() { |
| 184 return static_cast<LayerAnimatorDelegate*>(layer_); | 186 return static_cast<LayerAnimatorDelegate*>(layer_); |
| 185 } | 187 } |
| 186 | 188 |
| 187 } // namespace ui | 189 } // namespace ui |
| OLD | NEW |