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

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

Issue 2034963002: Rename InkDropHover to InkDropHighlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gyp file 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_HIGHLIGHT_OBSERVER_H_
6 #define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HIGHLIGHT_OBSERVER_H_
7
8 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/views/animation/ink_drop_highlight.h"
11 #include "ui/views/animation/ink_drop_highlight_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 InkDropHighlightObserver test double that tracks if
19 // InkDropHighlightObserver methods are invoked and the parameters used for the
20 // last invocation.
21 class TestInkDropHighlightObserver : public InkDropHighlightObserver,
22 public TestInkDropAnimationObserverHelper<
23 InkDropHighlight::AnimationType> {
24 public:
25 TestInkDropHighlightObserver();
26 ~TestInkDropHighlightObserver() override = default;
27
28 void set_ink_drop_highlight(InkDropHighlight* ink_drop_highlight) {
29 ink_drop_highlight_ = ink_drop_highlight;
30 }
31
32 // InkDropHighlightObserver:
33 void AnimationStarted(
34 InkDropHighlight::AnimationType animation_type) override;
35 void AnimationEnded(InkDropHighlight::AnimationType animation_type,
36 InkDropAnimationEndedReason reason) override;
37
38 private:
39 // The type this inherits from. Reduces verbosity in .cc file.
40 using ObserverHelper =
41 TestInkDropAnimationObserverHelper<InkDropHighlight::AnimationType>;
42
43 // An InkDropHighlight to spy info from when notifications are handled.
44 InkDropHighlight* ink_drop_highlight_ = nullptr;
45
46 DISALLOW_COPY_AND_ASSIGN(TestInkDropHighlightObserver);
47 };
48
49 } // namespace test
50 } // namespace views
51
52 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HIGHLIGHT_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/views/animation/test/ink_drop_utils.cc ('k') | ui/views/animation/test/test_ink_drop_highlight_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698