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

Side by Side Diff: ui/views/animation/ink_drop_animation_observer.h

Issue 1373983002: Enhanced the InkDropRippleImpl to create/destroy InkDropAnimations as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Based diff delta on dependant branch. Created 5 years, 2 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 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698