| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 // Returns the forced device scale factor, which is given by | 35 // Returns the forced device scale factor, which is given by |
| 36 // "--force-device-scale-factor". | 36 // "--force-device-scale-factor". |
| 37 static float GetForcedDeviceScaleFactor(); | 37 static float GetForcedDeviceScaleFactor(); |
| 38 | 38 |
| 39 // Indicates if a device scale factor is being explicitly enforced from the | 39 // Indicates if a device scale factor is being explicitly enforced from the |
| 40 // command line via "--force-device-scale-factor". | 40 // command line via "--force-device-scale-factor". |
| 41 static bool HasForceDeviceScaleFactor(); | 41 static bool HasForceDeviceScaleFactor(); |
| 42 | 42 |
| 43 // Returns 64-bit persistent ID for the specified manufacturer's ID and | 43 // Returns 64-bit persistent ID for the specified manufacturer's ID and |
| 44 // product_code, and the index of the output it is connected to. | 44 // product_code_hash, and the index of the output it is connected to. |
| 45 // |output_index| is used to distinguish the displays of the same type. For | 45 // |output_index| is used to distinguish the displays of the same type. For |
| 46 // example, swapping two identical display between two outputs will not be | 46 // example, swapping two identical display between two outputs will not be |
| 47 // treated as swap. The 'serial number' field in EDID isn't used here because | 47 // treated as swap. The 'serial number' field in EDID isn't used here because |
| 48 // it is not guaranteed to have unique number and it may have the same fixed | 48 // it is not guaranteed to have unique number and it may have the same fixed |
| 49 // value (like 0). | 49 // value (like 0). |
| 50 static int64 GetID(uint16 manufacturer_id, | 50 static int64 GetID(uint16 manufacturer_id, |
| 51 uint16 product_code, | 51 uint32 product_code_hash, |
| 52 uint8 output_index); | 52 uint8 output_index); |
| 53 | 53 |
| 54 // Sets/Gets unique identifier associated with the display. | 54 // Sets/Gets unique identifier associated with the display. |
| 55 // -1 means invalid display and it doesn't not exit. | 55 // -1 means invalid display and it doesn't not exit. |
| 56 int64 id() const { return id_; } | 56 int64 id() const { return id_; } |
| 57 void set_id(int64 id) { id_ = id; } | 57 void set_id(int64 id) { id_ = id; } |
| 58 | 58 |
| 59 // Gets/Sets the display's bounds in gfx::Screen's coordinates. | 59 // Gets/Sets the display's bounds in gfx::Screen's coordinates. |
| 60 const Rect& bounds() const { return bounds_; } | 60 const Rect& bounds() const { return bounds_; } |
| 61 void set_bounds(const Rect& bounds) { bounds_ = bounds; } | 61 void set_bounds(const Rect& bounds) { bounds_ = bounds; } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 int64 id_; | 118 int64 id_; |
| 119 Rect bounds_; | 119 Rect bounds_; |
| 120 Rect work_area_; | 120 Rect work_area_; |
| 121 float device_scale_factor_; | 121 float device_scale_factor_; |
| 122 Rotation rotation_; | 122 Rotation rotation_; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace gfx | 125 } // namespace gfx |
| 126 | 126 |
| 127 #endif // UI_GFX_DISPLAY_H_ | 127 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |