| 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 ASH_DISPLAY_DISPLAY_INFO_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_INFO_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_INFO_H_ | 6 #define ASH_DISPLAY_DISPLAY_INFO_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Clear the list of input devices associated with this display. | 115 // Clear the list of input devices associated with this display. |
| 116 void ClearInputDevices(); | 116 void ClearInputDevices(); |
| 117 | 117 |
| 118 // The input device ids that are associated with this display. | 118 // The input device ids that are associated with this display. |
| 119 std::vector<int> input_devices() const { return input_devices_; } | 119 std::vector<int> input_devices() const { return input_devices_; } |
| 120 | 120 |
| 121 // Gets/Sets the device scale factor of the display. | 121 // Gets/Sets the device scale factor of the display. |
| 122 float device_scale_factor() const { return device_scale_factor_; } | 122 float device_scale_factor() const { return device_scale_factor_; } |
| 123 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } | 123 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } |
| 124 | 124 |
| 125 // Gets/Sets the device DPI of the display. |
| 126 float device_dpi() const { return device_dpi_; } |
| 127 void set_device_dpi(float dpi) { device_dpi_ = dpi; } |
| 128 |
| 125 // The native bounds for the display. The size of this can be | 129 // The native bounds for the display. The size of this can be |
| 126 // different from the |size_in_pixel| when overscan insets are set | 130 // different from the |size_in_pixel| when overscan insets are set |
| 127 // and/or |configured_ui_scale_| is set. | 131 // and/or |configured_ui_scale_| is set. |
| 128 const gfx::Rect& bounds_in_native() const { | 132 const gfx::Rect& bounds_in_native() const { |
| 129 return bounds_in_native_; | 133 return bounds_in_native_; |
| 130 } | 134 } |
| 131 | 135 |
| 132 // The size for the display in pixels. | 136 // The size for the display in pixels. |
| 133 const gfx::Size& size_in_pixel() const { return size_in_pixel_; } | 137 const gfx::Size& size_in_pixel() const { return size_in_pixel_; } |
| 134 | 138 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 std::vector<int> input_devices_; | 257 std::vector<int> input_devices_; |
| 254 | 258 |
| 255 // This specifies the device's pixel density. (For example, a | 259 // This specifies the device's pixel density. (For example, a |
| 256 // display whose DPI is higher than the threshold is considered to have | 260 // display whose DPI is higher than the threshold is considered to have |
| 257 // device_scale_factor = 2.0 on Chrome OS). This is used by the | 261 // device_scale_factor = 2.0 on Chrome OS). This is used by the |
| 258 // grapics layer to choose and draw appropriate images and scale | 262 // grapics layer to choose and draw appropriate images and scale |
| 259 // layers properly. | 263 // layers properly. |
| 260 float device_scale_factor_; | 264 float device_scale_factor_; |
| 261 gfx::Rect bounds_in_native_; | 265 gfx::Rect bounds_in_native_; |
| 262 | 266 |
| 267 // This specifies the device's DPI. |
| 268 float device_dpi_; |
| 269 |
| 263 // The size of the display in use. The size can be different from the size | 270 // The size of the display in use. The size can be different from the size |
| 264 // of |bounds_in_native_| if the display has overscan insets and/or rotation. | 271 // of |bounds_in_native_| if the display has overscan insets and/or rotation. |
| 265 gfx::Size size_in_pixel_; | 272 gfx::Size size_in_pixel_; |
| 266 gfx::Insets overscan_insets_in_dip_; | 273 gfx::Insets overscan_insets_in_dip_; |
| 267 | 274 |
| 268 // The pixel scale of the display. This is used to simply expand (or | 275 // The pixel scale of the display. This is used to simply expand (or |
| 269 // shrink) the desktop over the native display resolution (useful in | 276 // shrink) the desktop over the native display resolution (useful in |
| 270 // HighDPI display). Note that this should not be confused with the | 277 // HighDPI display). Note that this should not be confused with the |
| 271 // device scale factor, which specifies the pixel density of the | 278 // device scale factor, which specifies the pixel density of the |
| 272 // display. The actuall scale value to be used depends on the device | 279 // display. The actuall scale value to be used depends on the device |
| (...skipping 24 matching lines...) Expand all Loading... |
| 297 // If you add a new member, you need to update Copy(). | 304 // If you add a new member, you need to update Copy(). |
| 298 }; | 305 }; |
| 299 | 306 |
| 300 // Resets the synthesized display id for testing. This | 307 // Resets the synthesized display id for testing. This |
| 301 // is necessary to avoid overflowing the output index. | 308 // is necessary to avoid overflowing the output index. |
| 302 ASH_EXPORT void ResetDisplayIdForTest(); | 309 ASH_EXPORT void ResetDisplayIdForTest(); |
| 303 | 310 |
| 304 } // namespace ash | 311 } // namespace ash |
| 305 | 312 |
| 306 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ | 313 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ |
| OLD | NEW |