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

Unified Diff: ui/views/animation/ink_drop_animation_controller.h

Issue 1298513003: Implemented prototype for new ink drop specs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from patch set 10. Created 5 years, 3 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.h
diff --git a/ui/views/animation/ink_drop_animation_controller.h b/ui/views/animation/ink_drop_animation_controller.h
index 57266822bac045a9f5d86f3bea140b6c4f98bf04..4e1cbd10db61d774d984f23a771c4c0a7a0cec75 100644
--- a/ui/views/animation/ink_drop_animation_controller.h
+++ b/ui/views/animation/ink_drop_animation_controller.h
@@ -19,29 +19,32 @@ class Layer;
}
namespace views {
-class AppearAnimationObserver;
-class InkDropDelegate;
-class InkDropHost;
-class View;
-// Base class for an ink drop animation which is hosted by an InkDropHost.
+// Pure virtual base class that manages an ink drop animation's lifetime and
+// state.
class VIEWS_EXPORT InkDropAnimationController {
public:
- InkDropAnimationController() {}
virtual ~InkDropAnimationController() {}
+ // Gets the current state of the ink drop.
+ virtual InkDropState GetInkDropState() const = 0;
+
// Animates from the current InkDropState to |state|.
virtual void AnimateToState(InkDropState state) = 0;
- // Sets the size of the ink drop.
- virtual void SetInkDropSize(const gfx::Size& size) = 0;
+ virtual gfx::Size GetInkDropLargeSize() const = 0;
- // Returns the ink drop bounds.
- virtual gfx::Rect GetInkDropBounds() const = 0;
+ // Sets the different sizes of the ink drop.
+ virtual void SetInkDropSize(const gfx::Size& large_size,
+ int large_corner_radius,
+ const gfx::Size& small_size,
+ int small_corner_radius) = 0;
- // Sets the bounds for the ink drop. |bounds| are in the coordinate space of
- // the parent ui::Layer that the ink drop layer is added to.
- virtual void SetInkDropBounds(const gfx::Rect& bounds) = 0;
+ // Sets the |center_point| of the ink drop relative to its parent Layer.
+ virtual void SetInkDropCenter(const gfx::Point& center_point) = 0;
+
+ protected:
+ InkDropAnimationController() {}
private:
DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController);
« no previous file with comments | « ui/views/animation/ink_drop_animation.cc ('k') | ui/views/animation/ink_drop_animation_controller_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698