blob: fc0c41e9d1cf921a5279fbba075f55d1e488bc58 [file] [log] [blame]
[email protected]0fb25002012-10-12 07:20:021// Copyright 2012 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.
[email protected]cd57cc5a2012-10-12 22:43:414
[email protected]95e4e1a02013-03-18 07:09:095#ifndef CC_ANIMATION_ANIMATION_EVENTS_H_
6#define CC_ANIMATION_ANIMATION_EVENTS_H_
[email protected]cd57cc5a2012-10-12 22:43:417
danakj60bc3bc2016-04-09 00:24:488#include <memory>
[email protected]cd57cc5a2012-10-12 22:43:419#include <vector>
10
[email protected]95e4e1a02013-03-18 07:09:0911#include "cc/animation/animation.h"
ymalik6581bb3e2016-03-01 07:32:0712#include "cc/animation/animation_curve.h"
[email protected]79eb14f62013-04-11 18:59:1713#include "cc/base/cc_export.h"
[email protected]b4c6d812013-10-03 15:48:5614#include "cc/output/filter_operations.h"
loyso7337a622016-04-26 23:54:3015#include "cc/trees/mutator_host_client.h"
[email protected]590e12f2013-03-07 16:16:4116#include "ui/gfx/transform.h"
[email protected]cd57cc5a2012-10-12 22:43:4117
18namespace cc {
19
[email protected]79eb14f62013-04-11 18:59:1720struct CC_EXPORT AnimationEvent {
ymalik6581bb3e2016-03-01 07:32:0721 enum Type { STARTED, FINISHED, ABORTED, PROPERTY_UPDATE, TAKEOVER };
[email protected]cd57cc5a2012-10-12 22:43:4122
[email protected]cb67b822013-03-12 02:49:2223 AnimationEvent(Type type,
loyso7337a622016-04-26 23:54:3024 ElementId element_id,
[email protected]cb67b822013-03-12 02:49:2225 int group_id,
loyso0c8e4402016-02-25 04:12:3026 TargetProperty::Type target_property,
[email protected]ac22516a2014-05-15 17:31:3627 base::TimeTicks monotonic_time);
ymalik6581bb3e2016-03-01 07:32:0728
vmpstr6aaeb2e2016-02-25 01:55:3829 AnimationEvent(const AnimationEvent& other);
ymalik6581bb3e2016-03-01 07:32:0730 AnimationEvent& operator=(const AnimationEvent& other);
31
32 ~AnimationEvent();
[email protected]cd57cc5a2012-10-12 22:43:4133
[email protected]cb67b822013-03-12 02:49:2234 Type type;
loyso7337a622016-04-26 23:54:3035 ElementId element_id;
[email protected]cb67b822013-03-12 02:49:2236 int group_id;
loyso0c8e4402016-02-25 04:12:3037 TargetProperty::Type target_property;
[email protected]ac22516a2014-05-15 17:31:3638 base::TimeTicks monotonic_time;
[email protected]79eb14f62013-04-11 18:59:1739 bool is_impl_only;
[email protected]cb67b822013-03-12 02:49:2240 float opacity;
41 gfx::Transform transform;
[email protected]b4c6d812013-10-03 15:48:5642 FilterOperations filters;
ymalik6581bb3e2016-03-01 07:32:0743
44 // For continuing a scroll offset animation on the main thread.
45 double animation_start_time;
danakj60bc3bc2016-04-09 00:24:4846 std::unique_ptr<AnimationCurve> curve;
[email protected]cd57cc5a2012-10-12 22:43:4147};
48
loysoe926437dd2016-01-14 22:55:3049class CC_EXPORT AnimationEvents {
50 public:
51 AnimationEvents();
52 ~AnimationEvents();
53
54 std::vector<AnimationEvent> events_;
55};
[email protected]cd57cc5a2012-10-12 22:43:4156
57} // namespace cc
58
[email protected]95e4e1a02013-03-18 07:09:0959#endif // CC_ANIMATION_ANIMATION_EVENTS_H_