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

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

Issue 1890243002: Expand the Material Design hover as it fades out when a ripple is triggered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Optimized InkDropHover::AnimateFade() to not trigger a transformation animation if not required. Created 4 years, 8 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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // is visible. 67 // is visible.
68 bool IsHoverFadingInOrVisible() const; 68 bool IsHoverFadingInOrVisible() const;
69 69
70 // views::InkDropAnimationObserver: 70 // views::InkDropAnimationObserver:
71 void InkDropAnimationStarted(InkDropState ink_drop_state) override; 71 void InkDropAnimationStarted(InkDropState ink_drop_state) override;
72 void InkDropAnimationEnded(InkDropState ink_drop_state, 72 void InkDropAnimationEnded(InkDropState ink_drop_state,
73 InkDropAnimationEndedReason reason) override; 73 InkDropAnimationEndedReason reason) override;
74 74
75 // Enables or disables the hover state based on |is_hovered| and if an 75 // Enables or disables the hover state based on |is_hovered| and if an
76 // animation is triggered it will be scheduled to have the given 76 // animation is triggered it will be scheduled to have the given
77 // |animation_duration|. 77 // |animation_duration|. If |explode| is true the hover will expand as it
78 void SetHoveredInternal(bool is_hovered, base::TimeDelta animation_duration); 78 // fades out. |explode| is ignored when |is_hovered| is true.
79 void SetHoveredInternal(bool is_hovered,
80 base::TimeDelta animation_duration,
81 bool explode);
79 82
80 // Starts the |hover_after_animation_timer_| timer. This will stop the current 83 // Starts the |hover_after_animation_timer_| timer. This will stop the current
81 // |hover_after_animation_timer_| instance if it exists. 84 // |hover_after_animation_timer_| instance if it exists.
82 void StartHoverAfterAnimationTimer(); 85 void StartHoverAfterAnimationTimer();
83 86
84 // Stops and destroys the current |hover_after_animation_timer_| instance. 87 // Stops and destroys the current |hover_after_animation_timer_| instance.
85 void StopHoverAfterAnimationTimer(); 88 void StopHoverAfterAnimationTimer();
86 89
87 // Callback for when the |hover_after_animation_timer_| fires. 90 // Callback for when the |hover_after_animation_timer_| fires.
88 void HoverAfterAnimationTimerFired(); 91 void HoverAfterAnimationTimerFired();
(...skipping 20 matching lines...) Expand all
109 112
110 // The timer used to delay the hover fade in after an ink drop animation. 113 // The timer used to delay the hover fade in after an ink drop animation.
111 std::unique_ptr<base::Timer> hover_after_animation_timer_; 114 std::unique_ptr<base::Timer> hover_after_animation_timer_;
112 115
113 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl); 116 DISALLOW_COPY_AND_ASSIGN(InkDropAnimationControllerImpl);
114 }; 117 };
115 118
116 } // namespace views 119 } // namespace views
117 120
118 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_IMPL_H_ 121 #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