| 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_INK_DROP_DELEGATE_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | 
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | 
| 7 | 7 | 
| 8 #include "base/macros.h" | 8 #include "base/macros.h" | 
| 9 #include "ui/views/animation/ink_drop_state.h" | 9 #include "ui/views/animation/ink_drop_state.h" | 
| 10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" | 
| 11 | 11 | 
| 12 namespace ui { | 12 namespace ui { | 
| 13 class GestureEvent; | 13 class GestureEvent; | 
| 14 class Event; | 14 class Event; | 
| 15 }  // namespace ui | 15 }  // namespace ui | 
| 16 | 16 | 
| 17 namespace views { | 17 namespace views { | 
| 18 | 18 | 
|  | 19 class InkDrop; | 
|  | 20 | 
| 19 // Ink ripple animation delegate that starts and stops animations based on | 21 // Ink ripple animation delegate that starts and stops animations based on | 
| 20 // View states and events. | 22 // View states and events. | 
| 21 class VIEWS_EXPORT InkDropDelegate { | 23 class VIEWS_EXPORT InkDropDelegate { | 
| 22  public: | 24  public: | 
| 23   InkDropDelegate() {} | 25   InkDropDelegate() {} | 
| 24   virtual ~InkDropDelegate() {} | 26   virtual ~InkDropDelegate() {} | 
| 25 | 27 | 
| 26   // Called when ink ripple state changes. | 28   // Called when ink ripple state changes. | 
| 27   // TODO(bruthig): Replace the InkDropState parameter with an InkDropAction | 29   // TODO(bruthig): Replace the InkDropState parameter with an InkDropAction | 
| 28   // enum.  The InkDropAction enum should be a subset of the InkDropState values | 30   // enum.  The InkDropAction enum should be a subset of the InkDropState values | 
| 29   // as well as a NONE value. | 31   // as well as a NONE value. | 
| 30   virtual void OnAction(InkDropState state) = 0; | 32   virtual void OnAction(InkDropState state) = 0; | 
| 31 | 33 | 
| 32   // Immediately snaps the InkDropState to ACTIVATED. | 34   // Immediately snaps the InkDropState to ACTIVATED. | 
| 33   virtual void SnapToActivated() = 0; | 35   virtual void SnapToActivated() = 0; | 
| 34 | 36 | 
| 35   // Enables or disables the hover state. | 37   // Enables or disables the hover state. | 
| 36   virtual void SetHovered(bool is_hovered) = 0; | 38   virtual void SetHovered(bool is_hovered) = 0; | 
| 37 | 39 | 
| 38   // Returns the current InkDropState | 40   // Returns the current InkDropState | 
| 39   virtual InkDropState GetTargetInkDropState() const = 0; | 41   virtual InkDropState GetTargetInkDropState() const = 0; | 
| 40 | 42 | 
|  | 43   // Returns the ink drop that this delegate controls. TODO(estade): remove the | 
|  | 44   // above pass throughs and convert callers to using this function. | 
|  | 45   virtual InkDrop* GetInkDrop() = 0; | 
|  | 46 | 
| 41  private: | 47  private: | 
| 42   DISALLOW_COPY_AND_ASSIGN(InkDropDelegate); | 48   DISALLOW_COPY_AND_ASSIGN(InkDropDelegate); | 
| 43 }; | 49 }; | 
| 44 | 50 | 
| 45 }  // namespace views | 51 }  // namespace views | 
| 46 | 52 | 
| 47 #endif  // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | 53 #endif  // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_ | 
| OLD | NEW | 
|---|