| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ | 5 #ifndef UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ |
| 6 #define UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ | 6 #define UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <array> | 10 #include <array> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // no overscan. flipped upside-down (180 degree) and 1.5 ui scale. | 146 // no overscan. flipped upside-down (180 degree) and 1.5 ui scale. |
| 147 // "200x100#300x200|200x100%59.0|100x100%60" | 147 // "200x100#300x200|200x100%59.0|100x100%60" |
| 148 // 200x100 window at 0,0 origin, with 3 possible resolutions, | 148 // 200x100 window at 0,0 origin, with 3 possible resolutions, |
| 149 // 300x200, 200x100 at 59 Hz, and 100x100 at 60 Hz. | 149 // 300x200, 200x100 at 59 Hz, and 100x100 at 60 Hz. |
| 150 static ManagedDisplayInfo CreateFromSpec(const std::string& spec); | 150 static ManagedDisplayInfo CreateFromSpec(const std::string& spec); |
| 151 | 151 |
| 152 // Creates a ManagedDisplayInfo from string spec using given |id|. | 152 // Creates a ManagedDisplayInfo from string spec using given |id|. |
| 153 static ManagedDisplayInfo CreateFromSpecWithID(const std::string& spec, | 153 static ManagedDisplayInfo CreateFromSpecWithID(const std::string& spec, |
| 154 int64_t id); | 154 int64_t id); |
| 155 | 155 |
| 156 // When this is set to true on the device whose internal display has | |
| 157 // 1.25 dsf, Chrome uses 1.0f as a default scale factor, and uses | |
| 158 // dsf 1.25 when UI scaling is set to 0.8f. | |
| 159 static void SetUse125DSFForUIScalingForTest(bool enable); | |
| 160 | |
| 161 ManagedDisplayInfo(); | 156 ManagedDisplayInfo(); |
| 162 ManagedDisplayInfo(int64_t id, const std::string& name, bool has_overscan); | 157 ManagedDisplayInfo(int64_t id, const std::string& name, bool has_overscan); |
| 163 ManagedDisplayInfo(const ManagedDisplayInfo& other); | 158 ManagedDisplayInfo(const ManagedDisplayInfo& other); |
| 164 ~ManagedDisplayInfo(); | 159 ~ManagedDisplayInfo(); |
| 165 | 160 |
| 166 int64_t id() const { return id_; } | 161 int64_t id() const { return id_; } |
| 167 | 162 |
| 168 // The name of the display. | 163 // The name of the display. |
| 169 const std::string& name() const { return name_; } | 164 const std::string& name() const { return name_; } |
| 170 | 165 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // If you add a new member, you need to update Copy(). | 394 // If you add a new member, you need to update Copy(). |
| 400 }; | 395 }; |
| 401 | 396 |
| 402 // Resets the synthesized display id for testing. This | 397 // Resets the synthesized display id for testing. This |
| 403 // is necessary to avoid overflowing the output index. | 398 // is necessary to avoid overflowing the output index. |
| 404 void DISPLAY_MANAGER_EXPORT ResetDisplayIdForTest(); | 399 void DISPLAY_MANAGER_EXPORT ResetDisplayIdForTest(); |
| 405 | 400 |
| 406 } // namespace display | 401 } // namespace display |
| 407 | 402 |
| 408 #endif // UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ | 403 #endif // UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ |
| OLD | NEW |