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

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

Issue 1913243002: Enabled tests to control material design ink drop animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/ink_drop_hover.h
diff --git a/ui/views/animation/ink_drop_hover.h b/ui/views/animation/ink_drop_hover.h
index b65f28a2ca8d7866ace0bc2b171e152fd211995e..cda24243de02254516cf3f65ebc99a916de3e1f8 100644
--- a/ui/views/animation/ink_drop_hover.h
+++ b/ui/views/animation/ink_drop_hover.h
@@ -22,6 +22,10 @@ class CallbackLayerAnimationObserver;
} // namespace ui
namespace views {
+namespace test {
+class InkDropHoverTestApi;
+} // namespace test
+
class RoundedRectangleLayerDelegate;
// Manages fade in/out animations for a painted Layer that is used to provide
@@ -32,7 +36,7 @@ class VIEWS_EXPORT InkDropHover {
int corner_radius,
const gfx::Point& center_point,
SkColor color);
- ~InkDropHover();
+ virtual ~InkDropHover();
void set_explode_size(const gfx::Size& size) { explode_size_ = size; }
@@ -50,7 +54,14 @@ class VIEWS_EXPORT InkDropHover {
// The root Layer that can be added in to a Layer tree.
ui::Layer* layer() { return layer_.get(); }
+ // Returns a test api to access internals of this. Default implmentations
+ // should return nullptr and test specific subclasses can override to return
+ // an instance.
+ virtual test::InkDropHoverTestApi* GetTestApi();
+
private:
+ friend class test::InkDropHoverTestApi;
+
enum HoverAnimationType { FADE_IN, FADE_OUT };
// Animates a fade in/out as specified by |animation_type| combined with a
« no previous file with comments | « ui/views/animation/ink_drop_animation_controller_impl_unittest.cc ('k') | ui/views/animation/ink_drop_hover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698