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

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: Addressed outstanding comments from Patch set 1 & 2. 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
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..9fa719213ae72dbe4293ee1cee0a2f2409c68d70
--- /dev/null
+++ b/ash/rotator/screen_rotation_animator.h
@@ -0,0 +1,34 @@
+// 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);
+
+ explicit ScreenRotationAnimator(gfx::Display display);
+ ~ScreenRotationAnimator();
+
+ // Rotates |display_| to the |new_rotation| orientation.
+ void Rotate(gfx::Display::Rotation new_rotation);
+
+ private:
+ // The Display to rotate.
+ gfx::Display display_;
oshima 2015/03/06 20:59:32 looks like it's using display_id only. Can you jus
bruthig 2015/03/09 21:04:27 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimator);
+};
+
+} // namespace ash
+
+#endif // ASH_ROTATOR_SCREEN_ROTATION_ANIMATOR_H_

Powered by Google App Engine
This is Rietveld 408576698