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

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

Issue 2041033002: Moved ButtonInkDropDelegate logic into InkDropHostView and deleted InkDropDelegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge conflict in custom_button.cc 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
« no previous file with comments | « ui/views/animation/button_ink_drop_delegate.cc ('k') | ui/views/animation/ink_drop_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_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"
(...skipping 13 matching lines...) Expand all
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 InkDrop { 27 class VIEWS_EXPORT InkDrop {
28 public: 28 public:
29 virtual ~InkDrop() {} 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
35 // HIDDEN.
36 virtual bool IsVisible() const = 0;
37
38 // Animates from the current InkDropState to |ink_drop_state|. 34 // Animates from the current InkDropState to |ink_drop_state|.
39 virtual void AnimateToState(InkDropState ink_drop_state) = 0; 35 virtual void AnimateToState(InkDropState ink_drop_state) = 0;
40 36
41 // Immediately snaps the InkDropState to ACTIVATED. This more specific 37 // Immediately snaps the InkDropState to ACTIVATED. This more specific
42 // implementation of the non-existent SnapToState(InkDropState) function is 38 // implementation of the non-existent SnapToState(InkDropState) function is
43 // the only one available because it was the only InkDropState that clients 39 // the only one available because it was the only InkDropState that clients
44 // needed to skip animations for. 40 // needed to skip animations for.
45 virtual void SnapToActivated() = 0; 41 virtual void SnapToActivated() = 0;
46 42
47 // Enables or disables the hover state. 43 // Enables or disables the hover state.
48 virtual void SetHovered(bool is_hovered) = 0; 44 virtual void SetHovered(bool is_hovered) = 0;
49 45
50 // Enables or disables the focus state. 46 // Enables or disables the focus state.
51 virtual void SetFocused(bool is_focused) = 0; 47 virtual void SetFocused(bool is_focused) = 0;
52 48
53 protected: 49 protected:
54 InkDrop() {} 50 InkDrop() {}
55 51
56 private: 52 private:
57 DISALLOW_COPY_AND_ASSIGN(InkDrop); 53 DISALLOW_COPY_AND_ASSIGN(InkDrop);
58 }; 54 };
59 55
60 } // namespace views 56 } // namespace views
61 57
62 #endif // UI_VIEWS_ANIMATION_INK_DROP_H_ 58 #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_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698