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

Unified Diff: ui/gfx/animation/animation_test_api.h

Issue 2976873003: Added a nested class to gfx::Animation (Closed)
Patch Set: Created 3 years, 5 months 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/gfx/animation/animation_test_api.h
diff --git a/ui/gfx/animation/animation_test_api.h b/ui/gfx/animation/animation_test_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..07aa01d5c7ef3dbf79a72860c9562f6b02d580d7
--- /dev/null
+++ b/ui/gfx/animation/animation_test_api.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_ANIMATION_ANIMATION_TEST_API_H_
+#define UI_GFX_ANIMATION_ANIMATION_TEST_API_H_
+
+#include "ui/gfx/animation/animation.h"
+
+namespace gfx {
+
+// Class to provide access to Animation internals for testing.
+class ANIMATION_EXPORT Animation::AnimationTestApi {
+ public:
+ explicit AnimationTestApi(Animation* animation);
+ ~AnimationTestApi();
+
+ // Sets the start of the animation.
+ void SetStartTime(base::TimeTicks ticks);
+
+ // Manually steps the animation forward
+ void Step(base::TimeTicks ticks);
+
+ private:
+ Animation* animation_;
+
+ DISALLOW_COPY_AND_ASSIGN(AnimationTestApi);
+};
+
+} // namespace gfx
+
+#endif // UI_GFX_ANIMATION_ANIMATION_TEST_API_H_

Powered by Google App Engine
This is Rietveld 408576698