Correct comment added on r267371
[chromium-blink-merge.git] / ui / compositor / test / test_layer_animation_observer.h
blob52789f8f3c96d197a2d0a0022f87402d13cc8e7f
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_OBSERVER_H_
6 #define UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_OBSERVER_H_
8 #include "base/compiler_specific.h"
9 #include "ui/compositor/layer_animation_observer.h"
11 namespace ui {
13 class LayerAnimationSequence;
15 // Listens to animation ended notifications. Remembers the last sequence that
16 // it was notified about.
17 class TestLayerAnimationObserver : public LayerAnimationObserver {
18 public:
19 TestLayerAnimationObserver();
20 virtual ~TestLayerAnimationObserver();
22 virtual void OnLayerAnimationEnded(
23 LayerAnimationSequence* sequence) OVERRIDE;
25 virtual void OnLayerAnimationAborted(
26 LayerAnimationSequence* sequence) OVERRIDE;
28 virtual void OnLayerAnimationScheduled(
29 LayerAnimationSequence* sequence) OVERRIDE;
31 virtual bool RequiresNotificationWhenAnimatorDestroyed() const OVERRIDE;
33 const LayerAnimationSequence* last_ended_sequence() const {
34 return last_ended_sequence_;
37 const LayerAnimationSequence* last_scheduled_sequence() const {
38 return last_scheduled_sequence_;
41 const LayerAnimationSequence* last_aborted_sequence() const {
42 return last_aborted_sequence_;
45 void set_requires_notification_when_animator_destroyed(bool value) {
46 requires_notification_when_animator_destroyed_ = value;
49 private:
50 const LayerAnimationSequence* last_ended_sequence_;
51 const LayerAnimationSequence* last_scheduled_sequence_;
52 const LayerAnimationSequence* last_aborted_sequence_;
53 bool requires_notification_when_animator_destroyed_;
55 // Copy and assign are allowed.
58 } // namespace ui
60 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_OBSERVER_H_