| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ |
| 6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ | 6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/events/event_handler.h" | 11 #include "ui/events/event_handler.h" |
| 12 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
| 13 #include "ui/views/animation/ink_drop_delegate.h" | 13 #include "ui/views/animation/ink_drop_delegate.h" |
| 14 #include "ui/views/views_export.h" | 14 #include "ui/views/views_export.h" |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 class ScopedTargetHandler; | 17 class ScopedTargetHandler; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace views { | 20 namespace views { |
| 21 | 21 |
| 22 class InkDropAnimationController; | 22 class InkDrop; |
| 23 class InkDropHost; | 23 class InkDropHost; |
| 24 class View; | 24 class View; |
| 25 | 25 |
| 26 // An InkDropDelegate that handles animations for things that act like buttons. | 26 // An InkDropDelegate that handles animations for things that act like buttons. |
| 27 class VIEWS_EXPORT ButtonInkDropDelegate : public InkDropDelegate, | 27 class VIEWS_EXPORT ButtonInkDropDelegate : public InkDropDelegate, |
| 28 public ui::EventHandler { | 28 public ui::EventHandler { |
| 29 public: | 29 public: |
| 30 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view); | 30 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view); |
| 31 ~ButtonInkDropDelegate() override; | 31 ~ButtonInkDropDelegate() override; |
| 32 | 32 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 51 std::unique_ptr<ui::ScopedTargetHandler> target_handler_; | 51 std::unique_ptr<ui::ScopedTargetHandler> target_handler_; |
| 52 | 52 |
| 53 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. | 53 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. |
| 54 InkDropHost* ink_drop_host_; | 54 InkDropHost* ink_drop_host_; |
| 55 | 55 |
| 56 // Location of the last ink drop triggering event in coordinate system of the | 56 // Location of the last ink drop triggering event in coordinate system of the |
| 57 // ctor argument |view|. | 57 // ctor argument |view|. |
| 58 gfx::Point last_ink_drop_location_; | 58 gfx::Point last_ink_drop_location_; |
| 59 | 59 |
| 60 // Animation controller for the ink drop ripple effect. | 60 // Animation controller for the ink drop ripple effect. |
| 61 std::unique_ptr<InkDropAnimationController> ink_drop_animation_controller_; | 61 std::unique_ptr<InkDrop> ink_drop_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); | 63 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace views | 66 } // namespace views |
| 67 | 67 |
| 68 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ | 68 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ |
| OLD | NEW |