Chromium Code Reviews| 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_ |