| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "cc/animation/layer_animation_event_observer.h" | 18 #include "cc/animation/layer_animation_event_observer.h" |
| 19 #include "ui/compositor/compositor_export.h" | 19 #include "ui/compositor/compositor_export.h" |
| 20 #include "ui/compositor/layer_animation_element.h" | 20 #include "ui/compositor/layer_animation_element.h" |
| 21 #include "ui/compositor/layer_threaded_animation_delegate.h" | 21 #include "ui/compositor/layer_threaded_animation_delegate.h" |
| 22 #include "ui/gfx/animation/tween.h" | 22 #include "ui/gfx/animation/tween.h" |
| 23 | 23 |
| 24 namespace cc { | 24 namespace cc { |
| 25 class Animation; | 25 class Animation; |
| 26 class AnimationPlayer; | 26 class AnimationPlayer; |
| 27 class AnimationTimeline; | 27 class AnimationTimeline; |
| 28 class Layer; | 28 class Layer; |
| 29 class LayerAnimationController; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace gfx { | 32 namespace gfx { |
| 32 class Animation; | 33 class Animation; |
| 33 class Rect; | 34 class Rect; |
| 34 class Transform; | 35 class Transform; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace ui { | 38 namespace ui { |
| 38 class Compositor; | 39 class Compositor; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 bool disable_timer_for_test_; | 385 bool disable_timer_for_test_; |
| 385 | 386 |
| 386 // Prevents timer adjustments in case when we start multiple animations | 387 // Prevents timer adjustments in case when we start multiple animations |
| 387 // with preemption strategies that discard previous animations. | 388 // with preemption strategies that discard previous animations. |
| 388 bool adding_animations_; | 389 bool adding_animations_; |
| 389 | 390 |
| 390 // Observers are notified when layer animations end, are scheduled or are | 391 // Observers are notified when layer animations end, are scheduled or are |
| 391 // aborted. | 392 // aborted. |
| 392 base::ObserverList<LayerAnimationObserver> observers_; | 393 base::ObserverList<LayerAnimationObserver> observers_; |
| 393 | 394 |
| 395 // We store a state of LayerAnimationController here to save it in |
| 396 // ResetCompositor/SetCompositor scope. |
| 397 // TODO(loyso): Remove it. crbug.com/592873. |
| 398 scoped_refptr<cc::LayerAnimationController> animation_controller_state_; |
| 399 |
| 394 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 400 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
| 395 }; | 401 }; |
| 396 | 402 |
| 397 } // namespace ui | 403 } // namespace ui |
| 398 | 404 |
| 399 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ | 405 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ |
| OLD | NEW |