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

Side by Side Diff: ui/compositor/layer_animation_observer.h

Issue 1381463002: Added LayerAnimationObserver::OnLayerAnimationStarted() notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Polish after self review. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "ui/compositor/compositor_export.h" 13 #include "ui/compositor/compositor_export.h"
14 #include "ui/compositor/layer_animation_element.h" 14 #include "ui/compositor/layer_animation_element.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 class LayerAnimationSequence; 18 class LayerAnimationSequence;
19 class ScopedLayerAnimationSettings; 19 class ScopedLayerAnimationSettings;
20 class ImplicitAnimationObserver; 20 class ImplicitAnimationObserver;
21 21
22 // LayerAnimationObservers are notified when animations complete. 22 // LayerAnimationObservers are notified when animations complete.
23 class COMPOSITOR_EXPORT LayerAnimationObserver { 23 class COMPOSITOR_EXPORT LayerAnimationObserver {
24 public: 24 public:
25 // Called when the |sequence| starts.
26 virtual void OnLayerAnimationStarted(LayerAnimationSequence* sequence);
27
25 // Called when the |sequence| ends. Not called if |sequence| is aborted. 28 // Called when the |sequence| ends. Not called if |sequence| is aborted.
26 virtual void OnLayerAnimationEnded( 29 virtual void OnLayerAnimationEnded(
27 LayerAnimationSequence* sequence) = 0; 30 LayerAnimationSequence* sequence) = 0;
28 31
29 // Called if |sequence| is aborted for any reason. Should never do anything 32 // Called if |sequence| is aborted for any reason. Should never do anything
30 // that may cause another animation to be started. 33 // that may cause another animation to be started.
31 virtual void OnLayerAnimationAborted( 34 virtual void OnLayerAnimationAborted(
32 LayerAnimationSequence* sequence) = 0; 35 LayerAnimationSequence* sequence) = 0;
33 36
34 // Called when the animation is scheduled. 37 // Called when the animation is scheduled.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 AnimationStatus> PropertyAnimationStatusMap; 146 AnimationStatus> PropertyAnimationStatusMap;
144 PropertyAnimationStatusMap property_animation_status_; 147 PropertyAnimationStatusMap property_animation_status_;
145 148
146 // True if OnLayerAnimationScheduled() has been called at least once. 149 // True if OnLayerAnimationScheduled() has been called at least once.
147 bool first_sequence_scheduled_; 150 bool first_sequence_scheduled_;
148 }; 151 };
149 152
150 } // namespace ui 153 } // namespace ui
151 154
152 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 155 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer_animation_observer.cc » ('j') | ui/compositor/test/test_layer_animation_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698