| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // The name of the display. | 82 // The name of the display. |
| 83 const std::string& name() const { return name_; } | 83 const std::string& name() const { return name_; } |
| 84 | 84 |
| 85 // True if the display EDID has the overscan flag. This does not create the | 85 // True if the display EDID has the overscan flag. This does not create the |
| 86 // actual overscan automatically, but used in the message. | 86 // actual overscan automatically, but used in the message. |
| 87 bool has_overscan() const { return has_overscan_; } | 87 bool has_overscan() const { return has_overscan_; } |
| 88 | 88 |
| 89 void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; } | 89 void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; } |
| 90 gfx::Display::Rotation rotation() const { return rotation_; } | 90 gfx::Display::Rotation rotation() const { return rotation_; } |
| 91 | 91 |
| 92 void set_touch_support(gfx::Display::TouchSupport support) { |
| 93 touch_support_ = support; |
| 94 } |
| 95 gfx::Display::TouchSupport touch_support() const { return touch_support_; } |
| 96 |
| 92 // Gets/Sets the device scale factor of the display. | 97 // Gets/Sets the device scale factor of the display. |
| 93 float device_scale_factor() const { return device_scale_factor_; } | 98 float device_scale_factor() const { return device_scale_factor_; } |
| 94 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } | 99 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } |
| 95 | 100 |
| 96 // The native bounds for the display. The size of this can be different from | 101 // The native bounds for the display. The size of this can be different from |
| 97 // the |size_in_pixel| when overscan insets are set and/or |ui_scale_| is set. | 102 // the |size_in_pixel| when overscan insets are set and/or |ui_scale_| is set. |
| 98 const gfx::Rect bounds_in_native() const { | 103 const gfx::Rect bounds_in_native() const { |
| 99 return bounds_in_native_; | 104 return bounds_in_native_; |
| 100 } | 105 } |
| 101 | 106 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 148 |
| 144 // Returns a string representation of the DisplayInfo | 149 // Returns a string representation of the DisplayInfo |
| 145 // including resolutions. | 150 // including resolutions. |
| 146 std::string ToFullString() const; | 151 std::string ToFullString() const; |
| 147 | 152 |
| 148 private: | 153 private: |
| 149 int64 id_; | 154 int64 id_; |
| 150 std::string name_; | 155 std::string name_; |
| 151 bool has_overscan_; | 156 bool has_overscan_; |
| 152 gfx::Display::Rotation rotation_; | 157 gfx::Display::Rotation rotation_; |
| 158 gfx::Display::TouchSupport touch_support_; |
| 153 | 159 |
| 154 // This specifies the device's pixel density. (For example, a | 160 // This specifies the device's pixel density. (For example, a |
| 155 // display whose DPI is higher than the threshold is considered to have | 161 // display whose DPI is higher than the threshold is considered to have |
| 156 // device_scale_factor = 2.0 on Chrome OS). This is used by the | 162 // device_scale_factor = 2.0 on Chrome OS). This is used by the |
| 157 // grapics layer to choose and draw appropriate images and scale | 163 // grapics layer to choose and draw appropriate images and scale |
| 158 // layers properly. | 164 // layers properly. |
| 159 float device_scale_factor_; | 165 float device_scale_factor_; |
| 160 gfx::Rect bounds_in_native_; | 166 gfx::Rect bounds_in_native_; |
| 161 | 167 |
| 162 // The size of the display in use. The size can be different from the size | 168 // The size of the display in use. The size can be different from the size |
| (...skipping 12 matching lines...) Expand all Loading... |
| 175 bool native_; | 181 bool native_; |
| 176 | 182 |
| 177 // The list of resolutions supported by this display. | 183 // The list of resolutions supported by this display. |
| 178 std::vector<Resolution> resolutions_; | 184 std::vector<Resolution> resolutions_; |
| 179 }; | 185 }; |
| 180 | 186 |
| 181 } // namespace internal | 187 } // namespace internal |
| 182 } // namespace ash | 188 } // namespace ash |
| 183 | 189 |
| 184 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ | 190 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ |
| OLD | NEW |