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

Unified Diff: ui/views/animation/ink_drop_animation_controller_impl.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: Fixed merge with master. 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/ink_drop_animation_controller_impl.h
diff --git a/ui/views/animation/ink_drop_animation_controller_impl.h b/ui/views/animation/ink_drop_animation_controller_impl.h
index 4aede40cddab3c14727cca1ad4b9d8d72da712a4..5ca25633ba16cb6687e34b07ac96af79fdb7ad75 100644
--- a/ui/views/animation/ink_drop_animation_controller_impl.h
+++ b/ui/views/animation/ink_drop_animation_controller_impl.h
@@ -9,6 +9,7 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/animation/ink_drop_animation_controller.h"
+#include "ui/views/animation/ink_drop_animation_observer.h"
#include "ui/views/views_export.h"
namespace views {
@@ -17,7 +18,8 @@ class InkDropHost;
// A functional implementation of an InkDropAnimationController.
class VIEWS_EXPORT InkDropAnimationControllerImpl
- : public InkDropAnimationController {
+ : public InkDropAnimationController,
+ public InkDropAnimationObserver {
public:
// Constructs an ink drop controller that will attach the ink drop to the
// given |ink_drop_host|.
@@ -26,7 +28,7 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl
// InkDropAnimationController:
InkDropState GetInkDropState() const override;
- void AnimateToState(InkDropState state) override;
+ void AnimateToState(InkDropState ink_drop_state) override;
gfx::Size GetInkDropLargeSize() const override;
void SetInkDropSize(const gfx::Size& large_size,
int large_corner_radius,
@@ -36,10 +38,18 @@ class VIEWS_EXPORT InkDropAnimationControllerImpl
private:
// Creates a new InkDropAnimation and sets it to |ink_drop_animation_|. If
- // |ink_drop_animation_| wasn't null then it will be removed from the
- // |ink_drop_host_|.
+ // |ink_drop_animation_| wasn't null then it will be destroyed using
+ // DestroyInkDropAnimation().
void CreateInkDropAnimation();
+ // Destroys the current |ink_drop_animation_|.
+ void DestroyInkDropAnimation();
+
+ // views::InkDropAnimationObserver:
+ void InkDropAnimationStarted(InkDropState ink_drop_state) override;
+ void InkDropAnimationEnded(InkDropState ink_drop_state,
+ InkDropAnimationEndedReason reason) override;
+
// The host of the ink drop.
InkDropHost* ink_drop_host_;
« no previous file with comments | « ui/views/animation/ink_drop_animation_controller.h ('k') | ui/views/animation/ink_drop_animation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698