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

Unified Diff: ui/base/animation/animation_container.h

Issue 11453012: Fix black background when locking with fullscreen window: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add fix for shutdown cut-off timing Created 8 years 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 side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698