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_BASE_ANIMATION_ANIMATION_CONTAINER_ELEMENT_H_ | 5 #ifndef UI_BASE_ANIMATION_ANIMATION_CONTAINER_ELEMENT_H_ |
6 #define UI_BASE_ANIMATION_ANIMATION_CONTAINER_ELEMENT_H_ | 6 #define UI_BASE_ANIMATION_ANIMATION_CONTAINER_ELEMENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "ui/ui_api.h" | 10 #include "ui/base/ui_export.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 | 13 |
14 // Interface for the elements the AnimationContainer contains. This is | 14 // Interface for the elements the AnimationContainer contains. This is |
15 // implemented by Animation. | 15 // implemented by Animation. |
16 class UI_API AnimationContainerElement { | 16 class UI_EXPORT AnimationContainerElement { |
17 public: | 17 public: |
18 // Sets the start of the animation. This is invoked from | 18 // Sets the start of the animation. This is invoked from |
19 // AnimationContainer::Start. | 19 // AnimationContainer::Start. |
20 virtual void SetStartTime(base::TimeTicks start_time) = 0; | 20 virtual void SetStartTime(base::TimeTicks start_time) = 0; |
21 | 21 |
22 // Invoked when the animation is to progress. | 22 // Invoked when the animation is to progress. |
23 virtual void Step(base::TimeTicks time_now) = 0; | 23 virtual void Step(base::TimeTicks time_now) = 0; |
24 | 24 |
25 // Returns the time interval of the animation. If an Element needs to change | 25 // Returns the time interval of the animation. If an Element needs to change |
26 // this it should first invoke Stop, then Start. | 26 // this it should first invoke Stop, then Start. |
27 virtual base::TimeDelta GetTimerInterval() const = 0; | 27 virtual base::TimeDelta GetTimerInterval() const = 0; |
28 | 28 |
29 protected: | 29 protected: |
30 virtual ~AnimationContainerElement() {} | 30 virtual ~AnimationContainerElement() {} |
31 }; | 31 }; |
32 | 32 |
33 } // namespace ui | 33 } // namespace ui |
34 | 34 |
35 #endif // UI_BASE_ANIMATION_ANIMATION_CONTAINER_ELEMENT_H_ | 35 #endif // UI_BASE_ANIMATION_ANIMATION_CONTAINER_ELEMENT_H_ |
OLD | NEW |