Chromium Code Reviews| Index: cc/animation_registrar.h |
| diff --git a/cc/animation_registrar.h b/cc/animation_registrar.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3a39eb50355a67bca8c1926f01c60405109d19d1 |
| --- /dev/null |
| +++ b/cc/animation_registrar.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2012 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_REGISTRAR_H_ |
| +#define CC_ANIMATION_REGISTRAR_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "cc/cc_export.h" |
| + |
| +namespace cc { |
| + |
| +class LayerAnimationController; |
| + |
| +class CC_EXPORT AnimationRegistrar { |
| + public: |
| + // If an animation has been registered for the given id, return it. Otherwise |
| + // creates a new one and returns a scoped_refptr to it. |
| + virtual scoped_refptr<LayerAnimationController> GetAnimationControllerForId(int id) = 0; |
|
enne (OOO)
2012/12/17 20:21:22
80 columns /o\
|
| + |
| + // Registers the given animation controller as active. An active animation |
| + // controller is one that has a running animation that needs to be ticked. |
| + virtual void DidActivateAnimationController(LayerAnimationController*) = 0; |
| + |
| + // Unregisters the given animation controller. When this happens, the |
| + // animation controller will no longer be ticked (since it's not active). It |
| + // is not an error to call this function with a deactivated controller. |
| + virtual void DidDeactivateAnimationController(LayerAnimationController*) = 0; |
| + |
| + // Registers the given controller as alive. |
| + virtual void RegisterAnimationController(LayerAnimationController*) = 0; |
| + |
| + // Unregisters the given controller as alive. |
| + virtual void UnregisterAnimationController(LayerAnimationController*) = 0; |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_ANIMATION_REGISTRAR_H_ |