#ifndef UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_RIPPLE_OBSERVER_H_
#define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_RIPPLE_OBSERVER_H_
#include "base/memory/raw_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/animation/ink_drop_ripple_observer.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/animation/test/test_ink_drop_animation_observer_helper.h"
namespace views {
class InkDropRipple;
namespace test {
class TestInkDropRippleObserver
: public InkDropRippleObserver,
public TestInkDropAnimationObserverHelper<InkDropState> {
public:
TestInkDropRippleObserver();
TestInkDropRippleObserver(const TestInkDropRippleObserver&) = delete;
TestInkDropRippleObserver& operator=(const TestInkDropRippleObserver&) =
delete;
~TestInkDropRippleObserver() override;
void set_ink_drop_ripple(InkDropRipple* ink_drop_ripple) {
ink_drop_ripple_ = ink_drop_ripple;
}
InkDropState target_state_at_last_animation_started() const {
return target_state_at_last_animation_started_;
}
InkDropState target_state_at_last_animation_ended() const {
return target_state_at_last_animation_ended_;
}
void AnimationStarted(InkDropState ink_drop_state) override;
void AnimationEnded(InkDropState ink_drop_state,
InkDropAnimationEndedReason reason) override;
private:
using ObserverHelper = TestInkDropAnimationObserverHelper<InkDropState>;
InkDropState target_state_at_last_animation_started_ = InkDropState::HIDDEN;
InkDropState target_state_at_last_animation_ended_ = InkDropState::HIDDEN;
raw_ptr<InkDropRipple> ink_drop_ripple_ = nullptr;
};
}
}
#endif