OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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. | |
4 | |
5 #ifndef UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_ | |
6 #define UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_ | |
7 #pragma once | |
8 | |
9 #include "base/compiler_specific.h" | |
10 #include "ui/gfx/compositor/compositor_export.h" | |
11 #include "ui/gfx/compositor/layer_animation_observer.h" | |
12 | |
13 namespace ui { | |
14 | |
15 class LayerAnimationSequence; | |
16 | |
17 // Listens to animation ended notifications. Remembers the last sequence that | |
18 // it was notified about. | |
19 class COMPOSITOR_EXPORT TestLayerAnimationObserver | |
20 : public LayerAnimationObserver { | |
21 public: | |
22 TestLayerAnimationObserver(); | |
23 virtual ~TestLayerAnimationObserver(); | |
24 | |
25 virtual void OnLayerAnimationEnded( | |
26 const LayerAnimationSequence* sequence) OVERRIDE; | |
27 | |
28 virtual void OnLayerAnimationAborted( | |
29 const LayerAnimationSequence* sequence) OVERRIDE; | |
30 | |
31 virtual void OnLayerAnimationScheduled( | |
32 const LayerAnimationSequence* sequence) OVERRIDE; | |
33 | |
sky
2011/10/28 22:11:38
nit: remove line.
| |
34 | |
35 const LayerAnimationSequence* last_ended_sequence() const { | |
36 return last_ended_sequence_; | |
37 } | |
38 | |
39 const LayerAnimationSequence* last_scheduled_sequence() const { | |
40 return last_scheduled_sequence_; | |
41 } | |
42 | |
43 const LayerAnimationSequence* last_aborted_sequence() const { | |
44 return last_aborted_sequence_; | |
45 } | |
46 | |
47 private: | |
48 const LayerAnimationSequence* last_ended_sequence_; | |
49 const LayerAnimationSequence* last_scheduled_sequence_; | |
50 const LayerAnimationSequence* last_aborted_sequence_; | |
51 | |
52 // Copy and assign are allowed. | |
53 }; | |
54 | |
55 } // namespace ui | |
56 | |
57 #endif // UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_OBSERVER_ | |
OLD | NEW |