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

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

Issue 1897073002: Add MD Ink Drop Layers to InkDropHost only when a ripple/hover is active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some more tests. Created 4 years, 7 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 // TODO(bruthig) Document me.
19 class TestInkDropHoverObserver
20 : public InkDropHoverObserver,
21 public TestInkDropAnimationObserverHelper<InkDropHover::AnimationType> {
22 public:
23 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
24 ~TestInkDropHoverObserver() override;
25
26 void set_ink_drop_hover(InkDropHover* ink_drop_hover) {
27 ink_drop_hover_ = ink_drop_hover;
28 }
29
30 // InkDropAnimationObserver:
31 void AnimationStarted(InkDropHover::AnimationType animation_type) override;
32 void AnimationEnded(InkDropHover::AnimationType animation_type,
33 InkDropAnimationEndedReason reason) override;
34
35 private:
36 // The type this inherits from. Reduces verbosity in .cc file.
37 using ObserverHelper =
38 TestInkDropAnimationObserverHelper<InkDropHover::AnimationType>;
39
40 // An InkDropHover to spy info from when notifications are handled.
41 InkDropHover* ink_drop_hover_;
42
43 DISALLOW_COPY_AND_ASSIGN(TestInkDropHoverObserver);
44 };
45
46 } // namespace test
47 } // namespace views
48
49 #endif // UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOVER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698