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

Unified Diff: ui/views/animation/test/ink_drop_animation_test_api.h

Issue 1495753002: Make the material design ripple effect more visible on a quick action (single click or single tap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests and addressed comments from previous patch sets. Created 4 years, 11 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/views/animation/test/ink_drop_animation_test_api.h
diff --git a/ui/views/animation/test/ink_drop_animation_test_api.h b/ui/views/animation/test/ink_drop_animation_test_api.h
index 61c38528437c4d252fc2dd1ae03eb7d6c7b340fc..5c71e9f6e8f9126cfc6402920c4b35c1b7df3b24 100644
--- a/ui/views/animation/test/ink_drop_animation_test_api.h
+++ b/ui/views/animation/test/ink_drop_animation_test_api.h
@@ -5,9 +5,15 @@
#ifndef UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_TEST_API_H_
#define UI_VIEWS_ANIMATION_TEST_INK_DROP_ANIMATION_TEST_API_H_
+#include <vector>
+
#include "base/macros.h"
#include "ui/gfx/geometry/size.h"
+namespace ui {
+class LayerAnimator;
+} // namespace ui
+
namespace views {
class InkDropAnimation;
@@ -22,7 +28,17 @@ class InkDropAnimationTestApi {
explicit InkDropAnimationTestApi(InkDropAnimation* ink_drop_animation);
~InkDropAnimationTestApi();
+ // Disables the animation timers when |disable_timers| is true. This
+ void SetDisableAnimationTimers(bool disable_timers);
+
+ // Returns true if any animations are active.
+ bool HasActiveAnimations() const;
+
+ // Completes all animations for all the Layer's owned by the InkDropAnimation.
+ void CompleteAnimations();
+
// Wrapper functions the wrapped InkDropedAnimation:
+ float GetCurrentOpacity() const;
void CalculateCircleTransforms(const gfx::Size& size,
InkDropTransforms* transforms_out) const;
void CalculateRectTransforms(const gfx::Size& size,
@@ -30,6 +46,16 @@ class InkDropAnimationTestApi {
InkDropTransforms* transforms_out) const;
private:
+ // Progresses all running LayerAnimationSequences by the given |duration|.
+ // NOTE: This function will NOT progress LayerAnimationSequences that are
+ // queued, only the running ones will be progressed.
+ void StepAnimations(const base::TimeDelta& duration);
+
+ // Get a list of all the LayerAnimator's used internally by the
+ // InkDropAnimation.
+ std::vector<ui::LayerAnimator*> GetLayerAnimators();
+ std::vector<ui::LayerAnimator*> GetLayerAnimators() const;
+
// The InkDropAnimation to provide internal access to.
InkDropAnimation* ink_drop_animation_;

Powered by Google App Engine
This is Rietveld 408576698