Index: ui/views/animation/ink_drop_delegate.h |
diff --git a/ui/views/animation/ink_drop_delegate.h b/ui/views/animation/ink_drop_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..692928641b7fedf281ac0058debec34be87038ef |
--- /dev/null |
+++ b/ui/views/animation/ink_drop_delegate.h |
@@ -0,0 +1,59 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ |
+#define UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/views/views_export.h" |
+ |
+namespace ui { |
+class GestureEvent; |
+class Event; |
+} // namespace ui |
+ |
+namespace views { |
+ |
+// Ink ripple animation delegate that starts and stops animations based on |
+// View states and events. |
+class VIEWS_EXPORT InkDropDelegate { |
+ public: |
+ InkDropDelegate() {} |
+ virtual ~InkDropDelegate() {} |
+ |
+ // Sets sizes for the animation layers. |
+ virtual void SetInkDropSize(int large_size, |
+ int large_corner_radius, |
+ int small_size, |
+ int small_corner_radius) = 0; |
+ |
+ // Called when the View's layout changes necessitating change in positioning |
+ // of ink ripple layers. |
+ virtual void Layout() = 0; |
bruthig
2015/11/12 16:41:15
Unless there is a compelling reason/benefit to mov
varkha
2015/11/13 00:32:42
As we talked offline. I've renamed it to OnLayout(
|
+ |
+ // Called on gesture to allow starting and stopping animations. |
+ virtual void OnGestureEvent(const ui::GestureEvent& event) = 0; |
bruthig
2015/11/12 16:41:15
|event| probably shouldn't be const. I imagine so
varkha
2015/11/13 00:32:42
Done.
|
+ |
+ // Called when ink ripple should be hidden. |
+ virtual void OnActionComplete() = 0; |
+ |
+ // Called to activate the ink ripple. |
+ virtual void OnActionPending(const ui::Event& event) = 0; |
bruthig
2015/11/12 16:41:15
Is |event| used anywhere, or are there plans to us
varkha
2015/11/13 00:32:42
Done.
|
+ |
+ // Called to start showing QUICK_ACTION ripple. |
+ virtual void OnActionQuick() = 0; |
+ |
+ // Called to start showing ACTIVATED (menu) ripple. |
+ virtual void OnActivated() = 0; |
+ |
+ // Called to animate end of ACTIVATED (menu) ripple. |
+ virtual void OnDeactivated() = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(InkDropDelegate); |
+}; |
+ |
+} // namespace views |
+ |
+#endif // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ |