Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Use the <code>system.display</code> API to query display metadata. | 5 // Use the <code>system.display</code> API to query display metadata. |
| 6 namespace system.display { | 6 namespace system.display { |
| 7 | 7 |
| 8 dictionary Bounds { | 8 dictionary Bounds { |
| 9 // The x-coordinate of the upper-left corner. | 9 // The x-coordinate of the upper-left corner. |
| 10 long left; | 10 long left; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 // Resets the overscan insets for a display to the last saved value (i.e | 269 // Resets the overscan insets for a display to the last saved value (i.e |
| 270 // before Start was called). | 270 // before Start was called). |
| 271 // |id|: The display's unique identifier. | 271 // |id|: The display's unique identifier. |
| 272 static void overscanCalibrationReset(DOMString id); | 272 static void overscanCalibrationReset(DOMString id); |
| 273 | 273 |
| 274 // Complete overscan adjustments for a display by saving the current values | 274 // Complete overscan adjustments for a display by saving the current values |
| 275 // and hiding the overlay. | 275 // and hiding the overlay. |
| 276 // |id|: The display's unique identifier. | 276 // |id|: The display's unique identifier. |
| 277 static void overscanCalibrationComplete(DOMString id); | 277 static void overscanCalibrationComplete(DOMString id); |
| 278 | 278 |
| 279 // Starts touch calibration for a display. This will show an overlay on the | 279 // Starts native touch calibration for a display. This will show an overlay |
| 280 // screen and initialize the UX for touch calibration. If touch calibration | 280 // on the screen and initialize the UX for touch calibration. If another |
| 281 // for display |id| is already in progress this will throw an error. | 281 // native touch calibration is already in progress this will throw an error. |
| 282 // |id|: The display's unique identifier. | 282 // |id|: The display's unique identifier. |
| 283 static void touchCalibrationStart(DOMString id); | 283 static void startNativeTouchCalibration(DOMString id); |
|
stevenjb
2017/01/18 21:58:05
If startNativeTouchCalibration doesn't require a c
malaykeshav
2017/01/19 01:30:51
Renamed to showNativeTouchCalibration() and added
| |
| 284 | |
| 285 // Starts custom touch calibration for a display. This should be called when | |
| 286 // using a custom UX for collecting calibration data. If another touch | |
| 287 // calibration is already in progress this will throw an error. | |
| 288 // |id|: The display's unique identifier. | |
| 289 static void startCustomTouchCalibration(DOMString id); | |
|
stevenjb
2017/01/18 21:01:35
I find having multiple 'start' methods confusing.
malaykeshav
2017/01/19 01:30:51
Acknowledged.
| |
| 284 | 290 |
| 285 // Sets the touch calibration pairs for a display. These |pairs| would be | 291 // Sets the touch calibration pairs for a display. These |pairs| would be |
| 286 // used to calibrate the touch screen for display |id|. If touch calibration | 292 // used to calibrate the touch screen for display with |id| called in |
| 287 // for display |id| is in progress this will do nothing. | 293 // startCustomTouchCalibration(). Always call |startCustomTouchCalibration| |
| 288 // |id|: The display's unique identifier. | 294 // before calling this method. If another touch calibration is already in |
| 295 // progress this will throw an error. | |
| 289 // |pairs|: The pairs of point used to calibrate the display. | 296 // |pairs|: The pairs of point used to calibrate the display. |
| 290 // |bounds|: Bounds of the display when the touch calibration was performed. | 297 // |bounds|: Bounds of the display when the touch calibration was performed. |
| 291 // |bounds.left| and |bounds.top| values are ignored. | 298 // |bounds.left| and |bounds.top| values are ignored. |
| 292 static void touchCalibrationSet(DOMString id, | 299 static void completeCustomTouchCalibration(TouchCalibrationPairQuad pairs, |
| 293 TouchCalibrationPairQuad pairs, | 300 Bounds bounds); |
| 294 Bounds bounds); | |
| 295 | 301 |
| 296 // Resets the touch calibration for the display and removes the saved | 302 // Resets the touch calibration for the display and removes the saved |
| 297 // calibration data. | 303 // calibration data. |
| 298 // |id|: The display's unique identifier. | 304 // |id|: The display's unique identifier. |
| 299 static void touchCalibrationReset(DOMString id); | 305 static void resetTouchCalibration(DOMString id); |
|
stevenjb
2017/01/18 21:58:05
resetCustomTouchCalibration?
malaykeshav
2017/01/19 01:30:51
This resets any stored touch calibration data and
stevenjb
2017/01/19 17:19:01
Hmm. Unfortunately this is different behavior from
malaykeshav
2017/01/19 23:49:06
Done
| |
| 300 }; | 306 }; |
| 301 | 307 |
| 302 interface Events { | 308 interface Events { |
| 303 // Fired when anything changes to the display configuration. | 309 // Fired when anything changes to the display configuration. |
| 304 static void onDisplayChanged(); | 310 static void onDisplayChanged(); |
| 305 }; | 311 }; |
| 306 }; | 312 }; |
| OLD | NEW |