Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1613)

Unified Diff: ui/gfx/compositor/layer_animation_observer.h

Issue 8395046: Allows observers to be notified when layer animations complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gfx/compositor/layer_animation_observer.h
diff --git a/ui/gfx/compositor/layer_animation_observer.h b/ui/gfx/compositor/layer_animation_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..1fe031e1b1df24fda31cf11223b1989af3f0485d
--- /dev/null
+++ b/ui/gfx/compositor/layer_animation_observer.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 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 UI_GFX_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
+#define UI_GFX_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
+#pragma once
+
+#include "ui/gfx/compositor/compositor_export.h"
+
+namespace ui {
+
+class LayerAnimationSequence;
+
+// LayerAnimationObservers are notified when animations complete.
+class COMPOSITOR_EXPORT LayerAnimationObserver {
+ public:
+ // Called when the |sequence| ends. Not called if |sequence| is aborted.
+ virtual void OnLayerAnimationEnded(
+ const LayerAnimationSequence* sequence) = 0;
sky 2011/10/28 22:11:38 Most folks are only going to care about ended. Bec
+
+ // Called if |sequence| is aborted for any reason.
+ virtual void OnLayerAnimationAborted(
+ const LayerAnimationSequence* sequence) = 0;
+
+ // Called when the animation is scheduled.
+ virtual void OnLayerAnimationScheduled(
+ const LayerAnimationSequence* sequence) = 0;
+
+ protected:
+ virtual ~LayerAnimationObserver() {}
+};
+
+} // namespace ui
+
+#endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698