| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 // This file was generated by: | 5 // This file was generated by: |
| 6 // ./tools/json_schema_compiler/compiler.py. | 6 // ./tools/json_schema_compiler/compiler.py. |
| 7 | 7 |
| 8 // This was modified to replace System.display with SystemDisplay. | 8 // This was modified to replace System.display with SystemDisplay. |
| 9 | 9 |
| 10 /** @fileoverview Interface for system.display that can be overriden. */ | 10 /** @fileoverview Interface for system.display that can be overriden. */ |
| 11 | 11 |
| 12 assertNotReached('Interface file for Closure Compiler should not be executed.'); | 12 assertNotReached('Interface file for Closure Compiler should not be executed.'); |
| 13 | 13 |
| 14 /** @interface */ | 14 /** @interface */ |
| 15 function SystemDisplay() {} | 15 function SystemDisplay() {} |
| 16 | 16 |
| 17 SystemDisplay.prototype = { | 17 SystemDisplay.prototype = { |
| 18 /** | 18 /** |
| 19 * Get the information of all attached display devices. | 19 * Requests the information for all attached display devices. |
| 20 * @param {!chrome.system.display.GetInfoFlags} flags Options affecting how |
| 21 * the information is returned. |
| 20 * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void} | 22 * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void} |
| 21 * callback | 23 * callback The callback to invoke with the results. |
| 22 * @see https://developer.chrome.com/extensions/system.display#method-getInfo | 24 * @see https://developer.chrome.com/extensions/system.display#method-getInfo |
| 23 */ | 25 */ |
| 24 getInfo: assertNotReached, | 26 getInfo: assertNotReached, |
| 25 | 27 |
| 26 /** | 28 /** |
| 29 * Requests the layout info for all displays. NOTE: This is only available to |
| 30 * Chrome OS Kiosk apps and Web UI. |
| 31 * @param {function(!Array<!chrome.system.display.DisplayLayout>):void} |
| 32 * callback The callback to invoke with the results. |
| 33 * @see https://developer.chrome.com/extensions/system.display#method-getDispl
ayLayout |
| 34 */ |
| 35 getDisplayLayout: assertNotReached, |
| 36 |
| 37 /** |
| 27 * Updates the properties for the display specified by |id|, according to the | 38 * Updates the properties for the display specified by |id|, according to the |
| 28 * information provided in |info|. On failure, $(ref:runtime.lastError) will | 39 * information provided in |info|. On failure, $(ref:runtime.lastError) will |
| 29 * be set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. | 40 * be set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. |
| 30 * @param {string} id The display's unique identifier. | 41 * @param {string} id The display's unique identifier. |
| 31 * @param {!chrome.system.display.DisplayProperties} info The information | 42 * @param {!chrome.system.display.DisplayProperties} info The information |
| 32 * about display properties that should be changed. A property will be | 43 * about display properties that should be changed. A property will be |
| 33 * changed only if a new value for it is specified in |info|. | 44 * changed only if a new value for it is specified in |info|. |
| 34 * @param {function():void=} callback Empty function called when the function | 45 * @param {function():void=} callback Empty function called when the function |
| 35 * finishes. To find out whether the function succeeded, | 46 * finishes. To find out whether the function succeeded, |
| 36 * $(ref:runtime.lastError) should be queried. | 47 * $(ref:runtime.lastError) should be queried. |
| 37 * @see https://developer.chrome.com/extensions/system.display#method-setDispl
ayProperties | 48 * @see https://developer.chrome.com/extensions/system.display#method-setDispl
ayProperties |
| 38 */ | 49 */ |
| 39 setDisplayProperties: assertNotReached, | 50 setDisplayProperties: assertNotReached, |
| 40 | 51 |
| 41 /** | 52 /** |
| 42 * Set the layout for all displays. Any display not included will use the | 53 * Set the layout for all displays. Any display not included will use the |
| 43 * default layout. If a layout would overlap or be otherwise invalid it will | 54 * default layout. If a layout would overlap or be otherwise invalid it will |
| 44 * be adjusted to a valid layout. After layout is resolved, an | 55 * be adjusted to a valid layout. After layout is resolved, an |
| 45 * onDisplayChanged event will be triggered. | 56 * onDisplayChanged event will be triggered. NOTE: This is only available to |
| 46 * @param {!Array<!chrome.system.display.DisplayLayout>} layouts | 57 * Chrome OS Kiosk apps and Web UI. |
| 58 * @param {!Array<!chrome.system.display.DisplayLayout>} layouts The layout |
| 59 * information, required for all displays except the primary display. |
| 60 * @param {function():void=} callback Empty function called when the function |
| 61 * finishes. To find out whether the function succeeded, |
| 62 * $(ref:runtime.lastError) should be queried. |
| 47 * @see https://developer.chrome.com/extensions/system.display#method-setDispl
ayLayout | 63 * @see https://developer.chrome.com/extensions/system.display#method-setDispl
ayLayout |
| 48 */ | 64 */ |
| 49 setDisplayLayout: assertNotReached, | 65 setDisplayLayout: assertNotReached, |
| 50 | 66 |
| 51 /** | 67 /** |
| 52 * Enables/disables the unified desktop feature. Note that this simply enables | 68 * Enables/disables the unified desktop feature. Note that this simply enables |
| 53 * the feature, but will not change the actual desktop mode. (That is, if the | 69 * the feature, but will not change the actual desktop mode. (That is, if the |
| 54 * desktop is in mirror mode, it will stay in mirror mode) NOTE: This is only | 70 * desktop is in mirror mode, it will stay in mirror mode) NOTE: This is only |
| 55 * available to Chrome OS Kiosk apps and Web UI. | 71 * available to Chrome OS Kiosk apps and Web UI. |
| 56 * @param {boolean} enabled True if unified desktop should be enabled. | 72 * @param {boolean} enabled True if unified desktop should be enabled. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 105 |
| 90 /** | 106 /** |
| 91 * Complete overscan adjustments for a display by saving the current values | 107 * Complete overscan adjustments for a display by saving the current values |
| 92 * and hiding the overlay. | 108 * and hiding the overlay. |
| 93 * @param {string} id The display's unique identifier. | 109 * @param {string} id The display's unique identifier. |
| 94 * @see https://developer.chrome.com/extensions/system.display#method-overscan
CalibrationComplete | 110 * @see https://developer.chrome.com/extensions/system.display#method-overscan
CalibrationComplete |
| 95 */ | 111 */ |
| 96 overscanCalibrationComplete: assertNotReached, | 112 overscanCalibrationComplete: assertNotReached, |
| 97 | 113 |
| 98 /** | 114 /** |
| 99 * Starts native touch calibration for a display. This will show an overlay on | 115 * Displays the native touch calibration UX for the display with |id| as |
| 100 * the screen and initialize the UX for touch calibration. If another native | 116 * display id. This will show an overlay on the screen with required |
| 101 * touch calibration is already in progress this will throw an error. | 117 * instructions on how to proceed. The callback will be invoked in case of |
| 118 * successful calibraion only. If the calibration fails, this will throw an |
| 119 * error. |
| 102 * @param {string} id The display's unique identifier. | 120 * @param {string} id The display's unique identifier. |
| 121 * @param {function(boolean):void=} callback Optional callback to inform the |
| 122 * caller that the touch calibration has ended. The argument of the |
| 123 * callback informs if the calibration was a success or not. |
| 103 * @see https://developer.chrome.com/extensions/system.display#method-showNati
veTouchCalibration | 124 * @see https://developer.chrome.com/extensions/system.display#method-showNati
veTouchCalibration |
| 104 */ | 125 */ |
| 105 showNativeTouchCalibration: assertNotReached, | 126 showNativeTouchCalibration: assertNotReached, |
| 106 | 127 |
| 107 /** | 128 /** |
| 108 * Starts custom touch calibration for a display. This should be called when | 129 * Starts custom touch calibration for a display. This should be called when |
| 109 * using a custom UX for collecting calibration data. If another touch | 130 * using a custom UX for collecting calibration data. If another touch |
| 110 * calibration is already in progress this will throw an error. | 131 * calibration is already in progress this will throw an error. |
| 111 * @param {string} id The display's unique identifier. | 132 * @param {string} id The display's unique identifier. |
| 112 * @see https://developer.chrome.com/extensions/system.display#method-startCus
tomTouchCalibration | 133 * @see https://developer.chrome.com/extensions/system.display#method-startCus
tomTouchCalibration |
| 113 */ | 134 */ |
| 114 startCustomTouchCalibration: assertNotReached, | 135 startCustomTouchCalibration: assertNotReached, |
| 115 | 136 |
| 116 /** | 137 /** |
| 117 * Sets the touch calibration pairs for a display. These |pairs| would be used | 138 * Sets the touch calibration pairs for a display. These |pairs| would be used |
| 118 * to calibrate the touch screen for display with |id| called in | 139 * to calibrate the touch screen for display with |id| called in |
| 119 * startCustomTouchCalibration(). Always call |startCustomTouchCalibration| | 140 * startCustomTouchCalibration(). Always call |startCustomTouchCalibration| |
| 120 * before calling this method. If another touch calibration is already in | 141 * before calling this method. If another touch calibration is already in |
| 121 * progress this will throw an error. | 142 * progress this will throw an error. |
| 122 * @param {!chrome.system.display.TouchCalibrationPairQuad} pairs The pairs of | 143 * @param {!chrome.system.display.TouchCalibrationPairQuad} pairs The pairs of |
| 123 * point used to calibrate the display. | 144 * point used to calibrate the display. |
| 124 * @param {!chrome.system.display.Bounds} bounds Bounds of the display when | 145 * @param {!chrome.system.display.Bounds} bounds Bounds of the display when |
| 125 * the touch calibration was performed. |bounds.left| and |bounds.top| | 146 * the touch calibration was performed. |bounds.left| and |bounds.top| |
| 126 * values are ignored. | 147 * values are ignored. |
| 127 * @see https://developer.chrome.com/extensions/system.display#method-complete
CustomTouchCalibration | 148 * @see https://developer.chrome.com/extensions/system.display#method-complete
CustomTouchCalibration |
| 128 */ | 149 */ |
| 129 completeCustomTouchCalibration: assertNotReached, | 150 completeCustomTouchCalibration: assertNotReached, |
| 130 | 151 |
| 131 /** | 152 /** |
| 132 * Resets the touch calibration for the display and removes the saved | 153 * Resets the touch calibration for the display and brings it back to its |
| 133 * calibration data. | 154 * default state by clearing any touch calibration data associated with the |
| 155 * display. |
| 134 * @param {string} id The display's unique identifier. | 156 * @param {string} id The display's unique identifier. |
| 135 * @see https://developer.chrome.com/extensions/system.display#method-clearTou
chCalibration | 157 * @see https://developer.chrome.com/extensions/system.display#method-clearTou
chCalibration |
| 136 */ | 158 */ |
| 137 clearTouchCalibration: assertNotReached, | 159 clearTouchCalibration: assertNotReached, |
| 138 }; | 160 }; |
| 139 | 161 |
| 140 /** | 162 /** |
| 141 * Fired when anything changes to the display configuration. | 163 * Fired when anything changes to the display configuration. |
| 142 * @type {!ChromeEvent} | 164 * @type {!ChromeEvent} |
| 143 * @see https://developer.chrome.com/extensions/system.display#event-onDisplayCh
anged | 165 * @see https://developer.chrome.com/extensions/system.display#event-onDisplayCh
anged |
| 144 */ | 166 */ |
| 145 SystemDisplay.prototype.onDisplayChanged; | 167 SystemDisplay.prototype.onDisplayChanged; |
| OLD | NEW |