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

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

Issue 1944043002: Enabled tests to control material design ink drop animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Replaced unique_ptr with scoped_ptr. 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 1df74c2fc5adc27046fbc4c172f8f826015da127..e6bd62715008a60db01790f645fe3a10947f400a 100644
--- a/ui/views/animation/ink_drop_hover.h
+++ b/ui/views/animation/ink_drop_hover.h
@@ -21,6 +21,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
@@ -31,7 +35,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; }
@@ -49,7 +53,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