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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 ~Display(); | 44 ~Display(); |
| 45 | 45 |
| 46 // Returns the forced device scale factor, which is given by | 46 // Returns the forced device scale factor, which is given by |
| 47 // "--force-device-scale-factor". | 47 // "--force-device-scale-factor". |
| 48 static float GetForcedDeviceScaleFactor(); | 48 static float GetForcedDeviceScaleFactor(); |
| 49 | 49 |
| 50 // Indicates if a device scale factor is being explicitly enforced from the | 50 // Indicates if a device scale factor is being explicitly enforced from the |
| 51 // command line via "--force-device-scale-factor". | 51 // command line via "--force-device-scale-factor". |
| 52 static bool HasForceDeviceScaleFactor(); | 52 static bool HasForceDeviceScaleFactor(); |
| 53 | 53 |
| 54 // Resets the flag used to determine if a device scale factor is being forced | |
| 55 // from the command line via "--force-device-scale-factor", and thus ensures | |
| 56 // that the command line is reevaluated. | |
| 57 static void ResetForceDeviceScaleFactor(); | |
|
scottmg
2015/03/10 23:02:01
I think this should have a "ForTesting" suffix.
ananta
2015/03/10 23:31:57
Done.
| |
| 58 | |
| 54 // Sets/Gets unique identifier associated with the display. | 59 // Sets/Gets unique identifier associated with the display. |
| 55 // -1 means invalid display and it doesn't not exit. | 60 // -1 means invalid display and it doesn't not exit. |
| 56 int64 id() const { return id_; } | 61 int64 id() const { return id_; } |
| 57 void set_id(int64 id) { id_ = id; } | 62 void set_id(int64 id) { id_ = id; } |
| 58 | 63 |
| 59 // Gets/Sets the display's bounds in gfx::Screen's coordinates. | 64 // Gets/Sets the display's bounds in gfx::Screen's coordinates. |
| 60 const Rect& bounds() const { return bounds_; } | 65 const Rect& bounds() const { return bounds_; } |
| 61 void set_bounds(const Rect& bounds) { bounds_ = bounds; } | 66 void set_bounds(const Rect& bounds) { bounds_ = bounds; } |
| 62 | 67 |
| 63 // Gets/Sets the display's work area in gfx::Screen's coordinates. | 68 // Gets/Sets the display's work area in gfx::Screen's coordinates. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 Rect bounds_; | 129 Rect bounds_; |
| 125 Rect work_area_; | 130 Rect work_area_; |
| 126 float device_scale_factor_; | 131 float device_scale_factor_; |
| 127 Rotation rotation_; | 132 Rotation rotation_; |
| 128 TouchSupport touch_support_; | 133 TouchSupport touch_support_; |
| 129 }; | 134 }; |
| 130 | 135 |
| 131 } // namespace gfx | 136 } // namespace gfx |
| 132 | 137 |
| 133 #endif // UI_GFX_DISPLAY_H_ | 138 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |