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/base/ui_export.h" | 10 #include "ui/base/ui_export.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Creates a display with kInvalidDisplayID as default. | 21 // Creates a display with kInvalidDisplayID as default. |
22 Display(); | 22 Display(); |
23 explicit Display(int64 id); | 23 explicit Display(int64 id); |
24 Display(int64 id, const Rect& bounds); | 24 Display(int64 id, const Rect& bounds); |
25 ~Display(); | 25 ~Display(); |
26 | 26 |
27 // Returns the forced device scale factor, which is given by | 27 // Returns the forced device scale factor, which is given by |
28 // "--force-device-scale-factor". | 28 // "--force-device-scale-factor". |
29 static float GetForcedDeviceScaleFactor(); | 29 static float GetForcedDeviceScaleFactor(); |
30 | 30 |
| 31 // Indicates if a device scale factor is being explicitly enforced from the |
| 32 // command line via "--force-device-scale-factor". |
| 33 static bool HasForceDeviceScaleFactor(); |
| 34 |
31 // Returns 64-bit persistent ID for the specified manufacturer's ID and | 35 // Returns 64-bit persistent ID for the specified manufacturer's ID and |
32 // product_code, and the index of the output it is connected to. | 36 // product_code, and the index of the output it is connected to. |
33 // |output_index| is used to distinguish the displays of the same type. For | 37 // |output_index| is used to distinguish the displays of the same type. For |
34 // example, swapping two identical display between two outputs will not be | 38 // example, swapping two identical display between two outputs will not be |
35 // treated as swap. The 'serial number' field in EDID isn't used here because | 39 // treated as swap. The 'serial number' field in EDID isn't used here because |
36 // it is not guaranteed to have unique number and it may have the same fixed | 40 // it is not guaranteed to have unique number and it may have the same fixed |
37 // value (like 0). | 41 // value (like 0). |
38 static int64 GetID(uint16 manufacturer_id, | 42 static int64 GetID(uint16 manufacturer_id, |
39 uint16 product_code, | 43 uint16 product_code, |
40 uint8 output_index); | 44 uint8 output_index); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 Rect work_area_; | 109 Rect work_area_; |
106 #if defined(USE_AURA) | 110 #if defined(USE_AURA) |
107 Rect bounds_in_pixel_; | 111 Rect bounds_in_pixel_; |
108 #endif | 112 #endif |
109 float device_scale_factor_; | 113 float device_scale_factor_; |
110 }; | 114 }; |
111 | 115 |
112 } // namespace gfx | 116 } // namespace gfx |
113 | 117 |
114 #endif // UI_GFX_DISPLAY_H_ | 118 #endif // UI_GFX_DISPLAY_H_ |
OLD | NEW |