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

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: Inline trivial getter/setter. 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
« no previous file with comments | « chrome/common/url_constants.cc ('k') | views/animation/screen_rotation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/sensors/provider.h"
12 #include "content/common/sensors.h"
tfarina 2011/07/22 14:38:17 I don't think views/ can depend on content/. Also
13 #include "ui/base/animation/animation_delegate.h"
14 #include "ui/gfx/point.h"
15 #include "ui/gfx/size.h"
16
17 namespace ui {
18 class SlideAnimation;
19 class InterpolatedTransform;
20 }
21
22 namespace views {
23 class View;
24
25 class ScreenRotation : public ui::AnimationDelegate {
26 public:
27 static void Perform(View* root, float old_degrees, float new_degrees);
28
29 private:
30 ScreenRotation(View* root, float old_degrees, float new_degrees);
31
32 // Implementation of ui::AnimationDelegate
33 virtual void AnimationEnded(const ui::Animation* anim) OVERRIDE;
34 virtual void AnimationProgressed(const ui::Animation* anim) OVERRIDE;
35
36 int NormalizeAngle(int degrees);
37 void Start();
38
39 View* root_;
40 scoped_ptr<ui::SlideAnimation> animation_;
41 scoped_ptr<ui::InterpolatedTransform> interpolated_transform_;
42 float old_degrees_;
43 float new_degrees_;
44 gfx::Size new_size_;
45 gfx::Point new_origin_;
46
47 DISALLOW_COPY_AND_ASSIGN(ScreenRotation);
48 };
49
50 } // namespace views
51
52 #endif // VIEWS_ANIMATION_SCREEN_ROTATION_H_
OLDNEW
« no previous file with comments | « chrome/common/url_constants.cc ('k') | views/animation/screen_rotation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698