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

Side by Side Diff: third_party/closure_compiler/externs/system_display.js

Issue 2802603005: MD Settings: Display: Add unified desktop control and modify api (Closed)
Patch Set: Rebase Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // NOTE: The format of types has changed. 'FooType' is now 7 // NOTE: The format of types has changed. 'FooType' is now
8 // 'chrome.system.display.FooType'. 8 // 'chrome.system.display.FooType'.
9 // Please run the closure compiler before committing changes. 9 // Please run the closure compiler before committing changes.
10 // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_comp ilation.md 10 // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_comp ilation.md
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 chrome.system.display.DisplayLayout; 110 chrome.system.display.DisplayLayout;
111 111
112 /** 112 /**
113 * @typedef {{ 113 * @typedef {{
114 * id: string, 114 * id: string,
115 * name: string, 115 * name: string,
116 * mirroringSourceId: string, 116 * mirroringSourceId: string,
117 * isPrimary: boolean, 117 * isPrimary: boolean,
118 * isInternal: boolean, 118 * isInternal: boolean,
119 * isEnabled: boolean, 119 * isEnabled: boolean,
120 * isUnified: boolean,
120 * dpiX: number, 121 * dpiX: number,
121 * dpiY: number, 122 * dpiY: number,
122 * rotation: number, 123 * rotation: number,
123 * bounds: !chrome.system.display.Bounds, 124 * bounds: !chrome.system.display.Bounds,
124 * overscan: !chrome.system.display.Insets, 125 * overscan: !chrome.system.display.Insets,
125 * workArea: !chrome.system.display.Bounds, 126 * workArea: !chrome.system.display.Bounds,
126 * modes: !Array<!chrome.system.display.DisplayMode>, 127 * modes: !Array<!chrome.system.display.DisplayMode>,
127 * hasTouchSupport: boolean 128 * hasTouchSupport: boolean
128 * }} 129 * }}
129 * @see https://developer.chrome.com/extensions/system.display#type-DisplayUnitI nfo 130 * @see https://developer.chrome.com/extensions/system.display#type-DisplayUnitI nfo
130 */ 131 */
131 chrome.system.display.DisplayUnitInfo; 132 chrome.system.display.DisplayUnitInfo;
132 133
133 /** 134 /**
134 * @typedef {{ 135 * @typedef {{
136 * isUnified: (boolean|undefined),
135 * mirroringSourceId: (string|undefined), 137 * mirroringSourceId: (string|undefined),
136 * isPrimary: (boolean|undefined), 138 * isPrimary: (boolean|undefined),
137 * overscan: (!chrome.system.display.Insets|undefined), 139 * overscan: (!chrome.system.display.Insets|undefined),
138 * rotation: (number|undefined), 140 * rotation: (number|undefined),
139 * boundsOriginX: (number|undefined), 141 * boundsOriginX: (number|undefined),
140 * boundsOriginY: (number|undefined), 142 * boundsOriginY: (number|undefined),
141 * displayMode: (!chrome.system.display.DisplayMode|undefined) 143 * displayMode: (!chrome.system.display.DisplayMode|undefined)
142 * }} 144 * }}
143 * @see https://developer.chrome.com/extensions/system.display#type-DisplayPrope rties 145 * @see https://developer.chrome.com/extensions/system.display#type-DisplayPrope rties
144 */ 146 */
145 chrome.system.display.DisplayProperties; 147 chrome.system.display.DisplayProperties;
146 148
147 /** 149 /**
148 * Get the information of all attached display devices. 150 * @typedef {{
151 * singleUnified: (boolean|undefined)
152 * }}
153 * @see https://developer.chrome.com/extensions/system.display#type-GetInfoFlags
154 */
155 chrome.system.display.GetInfoFlags;
156
157 /**
158 * Requests the information for all attached display devices.
159 * @param {!chrome.system.display.GetInfoFlags} flags See $(ref:GetInfoFlags).
149 * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void} 160 * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void}
150 * callback 161 * callback This will be invoked with an array of $(ref:DisplayUnitInfo).
151 * @see https://developer.chrome.com/extensions/system.display#method-getInfo 162 * @see https://developer.chrome.com/extensions/system.display#method-getInfo
152 */ 163 */
153 chrome.system.display.getInfo = function(callback) {}; 164 chrome.system.display.getInfo = function(flags, callback) {};
154 165
155 /** 166 /**
156 * Get the layout info for all displays. NOTE: This is only available to Chrome 167 * Requests the layout info for all displays. NOTE: This is only available to
157 * OS Kiosk apps and Web UI. 168 * Chrome OS Kiosk apps and Web UI.
158 * @param {function(!Array<!chrome.system.display.DisplayLayout>):void} callback 169 * @param {function(!Array<!chrome.system.display.DisplayLayout>):void} callback
170 * This will be invoked with an array of $(ref:DisplayLayout).
159 * @see https://developer.chrome.com/extensions/system.display#method-getDisplay Layout 171 * @see https://developer.chrome.com/extensions/system.display#method-getDisplay Layout
160 */ 172 */
161 chrome.system.display.getDisplayLayout = function(callback) {}; 173 chrome.system.display.getDisplayLayout = function(callback) {};
162 174
163 /** 175 /**
164 * Updates the properties for the display specified by |id|, according to the 176 * Updates the properties for the display specified by |id|, according to the
165 * information provided in |info|. On failure, $(ref:runtime.lastError) will be 177 * information provided in |info|. On failure, $(ref:runtime.lastError) will be
166 * set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. 178 * set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI.
167 * @param {string} id The display's unique identifier. 179 * @param {string} id The display's unique identifier.
168 * @param {!chrome.system.display.DisplayProperties} info The information about 180 * @param {!chrome.system.display.DisplayProperties} info The information about
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 243
232 /** 244 /**
233 * Complete overscan adjustments for a display by saving the current values and 245 * Complete overscan adjustments for a display by saving the current values and
234 * hiding the overlay. 246 * hiding the overlay.
235 * @param {string} id The display's unique identifier. 247 * @param {string} id The display's unique identifier.
236 * @see https://developer.chrome.com/extensions/system.display#method-overscanCa librationComplete 248 * @see https://developer.chrome.com/extensions/system.display#method-overscanCa librationComplete
237 */ 249 */
238 chrome.system.display.overscanCalibrationComplete = function(id) {}; 250 chrome.system.display.overscanCalibrationComplete = function(id) {};
239 251
240 /** 252 /**
241 * Starts native touch calibration for a display. This will show an overlay on 253 * Displays the native touch calibration UX for the display with |id| as display
242 * the screen and initialize the UX for touch calibration. If another native 254 * id. This will show an overlay on the screen with required instructions on how
243 * touch calibration is already in progress this will throw an error. 255 * to proceed. The callback will be invoked in case of successful calibraion
256 * only. If the calibration fails, this will throw an error.
244 * @param {string} id The display's unique identifier. 257 * @param {string} id The display's unique identifier.
258 * @param {function(boolean):void=} callback Optional callback to inform the
259 * caller that the touch calibration has ended. The argument of the
260 * callback informs if the calibration was a success or not.
245 * @see https://developer.chrome.com/extensions/system.display#method-showNative TouchCalibration 261 * @see https://developer.chrome.com/extensions/system.display#method-showNative TouchCalibration
246 */ 262 */
247 chrome.system.display.showNativeTouchCalibration = function(id) {}; 263 chrome.system.display.showNativeTouchCalibration = function(id, callback) {};
248 264
249 /** 265 /**
250 * Starts custom touch calibration for a display. This should be called when 266 * Starts custom touch calibration for a display. This should be called when
251 * using a custom UX for collecting calibration data. If another touch 267 * using a custom UX for collecting calibration data. If another touch
252 * calibration is already in progress this will throw an error. 268 * calibration is already in progress this will throw an error.
253 * @param {string} id The display's unique identifier. 269 * @param {string} id The display's unique identifier.
254 * @see https://developer.chrome.com/extensions/system.display#method-startCusto mTouchCalibration 270 * @see https://developer.chrome.com/extensions/system.display#method-startCusto mTouchCalibration
255 */ 271 */
256 chrome.system.display.startCustomTouchCalibration = function(id) {}; 272 chrome.system.display.startCustomTouchCalibration = function(id) {};
257 273
258 /** 274 /**
259 * Sets the touch calibration pairs for a display. These |pairs| would be used 275 * Sets the touch calibration pairs for a display. These |pairs| would be used
260 * to calibrate the touch screen for display with |id| called in 276 * to calibrate the touch screen for display with |id| called in
261 * startCustomTouchCalibration(). Always call |startCustomTouchCalibration| 277 * startCustomTouchCalibration(). Always call |startCustomTouchCalibration|
262 * before calling this method. If another touch calibration is already in 278 * before calling this method. If another touch calibration is already in
263 * progress this will throw an error. 279 * progress this will throw an error.
264 * @param {!chrome.system.display.TouchCalibrationPairQuad} pairs The pairs of 280 * @param {!chrome.system.display.TouchCalibrationPairQuad} pairs The pairs of
265 * point used to calibrate the display. 281 * point used to calibrate the display.
266 * @param {!chrome.system.display.Bounds} bounds Bounds of the display when the 282 * @param {!chrome.system.display.Bounds} bounds Bounds of the display when the
267 * touch calibration was performed. |bounds.left| and |bounds.top| 283 * touch calibration was performed. |bounds.left| and |bounds.top|
268 * values are ignored. 284 * values are ignored.
269 * @see https://developer.chrome.com/extensions/system.display#method-completeCu stomTouchCalibration 285 * @see https://developer.chrome.com/extensions/system.display#method-completeCu stomTouchCalibration
270 */ 286 */
271 chrome.system.display.completeCustomTouchCalibration = function(pairs, bounds) { }; 287 chrome.system.display.completeCustomTouchCalibration = function(pairs, bounds) { };
272 288
273 /** 289 /**
274 * Resets the touch calibration for the display and removes the saved 290 * Resets the touch calibration for the display and brings it back to its
275 * calibration data. 291 * default state by clearing any touch calibration data associated with the
292 * display.
276 * @param {string} id The display's unique identifier. 293 * @param {string} id The display's unique identifier.
277 * @see https://developer.chrome.com/extensions/system.display#method-clearTouch Calibration 294 * @see https://developer.chrome.com/extensions/system.display#method-clearTouch Calibration
278 */ 295 */
279 chrome.system.display.clearTouchCalibration = function(id) {}; 296 chrome.system.display.clearTouchCalibration = function(id) {};
280 297
281 /** 298 /**
282 * Fired when anything changes to the display configuration. 299 * Fired when anything changes to the display configuration.
283 * @type {!ChromeEvent} 300 * @type {!ChromeEvent}
284 * @see https://developer.chrome.com/extensions/system.display#event-onDisplayCh anged 301 * @see https://developer.chrome.com/extensions/system.display#event-onDisplayCh anged
285 */ 302 */
286 chrome.system.display.onDisplayChanged; 303 chrome.system.display.onDisplayChanged;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698