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

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

Issue 1937353002: Rename of InkDropAnimationController classes to InkDrop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed tdanderson@ comments from patch set 2. 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "ui/compositor/layer_tree_owner.h" 12 #include "ui/compositor/layer_tree_owner.h"
13 #include "ui/events/event_handler.h" 13 #include "ui/events/event_handler.h"
14 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
16 #include "ui/views/animation/ink_drop_state.h" 16 #include "ui/views/animation/ink_drop_state.h"
17 #include "ui/views/views_export.h" 17 #include "ui/views/views_export.h"
18 18
19 namespace ui { 19 namespace ui {
20 class Layer; 20 class Layer;
21 } 21 }
22 22
23 namespace views { 23 namespace views {
24 24
25 // Pure virtual base class that manages the lifetime and state of an ink drop 25 // Pure virtual base class that manages the lifetime and state of an ink drop
26 // ripple as well as visual hover state feedback. 26 // ripple as well as visual hover state feedback.
27 class VIEWS_EXPORT InkDropAnimationController { 27 class VIEWS_EXPORT InkDrop {
28 public: 28 public:
29 virtual ~InkDropAnimationController() {} 29 virtual ~InkDrop() {}
30 30
31 // Gets the target state of the ink drop. 31 // Gets the target state of the ink drop.
32 virtual InkDropState GetTargetInkDropState() const = 0; 32 virtual InkDropState GetTargetInkDropState() const = 0;
33 33
34 // Returns true when the ripple is visible, including when animating to 34 // Returns true when the ripple is visible, including when animating to
35 // HIDDEN. 35 // HIDDEN.
36 virtual bool IsVisible() const = 0; 36 virtual bool IsVisible() const = 0;
37 37
38 // Animates from the current InkDropState to |ink_drop_state|. 38 // Animates from the current InkDropState to |ink_drop_state|.
39 virtual void AnimateToState(InkDropState ink_drop_state) = 0; 39 virtual void AnimateToState(InkDropState ink_drop_state) = 0;
40 40
41 // Immediately snaps the InkDropState to ACTIVATED. This more specific 41 // Immediately snaps the InkDropState to ACTIVATED. This more specific
42 // implementation of the non-existent SnapToState(InkDropState) function is 42 // implementation of the non-existent SnapToState(InkDropState) function is
43 // the only one available because it was the only InkDropState that clients 43 // the only one available because it was the only InkDropState that clients
44 // needed to skip animations for. 44 // needed to skip animations for.
45 virtual void SnapToActivated() = 0; 45 virtual void SnapToActivated() = 0;
46 46
47 // Enables or disables the hover state. 47 // Enables or disables the hover state.
48 virtual void SetHovered(bool is_hovered) = 0; 48 virtual void SetHovered(bool is_hovered) = 0;
49 49
50 protected: 50 protected:
51 InkDropAnimationController() {} 51 InkDrop() {}
52 52
53 private: 53 private:
54 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); 54 DISALLOW_COPY_AND_ASSIGN(InkDrop);
55 }; 55 };
56 56
57 } // namespace views 57 } // namespace views
58 58
59 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ 59 #endif // UI_VIEWS_ANIMATION_INK_DROP_H_
OLDNEW
« no previous file with comments | « ui/views/animation/button_ink_drop_delegate.cc ('k') | ui/views/animation/ink_drop_animation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698