Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_DISPLAY_H_ | 5 #ifndef UI_GFX_DISPLAY_H_ |
| 6 #define UI_GFX_DISPLAY_H_ | 6 #define UI_GFX_DISPLAY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 class GFX_EXPORT Display { | 23 class GFX_EXPORT Display { |
| 24 public: | 24 public: |
| 25 // Screen Rotation in clock-wise degrees. | 25 // Screen Rotation in clock-wise degrees. |
| 26 enum Rotation { | 26 enum Rotation { |
| 27 ROTATE_0 = 0, | 27 ROTATE_0 = 0, |
| 28 ROTATE_90, | 28 ROTATE_90, |
| 29 ROTATE_180, | 29 ROTATE_180, |
| 30 ROTATE_270, | 30 ROTATE_270, |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // The cause of a change in display rotation. | |
|
tdanderson
2015/04/13 22:44:46
Nit: For the ease of someone reading this for the
jonross
2015/04/15 17:43:12
Done.
| |
| 34 enum RotationSource { | |
| 35 ROTATION_SOURCE_ACCELEROMETER = 0, | |
| 36 ROTATION_SOURCE_ACTIVE, | |
| 37 ROTATION_SOURCE_USER, | |
| 38 }; | |
| 39 | |
| 33 // Touch support for the display. | 40 // Touch support for the display. |
| 34 enum TouchSupport { | 41 enum TouchSupport { |
| 35 TOUCH_SUPPORT_UNKNOWN, | 42 TOUCH_SUPPORT_UNKNOWN, |
| 36 TOUCH_SUPPORT_AVAILABLE, | 43 TOUCH_SUPPORT_AVAILABLE, |
| 37 TOUCH_SUPPORT_UNAVAILABLE, | 44 TOUCH_SUPPORT_UNAVAILABLE, |
| 38 }; | 45 }; |
| 39 | 46 |
| 40 // Creates a display with kInvalidDisplayID as default. | 47 // Creates a display with kInvalidDisplayID as default. |
| 41 Display(); | 48 Display(); |
| 42 explicit Display(int64 id); | 49 explicit Display(int64 id); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 Rect bounds_; | 136 Rect bounds_; |
| 130 Rect work_area_; | 137 Rect work_area_; |
| 131 float device_scale_factor_; | 138 float device_scale_factor_; |
| 132 Rotation rotation_; | 139 Rotation rotation_; |
| 133 TouchSupport touch_support_; | 140 TouchSupport touch_support_; |
| 134 }; | 141 }; |
| 135 | 142 |
| 136 } // namespace gfx | 143 } // namespace gfx |
| 137 | 144 |
| 138 #endif // UI_GFX_DISPLAY_H_ | 145 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |