OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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_INK_DROP_ANIMATION_OBSERVER_H_ | |
6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_OBSERVER_H_ | |
7 | |
8 #include <iosfwd> | |
9 | |
10 #include "base/macros.h" | |
11 #include "ui/views/animation/ink_drop_state.h" | |
12 #include "ui/views/views_export.h" | |
13 | |
14 namespace views { | |
15 | |
16 // Pure-virtual base class of an observer that can be attached to | |
17 // InkDropAnimations. | |
18 class VIEWS_EXPORT InkDropAnimationObserver { | |
19 public: | |
20 // Enumeration of the different reasons why an InkDropAnimation has finished. | |
21 enum InkDropAnimationEndedReason { | |
22 // The animation was completed successfully. | |
23 SUCCESS, | |
24 // The animation was stopped pre-maturely before reaching it's final state. | |
varkha
2015/10/06 20:58:38
nit: s/pre-maturely/prematurely ; s/it's/its
bruthig
2015/10/08 21:42:55
Done.
| |
25 PRE_EMPTED | |
26 }; | |
27 | |
28 // Notifies the observer that an animation for |ink_drop_state| has started. | |
29 virtual void InkDropAnimationStarted(InkDropState ink_drop_state) = 0; | |
30 | |
31 // Notifies the observer that an animation for |ink_drop_state| has finished | |
32 // and the reason for completion is given by |reason|. If |reason| is SUCCESS | |
33 // then the animation has progressed to it's final frame however if |reason| | |
varkha
2015/10/06 20:58:38
nit: here and below - s/it's/its.
bruthig
2015/10/08 21:42:55
Done.
| |
34 // is |PRE_EMPTED| then the animation was stopped before it's final frame. | |
sadrul
2015/10/08 01:06:01
Is it possible to start the animation for one stat
bruthig
2015/10/08 21:42:55
Done.
| |
35 virtual void InkDropAnimationEnded(InkDropState ink_drop_state, | |
36 InkDropAnimationEndedReason reason) = 0; | |
37 | |
38 protected: | |
39 InkDropAnimationObserver() {} | |
40 virtual ~InkDropAnimationObserver() {} | |
41 | |
42 private: | |
43 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationObserver); | |
44 }; | |
45 | |
46 VIEWS_EXPORT std::ostream& operator<<( | |
sadrul
2015/10/08 01:06:01
Is this actually useful/necessary?
bruthig
2015/10/08 21:42:55
Replaced with a ToString().
| |
47 std::ostream& out, | |
48 InkDropAnimationObserver::InkDropAnimationEndedReason reason); | |
49 | |
50 } // namespace views | |
51 | |
52 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_OBSERVER_H_ | |
OLD | NEW |