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

Unified Diff: ash/rotator/screen_rotation_animator.h

Issue 975943002: Implemented screen rotation animation experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ash-screen-rotation-animation entry to histograms.xml. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/rotator/screen_rotation_animation.cc ('k') | ash/rotator/screen_rotation_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator.h
diff --git a/ash/rotator/screen_rotation_animator.h b/ash/rotator/screen_rotation_animator.h
new file mode 100644
index 0000000000000000000000000000000000000000..055e755906dc483d95f4da29cc666749d893eb66
--- /dev/null
+++ b/ash/rotator/screen_rotation_animator.h
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_ROTATOR_SCREEN_ROTATION_ANIMATOR_H_
+#define ASH_ROTATOR_SCREEN_ROTATION_ANIMATOR_H_
+
+#include "ash/ash_export.h"
+#include "base/basictypes.h"
+#include "ui/gfx/display.h"
+
+namespace ash {
+
+// Utility to perform a screen rotation with an animation.
+class ASH_EXPORT ScreenRotationAnimator {
+ public:
+ explicit ScreenRotationAnimator(int64 display_id);
+ ~ScreenRotationAnimator();
+
+ // Rotates |display_| to the |new_rotation| orientation.
+ void Rotate(gfx::Display::Rotation new_rotation);
+
+ private:
+ // The id of the display to rotate.
+ int64 display_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimator);
+};
+
+} // namespace ash
+
+#endif // ASH_ROTATOR_SCREEN_ROTATION_ANIMATOR_H_
« no previous file with comments | « ash/rotator/screen_rotation_animation.cc ('k') | ash/rotator/screen_rotation_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698