OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef APP_ANIMATION_CONTAINER_ELEMENT_H_ | |
6 #define APP_ANIMATION_CONTAINER_ELEMENT_H_ | |
7 #pragma once | |
8 | |
9 #include "base/time.h" | |
10 | |
11 // Interface for the elements the AnimationContainer contains. This is | |
12 // implemented by Animation. | |
13 class AnimationContainerElement { | |
14 public: | |
15 // Sets the start of the animation. This is invoked from | |
16 // AnimationContainer::Start. | |
17 virtual void SetStartTime(base::TimeTicks start_time) = 0; | |
18 | |
19 // Invoked when the animation is to progress. | |
20 virtual void Step(base::TimeTicks time_now) = 0; | |
21 | |
22 // Returns the time interval of the animation. If an Element needs to change | |
23 // this it should first invoke Stop, then Start. | |
24 virtual base::TimeDelta GetTimerInterval() const = 0; | |
25 | |
26 protected: | |
27 virtual ~AnimationContainerElement() {} | |
28 }; | |
29 | |
30 #endif // APP_ANIMATION_CONTAINER_ELEMENT_H_ | |
OLD | NEW |