Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/layer_animator_collection.h" | 5 #include "ui/compositor/layer_animator_collection.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "ui/compositor/compositor.h" | 10 #include "ui/compositor/compositor.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 iter != list.end(); | 50 iter != list.end(); |
| 51 ++iter) { | 51 ++iter) { |
| 52 // Make sure the animator is still valid. | 52 // Make sure the animator is still valid. |
| 53 if (animators_.count(*iter) > 0) | 53 if (animators_.count(*iter) > 0) |
| 54 (*iter)->Step(now); | 54 (*iter)->Step(now); |
| 55 } | 55 } |
| 56 if (!HasActiveAnimators() && compositor_) | 56 if (!HasActiveAnimators() && compositor_) |
| 57 compositor_->RemoveAnimationObserver(this); | 57 compositor_->RemoveAnimationObserver(this); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void LayerAnimatorCollection::OnCompositingShuttingDown( | |
| 61 Compositor* compositor) { | |
| 62 if (compositor_ && compositor_->HasAnimationObserver(this)) { | |
|
ajuma
2015/05/29 21:57:10
Is HasAnimationObserver necessary here? The call t
| |
| 63 compositor_->RemoveAnimationObserver(this); | |
| 64 } | |
| 65 compositor_ = nullptr; | |
| 66 } | |
| 67 | |
| 60 } // namespace ui | 68 } // namespace ui |
| OLD | NEW |