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

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

Issue 1924663007: Expand the Material Design hover as it fades out when a ripple is triggered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_animation_controller_impl.cc » ('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_ANIMATION_CONTROLLER_IMPL_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // is visible. 66 // is visible.
67 bool IsHoverFadingInOrVisible() const; 67 bool IsHoverFadingInOrVisible() const;
68 68
69 // views::InkDropAnimationObserver: 69 // views::InkDropAnimationObserver:
70 void InkDropAnimationStarted(InkDropState ink_drop_state) override; 70 void InkDropAnimationStarted(InkDropState ink_drop_state) override;
71 void InkDropAnimationEnded(InkDropState ink_drop_state, 71 void InkDropAnimationEnded(InkDropState ink_drop_state,
72 InkDropAnimationEndedReason reason) override; 72 InkDropAnimationEndedReason reason) override;
73 73
74 // Enables or disables the hover state based on |is_hovered| and if an 74 // Enables or disables the hover state based on |is_hovered| and if an
75 // animation is triggered it will be scheduled to have the given 75 // animation is triggered it will be scheduled to have the given
76 // |animation_duration|. 76 // |animation_duration|. If |explode| is true the hover will expand as it
77 void SetHoveredInternal(bool is_hovered, base::TimeDelta animation_duration); 77 // fades out. |explode| is ignored when |is_hovered| is true.
78 void SetHoveredInternal(bool is_hovered,
79 base::TimeDelta animation_duration,
80 bool explode);
78 81
79 // Starts the |hover_after_animation_timer_| timer. This will stop the current 82 // Starts the |hover_after_animation_timer_| timer. This will stop the current
80 // |hover_after_animation_timer_| instance if it exists. 83 // |hover_after_animation_timer_| instance if it exists.
81 void StartHoverAfterAnimationTimer(); 84 void StartHoverAfterAnimationTimer();
82 85
83 // Stops and destroys the current |hover_after_animation_timer_| instance. 86 // Stops and destroys the current |hover_after_animation_timer_| instance.
84 void StopHoverAfterAnimationTimer(); 87 void StopHoverAfterAnimationTimer();
85 88
86 // Callback for when the |hover_after_animation_timer_| fires. 89 // Callback for when the |hover_after_animation_timer_| fires.
87 void HoverAfterAnimationTimerFired(); 90 void HoverAfterAnimationTimerFired();
(...skipping 20 matching lines...) Expand all
108 111
109 // The timer used to delay the hover fade in after an ink drop animation. 112 // The timer used to delay the hover fade in after an ink drop animation.
110 scoped_ptr<base::Timer> hover_after_animation_timer_; 113 scoped_ptr<base::Timer> hover_after_animation_timer_;
111 114
112 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); 115 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl);
113 }; 116 };
114 117
115 } // namespace views 118 } // namespace views
116 119
117 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ 120 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_animation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698