OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_ |
| 6 #define UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/views/animation/ink_drop_delegate.h" |
| 10 #include "ui/views/views_export.h" |
| 11 |
| 12 namespace ui { |
| 13 class GestureEvent; |
| 14 } // namespace ui |
| 15 |
| 16 namespace views { |
| 17 |
| 18 class InkDropAnimationController; |
| 19 class InkDropHost; |
| 20 |
| 21 // An InkDropDelegate that handles animations for toolbar buttons. |
| 22 class VIEWS_EXPORT ToolbarInkDropDelegate : public InkDropDelegate { |
| 23 public: |
| 24 ToolbarInkDropDelegate(InkDropHost* ink_drop_host); |
| 25 ~ToolbarInkDropDelegate() override; |
| 26 |
| 27 // InkDropDelegate: |
| 28 void SetInkDropSize(int large_size, |
| 29 int large_corner_radius, |
| 30 int small_size, |
| 31 int small_corner_radius) override; |
| 32 void Layout() override; |
| 33 void OnGestureEvent(const ui::GestureEvent& event) override; |
| 34 void OnActionComplete() override; |
| 35 void OnActionPending(const ui::Event& event) override; |
| 36 void OnActionQuick() override; |
| 37 void OnActivated() override; |
| 38 void OnDeactivated() override; |
| 39 |
| 40 private: |
| 41 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. |
| 42 InkDropHost* ink_drop_host_; |
| 43 |
| 44 // Animation controller for the ink drop ripple effect. |
| 45 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_; |
| 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(ToolbarInkDropDelegate); |
| 48 }; |
| 49 |
| 50 } // namespace views |
| 51 |
| 52 #endif // UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_ |
OLD | NEW |