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

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

Issue 2533053002: Handle view resize for ripple (Closed)
Patch Set: Created 4 years, 1 month 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/flood_fill_ink_drop_ripple.h
diff --git a/ui/views/animation/flood_fill_ink_drop_ripple.h b/ui/views/animation/flood_fill_ink_drop_ripple.h
index 2088677d6f4833da07d3cefb1525392ec9d8787d..858e032a285caaafd749b9bebea36f5b5c1aca2d 100644
--- a/ui/views/animation/flood_fill_ink_drop_ripple.h
+++ b/ui/views/animation/flood_fill_ink_drop_ripple.h
@@ -14,6 +14,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/gfx/animation/tween.h"
+#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/transform.h"
@@ -48,13 +49,15 @@ class FloodFillInkDropRippleTestApi;
//
class VIEWS_EXPORT FloodFillInkDropRipple : public InkDropRipple {
public:
- FloodFillInkDropRipple(const gfx::Rect& clip_bounds,
+ FloodFillInkDropRipple(const gfx::Size& host_size,
+ const gfx::Insets& clip_insets,
const gfx::Point& center_point,
SkColor color,
float visible_opacity);
~FloodFillInkDropRipple() override;
// InkDropRipple:
+ void HostSizeChanged(const gfx::Size& new_size) override;
void SnapToActivated() override;
ui::Layer* GetRootLayer() override;
@@ -105,6 +108,9 @@ class VIEWS_EXPORT FloodFillInkDropRipple : public InkDropRipple {
// |root_layer_| bounds.
float MaxDistanceToCorners(const gfx::Point& point) const;
+ // Insets of the clip area relative to the host bounds.
+ gfx::Insets clip_insets_;
+
// The point where the Center of the ink drop's circle should be drawn.
gfx::Point center_point_;

Powered by Google App Engine
This is Rietveld 408576698