| 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 "ash/test/test_session_state_animator.h" | 5 #include "ash/test/test_session_state_animator.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 if (sequence_aborted_) | 56 if (sequence_aborted_) |
| 57 OnAnimationAborted(); | 57 OnAnimationAborted(); |
| 58 else | 58 else |
| 59 OnAnimationCompleted(); | 59 OnAnimationCompleted(); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 // ash::SessionStateAnimator::AnimationSequence: | 63 // ash::SessionStateAnimator::AnimationSequence: |
| 64 virtual void StartAnimation(int container_mask, | 64 virtual void StartAnimation(int container_mask, |
| 65 AnimationType type, | 65 AnimationType type, |
| 66 AnimationSpeed speed) OVERRIDE { | 66 AnimationSpeed speed) override { |
| 67 animator_->StartAnimationInSequence(container_mask, type, speed, this); | 67 animator_->StartAnimationInSequence(container_mask, type, speed, this); |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 // Tracks the number of contained animations. | 71 // Tracks the number of contained animations. |
| 72 int sequence_count_; | 72 int sequence_count_; |
| 73 | 73 |
| 74 // True if the sequence was aborted. | 74 // True if the sequence was aborted. |
| 75 bool sequence_aborted_; | 75 bool sequence_aborted_; |
| 76 | 76 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 while (animation_iter != (*container_iter).second.end()) { | 295 while (animation_iter != (*container_iter).second.end()) { |
| 296 ActiveAnimation active_animation = *animation_iter; | 296 ActiveAnimation active_animation = *animation_iter; |
| 297 active_animation.failed_callback.Run(); | 297 active_animation.failed_callback.Run(); |
| 298 animation_iter = (*container_iter).second.erase(animation_iter); | 298 animation_iter = (*container_iter).second.erase(animation_iter); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace test | 303 } // namespace test |
| 304 } // namespace ash | 304 } // namespace ash |
| OLD | NEW |