summaryrefslogtreecommitdiffstats
path: root/cc/layer.h
diff options
context:
space:
mode:
authorajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 00:32:26 +0000
committerajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-18 00:32:26 +0000
commite10cd0281560fa50d635688bf05a1fb315441de9 (patch)
treec7a68f3bd2e1e11ba70316d47b7fc2cc118542da /cc/layer.h
parentdeb682b1faa01604703d9fd659f8469b092dfd9e (diff)
downloadchromium_src-e10cd0281560fa50d635688bf05a1fb315441de9.zip
chromium_src-e10cd0281560fa50d635688bf05a1fb315441de9.tar.gz
chromium_src-e10cd0281560fa50d635688bf05a1fb315441de9.tar.bz2
cc: Define LayerAnimationObserver and allow LayerAnimationObservers to be registered on a Layer
This makes Layers notify each of their LayerAnimationObservers whenever an animation is started on the impl thread. This functionality is needed for threading ui animations. BUG=164206 Review URL: https://chromiumcodereview.appspot.com/11605002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer.h')
-rw-r--r--cc/layer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/layer.h b/cc/layer.h
index ede6120..adca3b2 100644
--- a/cc/layer.h
+++ b/cc/layer.h
@@ -10,9 +10,11 @@
#include <vector>
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "cc/cc_export.h"
#include "cc/draw_properties.h"
#include "cc/layer_animation_controller.h"
+#include "cc/layer_animation_observer.h"
#include "cc/occlusion_tracker.h"
#include "cc/region.h"
#include "cc/render_surface.h"
@@ -277,6 +279,9 @@ public:
virtual void notifyAnimationStarted(const AnimationEvent&, double wallClockTime);
virtual void notifyAnimationFinished(double wallClockTime);
+ void addLayerAnimationObserver(LayerAnimationObserver* animationObserver);
+ void removeLayerAnimationObserver(LayerAnimationObserver* animationObserver);
+
virtual Region visibleContentOpaqueRegion() const;
virtual ScrollbarLayer* toScrollbarLayer();
@@ -340,6 +345,7 @@ private:
LayerTreeHost* m_layerTreeHost;
scoped_ptr<LayerAnimationController> m_layerAnimationController;
+ ObserverList<LayerAnimationObserver> m_layerAnimationObservers;
// Layer properties.
gfx::Size m_bounds;