Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h |
| diff --git a/third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h b/third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4db6e0a6d663a5f9366b70e0d39a7d25df1b831c |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/animation/CompositorMutationAnimations.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2016 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 CompositorMutationAnimations_h |
| +#define CompositorMutationAnimations_h |
| + |
| +#include "core/animation/Animation.h" |
| +#include "platform/heap/Handle.h" |
| +#include "wtf/Noncopyable.h" |
| + |
| +namespace blink { |
| + |
| +class Element; |
| +class CompositorMutation; |
| + |
| +class CompositorMutationAnimations final { |
| + DISALLOW_NEW(); |
| + WTF_MAKE_NONCOPYABLE(CompositorMutationAnimations); |
| + |
|
esprehn
2016/02/17 01:32:36
remove nl
majidvp
2016/02/22 17:59:48
Done.
|
| +public: |
| + CompositorMutationAnimations() {} |
| + void applyUpdate(Element&, const CompositorMutation&); |
| + |
| + DEFINE_INLINE_TRACE() |
| + { |
| + visitor->trace(m_opacityAnimation); |
| + visitor->trace(m_transformAnimation); |
| + } |
| + |
| +private: |
| + // We only need two animations at the moment but if that grows we should |
| + // use a map instead of individual members. |
|
esprehn
2016/02/17 01:32:36
Why not use a single animation?
majidvp
2016/02/22 17:59:48
Done.
|
| + Member<Animation> m_opacityAnimation; |
| + Member<Animation> m_transformAnimation; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |