| Index: extensions/common/api/system_display.idl
|
| diff --git a/extensions/common/api/system_display.idl b/extensions/common/api/system_display.idl
|
| index 97d2c3c995aba90f22325625febda68dfaf5ba2c..b6b599fdb03fc35087c860ae6a1fb537118a2b20 100644
|
| --- a/extensions/common/api/system_display.idl
|
| +++ b/extensions/common/api/system_display.idl
|
| @@ -207,6 +207,7 @@ namespace system.display {
|
| callback DisplayLayoutCallback = void (DisplayLayout[] layouts);
|
| callback SetDisplayUnitInfoCallback = void();
|
| callback SetDisplayLayoutCallback = void();
|
| + callback NativeTouchCalibrationCallback = void(boolean success);
|
|
|
| interface Functions {
|
| // Get the information of all attached display devices.
|
| @@ -276,27 +277,39 @@ namespace system.display {
|
| // |id|: The display's unique identifier.
|
| static void overscanCalibrationComplete(DOMString id);
|
|
|
| - // Starts touch calibration for a display. This will show an overlay on the
|
| - // screen and initialize the UX for touch calibration. If touch calibration
|
| - // for display |id| is already in progress this will throw an error.
|
| + // Displays the native touch calibration UX for the display with |id| as
|
| + // display id. This will show an overlay on the screen with required
|
| + // instructions on how to proceed. This method has a callback informing
|
| + // successful calibraion. If another touch calibration is already in
|
| + // progress this will throw an error.
|
| // |id|: The display's unique identifier.
|
| - static void touchCalibrationStart(DOMString id);
|
| + // |callback|: Callback to inform the caller that the touch calibration has
|
| + // ended. The argument of the callback informs if the calibration was
|
| + // a success or not.
|
| + static void showNativeTouchCalibration(
|
| + DOMString id, NativeTouchCalibrationCallback callback);
|
| +
|
| + // Starts custom touch calibration for a display. This should be called when
|
| + // using a custom UX for collecting calibration data. If another touch
|
| + // calibration is already in progress this will throw an error.
|
| + // |id|: The display's unique identifier.
|
| + static void startCustomTouchCalibration(DOMString id);
|
|
|
| // Sets the touch calibration pairs for a display. These |pairs| would be
|
| - // used to calibrate the touch screen for display |id|. If touch calibration
|
| - // for display |id| is in progress this will do nothing.
|
| - // |id|: The display's unique identifier.
|
| + // used to calibrate the touch screen for display with |id| called in
|
| + // startCustomTouchCalibration(). Always call |startCustomTouchCalibration|
|
| + // before calling this method. If another touch calibration is already in
|
| + // progress this will throw an error.
|
| // |pairs|: The pairs of point used to calibrate the display.
|
| // |bounds|: Bounds of the display when the touch calibration was performed.
|
| // |bounds.left| and |bounds.top| values are ignored.
|
| - static void touchCalibrationSet(DOMString id,
|
| - TouchCalibrationPairQuad pairs,
|
| - Bounds bounds);
|
| + static void completeCustomTouchCalibration(TouchCalibrationPairQuad pairs,
|
| + Bounds bounds);
|
|
|
| // Resets the touch calibration for the display and removes the saved
|
| // calibration data.
|
| // |id|: The display's unique identifier.
|
| - static void touchCalibrationReset(DOMString id);
|
| + static void resetTouchCalibration(DOMString id);
|
| };
|
|
|
| interface Events {
|
|
|