| 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_ANIMATION_CONTROLLER_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 
| 7 | 7 | 
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" | 
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" | 
| 10 #include "ui/compositor/layer_tree_owner.h" | 10 #include "ui/compositor/layer_tree_owner.h" | 
| 11 #include "ui/events/event_handler.h" | 11 #include "ui/events/event_handler.h" | 
| 12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" | 
| 13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" | 
| 14 #include "ui/views/animation/ink_drop_state.h" | 14 #include "ui/views/animation/ink_drop_state.h" | 
| 15 #include "ui/views/views_export.h" | 15 #include "ui/views/views_export.h" | 
| 16 | 16 | 
| 17 namespace ui { | 17 namespace ui { | 
| 18 class Layer; | 18 class Layer; | 
| 19 } | 19 } | 
| 20 | 20 | 
| 21 namespace views { | 21 namespace views { | 
| 22 class AppearAnimationObserver; |  | 
| 23 class InkDropDelegate; |  | 
| 24 class InkDropHost; |  | 
| 25 class View; |  | 
| 26 | 22 | 
| 27 // Base class for an ink drop animation which is hosted by an InkDropHost. | 23 // Pure virtual base class for an ink drop animation. | 
| 28 class VIEWS_EXPORT InkDropAnimationController { | 24 class VIEWS_EXPORT InkDropAnimationController { | 
| 29  public: | 25  public: | 
| 30   InkDropAnimationController() {} | 26   InkDropAnimationController() {} | 
| 31   virtual ~InkDropAnimationController() {} | 27   virtual ~InkDropAnimationController() {} | 
| 32 | 28 | 
|  | 29   // Gets the current state of the ink drop. | 
|  | 30   virtual InkDropState GetInkDropState() const = 0; | 
|  | 31 | 
| 33   // Animates from the current InkDropState to |state|. | 32   // Animates from the current InkDropState to |state|. | 
| 34   virtual void AnimateToState(InkDropState state) = 0; | 33   virtual void AnimateToState(InkDropState state) = 0; | 
| 35 | 34 | 
| 36   // Sets the size of the ink drop. | 35   virtual gfx::Size GetInkDropLargeSize() const = 0; | 
| 37   virtual void SetInkDropSize(const gfx::Size& size) = 0; |  | 
| 38 | 36 | 
| 39   // Returns the ink drop bounds. | 37   // Sets the different sizes of the ink drop. | 
| 40   virtual gfx::Rect GetInkDropBounds() const = 0; | 38   // TODO(bruthig): Document me better. | 
|  | 39   virtual void SetInkDropSize(const gfx::Size& large_size, | 
|  | 40                               int large_corner_radius, | 
|  | 41                               const gfx::Size& small_size, | 
|  | 42                               int small_corner_radius) = 0; | 
| 41 | 43 | 
| 42   // Sets the bounds for the ink drop. |bounds| are in the coordinate space of | 44   virtual gfx::Point GetInkDropOrigin() const = 0; | 
| 43   // the parent ui::Layer that the ink drop layer is added to. | 45 | 
| 44   virtual void SetInkDropBounds(const gfx::Rect& bounds) = 0; | 46   // TODO(bruthig): Document me. | 
|  | 47   virtual void SetInkDropOrigin(const gfx::Point& origin) = 0; | 
| 45 | 48 | 
| 46  private: | 49  private: | 
| 47   DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); | 50   DISALLOW_COPY_AND_ASSIGN(InkDropAnimationController); | 
| 48 }; | 51 }; | 
| 49 | 52 | 
| 50 }  // namespace views | 53 }  // namespace views | 
| 51 | 54 | 
| 52 #endif  // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 55 #endif  // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_CONTROLLER_H_ | 
| OLD | NEW | 
|---|