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

Side by Side Diff: ui/gfx/compositor/layer_animation_manager.cc

Issue 8341022: Fix OnLayerAnimationEnded notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698