| 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 // serial#. | 36 // serial#. |
| 33 static int64 GetID(uint16 manufacturer_id, uint32 serial_number); | 37 static int64 GetID(uint16 manufacturer_id, uint32 serial_number); |
| 34 | 38 |
| 35 // Sets/Gets unique identifier associated with the display. | 39 // Sets/Gets unique identifier associated with the display. |
| 36 // -1 means invalid display and it doesn't not exit. | 40 // -1 means invalid display and it doesn't not exit. |
| 37 int64 id() const { return id_; } | 41 int64 id() const { return id_; } |
| 38 void set_id(int64 id) { id_ = id; } | 42 void set_id(int64 id) { id_ = id; } |
| 39 | 43 |
| 40 // Gets/Sets the display's bounds in gfx::Screen's coordinates. | 44 // Gets/Sets the display's bounds in gfx::Screen's coordinates. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Rect work_area_; | 102 Rect work_area_; |
| 99 #if defined(USE_AURA) | 103 #if defined(USE_AURA) |
| 100 Rect bounds_in_pixel_; | 104 Rect bounds_in_pixel_; |
| 101 #endif | 105 #endif |
| 102 float device_scale_factor_; | 106 float device_scale_factor_; |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 } // namespace gfx | 109 } // namespace gfx |
| 106 | 110 |
| 107 #endif // UI_GFX_DISPLAY_H_ | 111 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |