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

Side by Side Diff: ui/gfx/display.h

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
OLDNEW
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
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 display rotation can have multiple causes for change. A user can set a
34 // preference. On devices with accelerometers, they can change the rotation.
35 // RotationSource allows for the tracking of a Rotation per source of the
36 // change.
37 enum RotationSource {
38 ROTATION_SOURCE_ACCELEROMETER = 0,
39 ROTATION_SOURCE_ACTIVE,
oshima 2015/04/17 17:52:44 document what ACTIVE means.
jonross 2015/04/17 19:40:04 Done.
40 ROTATION_SOURCE_USER,
41 };
42
33 // Touch support for the display. 43 // Touch support for the display.
34 enum TouchSupport { 44 enum TouchSupport {
35 TOUCH_SUPPORT_UNKNOWN, 45 TOUCH_SUPPORT_UNKNOWN,
36 TOUCH_SUPPORT_AVAILABLE, 46 TOUCH_SUPPORT_AVAILABLE,
37 TOUCH_SUPPORT_UNAVAILABLE, 47 TOUCH_SUPPORT_UNAVAILABLE,
38 }; 48 };
39 49
40 // Creates a display with kInvalidDisplayID as default. 50 // Creates a display with kInvalidDisplayID as default.
41 Display(); 51 Display();
42 explicit Display(int64 id); 52 explicit Display(int64 id);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Rect bounds_; 139 Rect bounds_;
130 Rect work_area_; 140 Rect work_area_;
131 float device_scale_factor_; 141 float device_scale_factor_;
132 Rotation rotation_; 142 Rotation rotation_;
133 TouchSupport touch_support_; 143 TouchSupport touch_support_;
134 }; 144 };
135 145
136 } // namespace gfx 146 } // namespace gfx
137 147
138 #endif // UI_GFX_DISPLAY_H_ 148 #endif // UI_GFX_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698