| Index: cc/animation/animation_timeline.h
|
| diff --git a/cc/animation/animation_timeline.h b/cc/animation/animation_timeline.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..79c27f9a93959e49fb3287da57f7819d9fc783f6
|
| --- /dev/null
|
| +++ b/cc/animation/animation_timeline.h
|
| @@ -0,0 +1,57 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CC_ANIMATION_ANIMATION_TIMELINE_H_
|
| +#define CC_ANIMATION_ANIMATION_TIMELINE_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "base/memory/ref_counted.h"
|
| +#include "cc/base/cc_export.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class AnimationPlayer;
|
| +class LayerTreeHost;
|
| +class LayerTreeMutatorsClient;
|
| +
|
| +typedef std::vector<scoped_refptr<AnimationPlayer>> AnimationPlayerList;
|
| +
|
| +class CC_EXPORT AnimationTimeline : public base::RefCounted<AnimationTimeline> {
|
| + public:
|
| + static scoped_refptr<AnimationTimeline> Create();
|
| +
|
| + void AttachPlayer(AnimationPlayer* player);
|
| + void DetachPlayer(AnimationPlayer* player);
|
| + AnimationPlayer* GetPlayerById(int player_id) const;
|
| +
|
| + LayerTreeMutatorsClient* layer_tree_mutators_client() {
|
| + return layer_tree_mutators_client_;
|
| + }
|
| + const LayerTreeMutatorsClient* layer_tree_mutators_client() const {
|
| + return layer_tree_mutators_client_;
|
| + }
|
| + void SetLayerTreeMutatorsClient(LayerTreeMutatorsClient* client);
|
| +
|
| + void PushPropertiesTo(AnimationTimeline* timeline_impl);
|
| +
|
| + private:
|
| + friend class base::RefCounted<AnimationTimeline>;
|
| +
|
| + AnimationTimeline();
|
| + virtual ~AnimationTimeline();
|
| +
|
| + void PushAttachedPlayersToImplThread(AnimationTimeline* timeline) const;
|
| + void RemoveDetachedPlayersFromImplThread(AnimationTimeline* timeline) const;
|
| + void PushPropertiesToImplThread(AnimationTimeline* timeline);
|
| +
|
| + AnimationPlayerList players_;
|
| + LayerTreeMutatorsClient* layer_tree_mutators_client_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AnimationTimeline);
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_ANIMATION_ANIMATION_TIMELINE_H_
|
|
|