| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_ANIMATION_EVENTS_H_ | 5 #ifndef CC_ANIMATION_EVENTS_H_ |
| 6 #define CC_ANIMATION_EVENTS_H_ | 6 #define CC_ANIMATION_EVENTS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/animation.h" | 10 #include "cc/animation.h" |
| 11 #include "ui/gfx/transform.h" |
| 11 | 12 |
| 12 namespace cc { | 13 namespace cc { |
| 13 | 14 |
| 14 struct AnimationEvent { | 15 struct AnimationEvent { |
| 15 enum Type { Started, Finished }; | 16 enum Type { Started, Finished, PropertyUpdate }; |
| 16 | 17 |
| 17 AnimationEvent(Type type, int layerId, int groupId, Animation::TargetPropert
y targetProperty, double monotonicTime) | 18 AnimationEvent(Type type, int layerId, int groupId, Animation::TargetPropert
y targetProperty, double monotonicTime) |
| 18 : type(type) | 19 : type(type) |
| 19 , layerId(layerId) | 20 , layerId(layerId) |
| 20 , groupId(groupId) | 21 , groupId(groupId) |
| 21 , targetProperty(targetProperty) | 22 , targetProperty(targetProperty) |
| 22 , monotonicTime(monotonicTime) | 23 , monotonicTime(monotonicTime) |
| 24 , opacity(0) |
| 23 { | 25 { |
| 24 } | 26 } |
| 25 | 27 |
| 26 Type type; | 28 Type type; |
| 27 int layerId; | 29 int layerId; |
| 28 int groupId; | 30 int groupId; |
| 29 Animation::TargetProperty targetProperty; | 31 Animation::TargetProperty targetProperty; |
| 30 double monotonicTime; | 32 double monotonicTime; |
| 33 float opacity; |
| 34 gfx::Transform transform; |
| 31 }; | 35 }; |
| 32 | 36 |
| 33 typedef std::vector<AnimationEvent> AnimationEventsVector; | 37 typedef std::vector<AnimationEvent> AnimationEventsVector; |
| 34 | 38 |
| 35 } // namespace cc | 39 } // namespace cc |
| 36 | 40 |
| 37 #endif // CC_ANIMATION_EVENTS_H_ | 41 #endif // CC_ANIMATION_EVENTS_H_ |
| OLD | NEW |