Index: ui/views/animation/toolbar_ink_drop_delegate.h |
diff --git a/ui/views/animation/toolbar_ink_drop_delegate.h b/ui/views/animation/toolbar_ink_drop_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cd892eff38d8448a4cc3b44120359ef6344f751d |
--- /dev/null |
+++ b/ui/views/animation/toolbar_ink_drop_delegate.h |
@@ -0,0 +1,52 @@ |
+// 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_TOOLBAR_INK_DROP_DELEGATE_H_ |
+#define UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_ |
+ |
+#include "base/macros.h" |
+#include "ui/views/animation/ink_drop_delegate.h" |
+#include "ui/views/views_export.h" |
+ |
+namespace ui { |
+class GestureEvent; |
+} // namespace ui |
+ |
+namespace views { |
+ |
+class InkDropAnimationController; |
+class InkDropHost; |
+ |
+// An InkDropDelegate that handles animations for toolbar buttons. |
+class VIEWS_EXPORT ToolbarInkDropDelegate : public InkDropDelegate { |
+ public: |
+ ToolbarInkDropDelegate(InkDropHost* ink_drop_host); |
+ ~ToolbarInkDropDelegate() override; |
+ |
+ // InkDropDelegate: |
+ void SetInkDropSize(int large_size, |
+ int large_corner_radius, |
+ int small_size, |
+ int small_corner_radius) override; |
+ void Layout() override; |
+ void OnGestureEvent(const ui::GestureEvent& event) override; |
+ void OnActionComplete() override; |
+ void OnActionPending(const ui::Event& event) override; |
+ void OnActionQuick() override; |
+ void OnActivated() override; |
+ void OnDeactivated() override; |
+ |
+ private: |
+ // Parent InkDropHost (typically a View) that hosts the ink ripple animations. |
+ InkDropHost* ink_drop_host_; |
+ |
+ // Animation controller for the ink drop ripple effect. |
+ scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ToolbarInkDropDelegate); |
+}; |
+ |
+} // namespace views |
+ |
+#endif // UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_ |