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 VIEWS_ANIMATION_SCREEN_ROTATION_H_ | |
6 #define VIEWS_ANIMATION_SCREEN_ROTATION_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "ui/gfx/compositor/layer_animation.h" | |
12 #include "ui/gfx/point.h" | |
13 #include "ui/gfx/size.h" | |
14 | |
15 namespace ui { | |
16 class SlideAnimation; | |
17 class InterpolatedTransform; | |
18 } | |
19 | |
20 namespace views { | |
21 class View; | |
22 | |
23 class ScreenRotation : public ui::LayerAnimation { | |
sky
2011/08/17 16:39:42
Have the changes to layeranimation landed?
| |
24 public: | |
25 ScreenRotation(View* root, float old_degrees, float new_degrees); | |
26 void CleanUp(); | |
27 | |
28 protected: | |
29 virtual ~ScreenRotation(); | |
30 | |
31 // implementation of ui::LayerAnimation | |
32 virtual void OnAnimationEnded() OVERRIDE; | |
33 virtual void OnAnimationProgressed(double t) OVERRIDE; | |
34 | |
35 private: | |
36 int NormalizeAngle(int degrees); | |
37 void Init(); | |
38 | |
39 View* root_; | |
40 scoped_ptr<ui::InterpolatedTransform> interpolated_transform_; | |
41 float old_degrees_; | |
42 float new_degrees_; | |
43 gfx::Size new_size_; | |
44 gfx::Point new_origin_; | |
45 | |
46 DISALLOW_COPY_AND_ASSIGN(ScreenRotation); | |
47 }; | |
48 | |
49 } // namespace views | |
50 | |
51 #endif // VIEWS_ANIMATION_SCREEN_ROTATION_H_ | |
OLD | NEW |