Index: ui/base/animation/animation_container.h |
diff --git a/ui/base/animation/animation_container.h b/ui/base/animation/animation_container.h |
index 89f6392392402fbc8151fb4165d5e59c366d86ac..ad4d7a94361ab017b9ee7d4fcff2750ba58e98b5 100644 |
--- a/ui/base/animation/animation_container.h |
+++ b/ui/base/animation/animation_container.h |
@@ -17,6 +17,10 @@ namespace ui { |
class AnimationContainerElement; |
class AnimationContainerObserver; |
+namespace test { |
+class AnimationContainerTestHelper; |
+} |
+ |
// AnimationContainer is used by Animation to manage the underlying timer. |
// Internally each Animation creates a single AnimationContainer. You can |
// group a set of Animations into the same AnimationContainer by way of |
@@ -41,6 +45,9 @@ class UI_EXPORT AnimationContainer |
// directly. |
void Stop(AnimationContainerElement* animation); |
+ // Returns current time. |
+ base::TimeTicks GetCurrentTime(); |
+ |
void set_observer(AnimationContainerObserver* observer) { |
observer_ = observer; |
} |
@@ -53,6 +60,7 @@ class UI_EXPORT AnimationContainer |
private: |
friend class base::RefCounted<AnimationContainer>; |
+ friend class test::AnimationContainerTestHelper; |
typedef std::set<AnimationContainerElement*> Elements; |
@@ -83,6 +91,13 @@ class UI_EXPORT AnimationContainer |
AnimationContainerObserver* observer_; |
+ // Used for testing : indicates that "Time" is controlled by |
+ // AnimationContainerTestHelper. |
+ bool test_timing_enabled_; |
+ |
+ // Current time for tests. |
+ base::TimeTicks test_time_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AnimationContainer); |
}; |