Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Side by Side Diff: ash/display/display_info.h

Issue 1071193002: Change device IDs from unsigned to signed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check for negative IDs Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/host/ash_window_tree_host_x11_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool has_overscan() const { return has_overscan_; } 104 bool has_overscan() const { return has_overscan_; }
105 105
106 void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; } 106 void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; }
107 gfx::Display::Rotation rotation() const { return rotation_; } 107 gfx::Display::Rotation rotation() const { return rotation_; }
108 108
109 void set_touch_support(gfx::Display::TouchSupport support) { 109 void set_touch_support(gfx::Display::TouchSupport support) {
110 touch_support_ = support; 110 touch_support_ = support;
111 } 111 }
112 gfx::Display::TouchSupport touch_support() const { return touch_support_; } 112 gfx::Display::TouchSupport touch_support() const { return touch_support_; }
113 113
114 void set_touch_device_id(unsigned int id) { touch_device_id_ = id; } 114 void set_touch_device_id(int id) { touch_device_id_ = id; }
115 unsigned int touch_device_id() const { return touch_device_id_; } 115 int touch_device_id() const { return touch_device_id_; }
116 116
117 // Gets/Sets the device scale factor of the display. 117 // Gets/Sets the device scale factor of the display.
118 float device_scale_factor() const { return device_scale_factor_; } 118 float device_scale_factor() const { return device_scale_factor_; }
119 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } 119 void set_device_scale_factor(float scale) { device_scale_factor_ = scale; }
120 120
121 // The native bounds for the display. The size of this can be 121 // The native bounds for the display. The size of this can be
122 // different from the |size_in_pixel| when overscan insets are set 122 // different from the |size_in_pixel| when overscan insets are set
123 // and/or |configured_ui_scale_| is set. 123 // and/or |configured_ui_scale_| is set.
124 const gfx::Rect& bounds_in_native() const { 124 const gfx::Rect& bounds_in_native() const {
125 return bounds_in_native_; 125 return bounds_in_native_;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 bool Use125DSFRorUIScaling() const; 229 bool Use125DSFRorUIScaling() const;
230 230
231 int64 id_; 231 int64 id_;
232 std::string name_; 232 std::string name_;
233 bool has_overscan_; 233 bool has_overscan_;
234 gfx::Display::Rotation rotation_; 234 gfx::Display::Rotation rotation_;
235 gfx::Display::TouchSupport touch_support_; 235 gfx::Display::TouchSupport touch_support_;
236 236
237 // If the display is also a touch device, it will have a positive 237 // If the display is also a touch device, it will have a positive
238 // |touch_device_id_|. Otherwise |touch_device_id_| is 0. 238 // |touch_device_id_|. Otherwise |touch_device_id_| is 0.
239 unsigned int touch_device_id_; 239 int touch_device_id_;
240 240
241 // This specifies the device's pixel density. (For example, a 241 // This specifies the device's pixel density. (For example, a
242 // display whose DPI is higher than the threshold is considered to have 242 // display whose DPI is higher than the threshold is considered to have
243 // device_scale_factor = 2.0 on Chrome OS). This is used by the 243 // device_scale_factor = 2.0 on Chrome OS). This is used by the
244 // grapics layer to choose and draw appropriate images and scale 244 // grapics layer to choose and draw appropriate images and scale
245 // layers properly. 245 // layers properly.
246 float device_scale_factor_; 246 float device_scale_factor_;
247 gfx::Rect bounds_in_native_; 247 gfx::Rect bounds_in_native_;
248 248
249 // The size of the display in use. The size can be different from the size 249 // The size of the display in use. The size can be different from the size
(...skipping 29 matching lines...) Expand all
279 279
280 // The list of available variations for the color calibration. 280 // The list of available variations for the color calibration.
281 std::vector<ui::ColorCalibrationProfile> available_color_profiles_; 281 std::vector<ui::ColorCalibrationProfile> available_color_profiles_;
282 282
283 // If you add a new member, you need to update Copy(). 283 // If you add a new member, you need to update Copy().
284 }; 284 };
285 285
286 } // namespace ash 286 } // namespace ash
287 287
288 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ 288 #endif // ASH_DISPLAY_DISPLAY_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | ash/host/ash_window_tree_host_x11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698