Chromium Code Reviews| Index: ui/views/animation/test/test_ink_drop_hover_observer.h |
| diff --git a/ui/views/animation/test/test_ink_drop_hover_observer.h b/ui/views/animation/test/test_ink_drop_hover_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fd425a22cd52e66af9443c913cb8d171d67ec30c |
| --- /dev/null |
| +++ b/ui/views/animation/test/test_ink_drop_hover_observer.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2016 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_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_ |
| +#define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| +#include "ui/views/animation/ink_drop_hover.h" |
| +#include "ui/views/animation/ink_drop_hover_observer.h" |
| +#include "ui/views/animation/ink_drop_state.h" |
| +#include "ui/views/animation/test/test_ink_drop_animation_observer_helper.h" |
| + |
| +namespace views { |
| +namespace test { |
| + |
| +// TODO(bruthig) Document me. |
| +class TestInkDropHoverObserver |
| + : public InkDropHoverObserver, |
| + public TestInkDropAnimationObserverHelper<InkDropHover::AnimationType> { |
| + public: |
| + TestInkDropHoverObserver(); |
|
varkha
2016/04/28 20:35:00
= default for ctor / dtor?
bruthig
2016/04/29 11:02:35
I was able to do this for the dtor but the ctor co
|
| + ~TestInkDropHoverObserver() override; |
| + |
| + void set_ink_drop_hover(InkDropHover* ink_drop_hover) { |
| + ink_drop_hover_ = ink_drop_hover; |
| + } |
| + |
| + // InkDropAnimationObserver: |
| + void AnimationStarted(InkDropHover::AnimationType animation_type) override; |
| + void AnimationEnded(InkDropHover::AnimationType animation_type, |
| + InkDropAnimationEndedReason reason) override; |
| + |
| + private: |
| + // The type this inherits from. Reduces verbosity in .cc file. |
| + using ObserverHelper = |
| + TestInkDropAnimationObserverHelper<InkDropHover::AnimationType>; |
| + |
| + // An InkDropHover to spy info from when notifications are handled. |
| + InkDropHover* ink_drop_hover_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TestInkDropHoverObserver); |
| +}; |
| + |
| +} // namespace test |
| +} // namespace views |
| + |
| +#endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_ |