| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/events/event_handler.h" | 10 #include "ui/events/event_handler.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view); | 28 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view); |
| 29 ~ButtonInkDropDelegate() override; | 29 ~ButtonInkDropDelegate() override; |
| 30 | 30 |
| 31 // InkDropDelegate: | 31 // InkDropDelegate: |
| 32 void SetInkDropSize(int large_size, | 32 void SetInkDropSize(int large_size, |
| 33 int large_corner_radius, | 33 int large_corner_radius, |
| 34 int small_size, | 34 int small_size, |
| 35 int small_corner_radius) override; | 35 int small_corner_radius) override; |
| 36 void OnLayout() override; | 36 void OnLayout() override; |
| 37 void OnAction(InkDropState state) override; | 37 void OnAction(InkDropState state) override; |
| 38 void SetHovered(bool is_hovered) override; |
| 38 | 39 |
| 39 // ui::EventHandler: | 40 // ui::EventHandler: |
| 40 void OnGestureEvent(ui::GestureEvent* event) override; | 41 void OnGestureEvent(ui::GestureEvent* event) override; |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 // An instance of ScopedTargetHandler allowing |this| to handle events. | 44 // An instance of ScopedTargetHandler allowing |this| to handle events. |
| 44 scoped_ptr<ui::ScopedTargetHandler> target_handler_; | 45 scoped_ptr<ui::ScopedTargetHandler> target_handler_; |
| 45 | 46 |
| 46 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. | 47 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. |
| 47 InkDropHost* ink_drop_host_; | 48 InkDropHost* ink_drop_host_; |
| 48 | 49 |
| 49 // Animation controller for the ink drop ripple effect. | 50 // Animation controller for the ink drop ripple effect. |
| 50 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_; | 51 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_; |
| 51 | 52 |
| 52 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); | 53 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace views | 56 } // namespace views |
| 56 | 57 |
| 57 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ | 58 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ |
| OLD | NEW |