| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_COMPOSITOR_LAYER_ANIMATOR_DELEGATE_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATOR_DELEGATE_H_ |
| 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATOR_DELEGATE_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATOR_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/rect.h" |
| 10 #include "ui/gfx/transform.h" |
| 9 #include "ui/gfx/compositor/compositor_export.h" | 11 #include "ui/gfx/compositor/compositor_export.h" |
| 10 | 12 #include "ui/gfx/compositor/layer_animation_delegate.h" |
| 11 namespace gfx { | |
| 12 class Rect; | |
| 13 } | |
| 14 | 13 |
| 15 namespace ui { | 14 namespace ui { |
| 16 | 15 |
| 17 class Transform; | 16 class LayerAnimationSequence; |
| 18 | 17 |
| 19 // LayerAnimator modifies the Layer using this interface. | 18 // Layer animators interact with the layers using this interface. |
| 20 class COMPOSITOR_EXPORT LayerAnimatorDelegate { | 19 class COMPOSITOR_EXPORT LayerAnimatorDelegate : public LayerAnimationDelegate { |
| 21 public: | 20 public: |
| 22 virtual void SetBoundsFromAnimator(const gfx::Rect& bounds) = 0; | 21 // Called when the |sequence| ends. Not called if |sequence| is aborted. |
| 23 virtual void SetTransformFromAnimator(const Transform& transform) = 0; | 22 virtual void OnLayerAnimationEnded(LayerAnimationSequence* sequence) = 0; |
| 24 virtual void SetOpacityFromAnimator(float opacity) = 0; | 23 |
| 24 // if this becomes necessary, this would be the appropriate place to add |
| 25 // notifications about elements starting or ending, or sequences starting. |
| 25 | 26 |
| 26 protected: | 27 protected: |
| 27 virtual ~LayerAnimatorDelegate() {} | 28 virtual ~LayerAnimatorDelegate() {} |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 } // namespace ui | 31 } // namespace ui |
| 31 | 32 |
| 32 #endif // UI_GFX_COMPOSITOR_LAYER_H_ | 33 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_DELEGATE_H_ |
| OLD | NEW |