| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bool has_overscan() const { return has_overscan_; } | 91 bool has_overscan() const { return has_overscan_; } |
| 92 | 92 |
| 93 void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; } | 93 void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; } |
| 94 gfx::Display::Rotation rotation() const { return rotation_; } | 94 gfx::Display::Rotation rotation() const { return rotation_; } |
| 95 | 95 |
| 96 void set_touch_support(gfx::Display::TouchSupport support) { | 96 void set_touch_support(gfx::Display::TouchSupport support) { |
| 97 touch_support_ = support; | 97 touch_support_ = support; |
| 98 } | 98 } |
| 99 gfx::Display::TouchSupport touch_support() const { return touch_support_; } | 99 gfx::Display::TouchSupport touch_support() const { return touch_support_; } |
| 100 | 100 |
| 101 void set_touch_device_id(int id) { touch_device_id_ = id; } |
| 102 int touch_device_id() const { return touch_device_id_; } |
| 103 |
| 101 // Gets/Sets the device scale factor of the display. | 104 // Gets/Sets the device scale factor of the display. |
| 102 float device_scale_factor() const { return device_scale_factor_; } | 105 float device_scale_factor() const { return device_scale_factor_; } |
| 103 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } | 106 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } |
| 104 | 107 |
| 105 // The native bounds for the display. The size of this can be | 108 // The native bounds for the display. The size of this can be |
| 106 // different from the |size_in_pixel| when overscan insets are set | 109 // different from the |size_in_pixel| when overscan insets are set |
| 107 // and/or |configured_ui_scale_| is set. | 110 // and/or |configured_ui_scale_| is set. |
| 108 const gfx::Rect& bounds_in_native() const { | 111 const gfx::Rect& bounds_in_native() const { |
| 109 return bounds_in_native_; | 112 return bounds_in_native_; |
| 110 } | 113 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // modes. | 165 // modes. |
| 163 std::string ToFullString() const; | 166 std::string ToFullString() const; |
| 164 | 167 |
| 165 private: | 168 private: |
| 166 int64 id_; | 169 int64 id_; |
| 167 std::string name_; | 170 std::string name_; |
| 168 bool has_overscan_; | 171 bool has_overscan_; |
| 169 gfx::Display::Rotation rotation_; | 172 gfx::Display::Rotation rotation_; |
| 170 gfx::Display::TouchSupport touch_support_; | 173 gfx::Display::TouchSupport touch_support_; |
| 171 | 174 |
| 175 int touch_device_id_; |
| 176 |
| 172 // This specifies the device's pixel density. (For example, a | 177 // This specifies the device's pixel density. (For example, a |
| 173 // display whose DPI is higher than the threshold is considered to have | 178 // display whose DPI is higher than the threshold is considered to have |
| 174 // device_scale_factor = 2.0 on Chrome OS). This is used by the | 179 // device_scale_factor = 2.0 on Chrome OS). This is used by the |
| 175 // grapics layer to choose and draw appropriate images and scale | 180 // grapics layer to choose and draw appropriate images and scale |
| 176 // layers properly. | 181 // layers properly. |
| 177 float device_scale_factor_; | 182 float device_scale_factor_; |
| 178 gfx::Rect bounds_in_native_; | 183 gfx::Rect bounds_in_native_; |
| 179 | 184 |
| 180 // The size of the display in use. The size can be different from the size | 185 // The size of the display in use. The size can be different from the size |
| 181 // of |bounds_in_native_| if the display has overscan insets and/or rotation. | 186 // of |bounds_in_native_| if the display has overscan insets and/or rotation. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 194 bool native_; | 199 bool native_; |
| 195 | 200 |
| 196 // The list of modes supported by this display. | 201 // The list of modes supported by this display. |
| 197 std::vector<DisplayMode> display_modes_; | 202 std::vector<DisplayMode> display_modes_; |
| 198 }; | 203 }; |
| 199 | 204 |
| 200 } // namespace internal | 205 } // namespace internal |
| 201 } // namespace ash | 206 } // namespace ash |
| 202 | 207 |
| 203 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ | 208 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ |
| OLD | NEW |