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

Side by Side Diff: ui/gfx/compositor/layer_animation.h

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary include Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_GFX_COMPOSITOR_LAYER_ANIMATION_H_ 5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATION_H_
6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_H_ 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void SetLayer(const base::WeakPtr<Layer>& layer); 53 void SetLayer(const base::WeakPtr<Layer>& layer);
54 base::WeakPtr<Layer>& layer(); 54 base::WeakPtr<Layer>& layer();
55 55
56 virtual void AnimationProgressed(const Animation* animation) OVERRIDE; 56 virtual void AnimationProgressed(const Animation* animation) OVERRIDE;
57 virtual void AnimationEnded(const Animation* animation) OVERRIDE; 57 virtual void AnimationEnded(const Animation* animation) OVERRIDE;
58 58
59 protected: 59 protected:
60 virtual ~LayerAnimation(); 60 virtual ~LayerAnimation();
61 virtual void OnAnimationProgressed(double t) = 0; 61 virtual void OnAnimationProgressed(double t) = 0;
62 virtual void OnAnimationEnded() = 0; 62 virtual void OnAnimationEnded() = 0;
63 int duration() { return duration_; }
sky 2011/08/17 16:39:42 newline between 62 and 63. Make 63 const.
64 void set_duration(int duration) { duration_ = duration; }
63 65
64 private: 66 private:
65 friend class base::RefCounted<LayerAnimation>; 67 friend class base::RefCounted<LayerAnimation>;
66 68
67 base::WeakPtr<LayerAnimationListener> listener_; 69 base::WeakPtr<LayerAnimationListener> listener_;
68 base::WeakPtr<Layer> layer_; 70 base::WeakPtr<Layer> layer_;
69 scoped_refptr<LayerAnimation> child_; 71 scoped_refptr<LayerAnimation> child_;
70 scoped_ptr<SlideAnimation> animation_; 72 scoped_ptr<SlideAnimation> animation_;
71 int duration_; 73 int duration_;
72 }; 74 };
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 bool Init(); 118 bool Init();
117 bool initialized_; 119 bool initialized_;
118 gfx::Rect start_bounds_; 120 gfx::Rect start_bounds_;
119 gfx::Rect target_bounds_unscaled_; 121 gfx::Rect target_bounds_unscaled_;
120 gfx::Rect target_bounds_; 122 gfx::Rect target_bounds_;
121 }; 123 };
122 124
123 } // namespace ui 125 } // namespace ui
124 126
125 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_H_ 127 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698