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

Side by Side Diff: views/animation/screen_rotation.h

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove unused includes Created 9 years, 5 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
(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/base/animation/animation_delegate.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::AnimationDelegate {
sky 2011/07/27 22:16:19 Please add a description
24 public:
25 static void Perform(View* root, float old_degrees, float new_degrees);
26
27 private:
28 ScreenRotation(View* root, float old_degrees, float new_degrees);
29
30 // Implementation of ui::AnimationDelegate
31 virtual void AnimationEnded(const ui::Animation* anim) OVERRIDE;
32 virtual void AnimationProgressed(const ui::Animation* anim) OVERRIDE;
33
34 int NormalizeAngle(int degrees);
35 void Start();
36
37 View* root_;
38 scoped_ptr<ui::SlideAnimation> animation_;
39 scoped_ptr<ui::InterpolatedTransform> interpolated_transform_;
40 float old_degrees_;
41 float new_degrees_;
42 gfx::Size new_size_;
43 gfx::Point new_origin_;
44
45 DISALLOW_COPY_AND_ASSIGN(ScreenRotation);
46 };
47
48 } // namespace views
49
50 #endif // VIEWS_ANIMATION_SCREEN_ROTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698