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

Side by Side Diff: ui/views/animation/test/test_ink_drop_hover_observer.h

Issue 2034963002: Rename InkDropHover to InkDropHighlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative patchset Created 4 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_
6 #define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_
7
8 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/views/animation/ink_drop_hover.h"
11 #include "ui/views/animation/ink_drop_hover_observer.h"
12 #include "ui/views/animation/ink_drop_state.h"
13 #include "ui/views/animation/test/test_ink_drop_animation_observer_helper.h"
14
15 namespace views {
16 namespace test {
17
18 // Simple InkDropHoverObserver test double that tracks if InkDropHoverObserver
19 // methods are invoked and the parameters used for the last invocation.
20 class TestInkDropHoverObserver
21 : public InkDropHoverObserver,
22 public TestInkDropAnimationObserverHelper<InkDropHover::AnimationType> {
23 public:
24 TestInkDropHoverObserver();
25 ~TestInkDropHoverObserver() override = default;
26
27 void set_ink_drop_hover(InkDropHover* ink_drop_hover) {
28 ink_drop_hover_ = ink_drop_hover;
29 }
30
31 // InkDropHoverObserver:
32 void AnimationStarted(InkDropHover::AnimationType animation_type) override;
33 void AnimationEnded(InkDropHover::AnimationType animation_type,
34 InkDropAnimationEndedReason reason) override;
35
36 private:
37 // The type this inherits from. Reduces verbosity in .cc file.
38 using ObserverHelper =
39 TestInkDropAnimationObserverHelper<InkDropHover::AnimationType>;
40
41 // An InkDropHover to spy info from when notifications are handled.
42 InkDropHover* ink_drop_hover_ = nullptr;
43
44 DISALLOW_COPY_AND_ASSIGN(TestInkDropHoverObserver);
45 };
46
47 } // namespace test
48 } // namespace views
49
50 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698