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

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

Issue 2072633002: Add Get/SetDisplayLayout to chrome.system.display extension API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win Created 4 years, 6 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 * uiScale: number, 52 * uiScale: number,
53 * deviceScaleFactor: number, 53 * deviceScaleFactor: number,
54 * isNative: boolean, 54 * isNative: boolean,
55 * isSelected: boolean 55 * isSelected: boolean
56 * }} 56 * }}
57 * @see https://developer.chrome.com/extensions/system.display#type-DisplayMode 57 * @see https://developer.chrome.com/extensions/system.display#type-DisplayMode
58 */ 58 */
59 chrome.system.display.DisplayMode; 59 chrome.system.display.DisplayMode;
60 60
61 /** 61 /**
62 * @enum {string}
63 * @see https://developer.chrome.com/extensions/system.display#type-LayoutPositi on
64 */
65 chrome.system.display.LayoutPosition = {
66 TOP: 'top',
67 RIGHT: 'right',
68 BOTTOM: 'bottom',
69 LEFT: 'left',
70 };
71
72 /**
73 * @typedef {{
74 * id: string,
75 * parentId: string,
76 * position: !chrome.system.display.LayoutPosition,
77 * offset: number
78 * }}
79 * @see https://developer.chrome.com/extensions/system.display#type-DisplayLayou t
80 */
81 chrome.system.display.DisplayLayout;
82
83 /**
62 * @typedef {{ 84 * @typedef {{
63 * id: string, 85 * id: string,
64 * name: string, 86 * name: string,
65 * mirroringSourceId: string, 87 * mirroringSourceId: string,
66 * isPrimary: boolean, 88 * isPrimary: boolean,
67 * isInternal: boolean, 89 * isInternal: boolean,
68 * isEnabled: boolean, 90 * isEnabled: boolean,
69 * dpiX: number, 91 * dpiX: number,
70 * dpiY: number, 92 * dpiY: number,
71 * rotation: number, 93 * rotation: number,
(...skipping 22 matching lines...) Expand all
94 116
95 /** 117 /**
96 * Get the information of all attached display devices. 118 * Get the information of all attached display devices.
97 * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void} 119 * @param {function(!Array<!chrome.system.display.DisplayUnitInfo>):void}
98 * callback 120 * callback
99 * @see https://developer.chrome.com/extensions/system.display#method-getInfo 121 * @see https://developer.chrome.com/extensions/system.display#method-getInfo
100 */ 122 */
101 chrome.system.display.getInfo = function(callback) {}; 123 chrome.system.display.getInfo = function(callback) {};
102 124
103 /** 125 /**
126 * Get the layout info for all displays. NOTE: This is only available to Chrome
127 * OS Kiosk apps and Web UI.
128 * @param {function(!Array<!chrome.system.display.DisplayLayout>):void} callback
129 * @see https://developer.chrome.com/extensions/system.display#method-getDisplay Layout
130 */
131 chrome.system.display.getDisplayLayout = function(callback) {};
132
133 /**
104 * Updates the properties for the display specified by |id|, according to the 134 * Updates the properties for the display specified by |id|, according to the
105 * information provided in |info|. On failure, $(ref:runtime.lastError) will be 135 * information provided in |info|. On failure, $(ref:runtime.lastError) will be
106 * set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI. 136 * set. NOTE: This is only available to Chrome OS Kiosk apps and Web UI.
107 * @param {string} id The display's unique identifier. 137 * @param {string} id The display's unique identifier.
108 * @param {!chrome.system.display.DisplayProperties} info The information about 138 * @param {!chrome.system.display.DisplayProperties} info The information about
109 * display properties that should be changed. A property will be changed 139 * display properties that should be changed. A property will be changed
110 * only if a new value for it is specified in |info|. 140 * only if a new value for it is specified in |info|.
111 * @param {function():void=} callback Empty function called when the function 141 * @param {function():void=} callback Empty function called when the function
112 * finishes. To find out whether the function succeeded, 142 * finishes. To find out whether the function succeeded,
113 * $(ref:runtime.lastError) should be queried. 143 * $(ref:runtime.lastError) should be queried.
114 * @see https://developer.chrome.com/extensions/system.display#method-setDisplay Properties 144 * @see https://developer.chrome.com/extensions/system.display#method-setDisplay Properties
115 */ 145 */
116 chrome.system.display.setDisplayProperties = function(id, info, callback) {}; 146 chrome.system.display.setDisplayProperties = function(id, info, callback) {};
117 147
118 /** 148 /**
149 * Set the layout for all displays. Any display not included will use the
150 * default layout. If a layout would overlap or be otherwise invalid it will be
151 * adjusted to a valid layout. After layout is resolved, an onDisplayChanged
152 * event will be triggered.
153 * @param {!Array<!chrome.system.display.DisplayLayout>} layouts
154 * @see https://developer.chrome.com/extensions/system.display#method-setDisplay Layout
155 */
156 chrome.system.display.setDisplayLayout = function(layouts) {};
157
158 /**
119 * Enables/disables the unified desktop feature. Note that this simply enables 159 * Enables/disables the unified desktop feature. Note that this simply enables
120 * the feature, but will not change the actual desktop mode. (That is, if the 160 * the feature, but will not change the actual desktop mode. (That is, if the
121 * desktop is in mirror mode, it will stay in mirror mode) NOTE: This is only 161 * desktop is in mirror mode, it will stay in mirror mode) NOTE: This is only
122 * available to Chrome OS Kiosk apps and Web UI. 162 * available to Chrome OS Kiosk apps and Web UI.
123 * @param {boolean} enabled True if unified desktop should be enabled. 163 * @param {boolean} enabled True if unified desktop should be enabled.
124 * @see https://developer.chrome.com/extensions/system.display#method-enableUnif iedDesktop 164 * @see https://developer.chrome.com/extensions/system.display#method-enableUnif iedDesktop
125 */ 165 */
126 chrome.system.display.enableUnifiedDesktop = function(enabled) {}; 166 chrome.system.display.enableUnifiedDesktop = function(enabled) {};
127 167
128 /** 168 /**
129 * Starts overscan calibration for a display. This will show an overlay on the 169 * Starts overscan calibration for a display. This will show an overlay on the
130 * screen indicating the current overscan insets. 170 * screen indicating the current overscan insets. If overscan calibration for
171 * display |id| is in progress this will reset calibration.
131 * @param {string} id The display's unique identifier. 172 * @param {string} id The display's unique identifier.
132 * @see https://developer.chrome.com/extensions/system.display#method-overscanCa librationStart 173 * @see https://developer.chrome.com/extensions/system.display#method-overscanCa librationStart
133 */ 174 */
134 chrome.system.display.overscanCalibrationStart = function(id) {}; 175 chrome.system.display.overscanCalibrationStart = function(id) {};
135 176
136 /** 177 /**
137 * Adjusts the current overscan insets for a display. Typically this should 178 * Adjusts the current overscan insets for a display. Typically this should
138 * etiher move the display along an axis (e.g. left+right have the same value) 179 * etiher move the display along an axis (e.g. left+right have the same value)
139 * or scale it along an axis (e.g. top+bottom have opposite values). Each Adjust 180 * or scale it along an axis (e.g. top+bottom have opposite values). Each Adjust
140 * call is cumulative with previous calls since Start. 181 * call is cumulative with previous calls since Start.
(...skipping 19 matching lines...) Expand all
160 * @see https://developer.chrome.com/extensions/system.display#method-overscanCa librationComplete 201 * @see https://developer.chrome.com/extensions/system.display#method-overscanCa librationComplete
161 */ 202 */
162 chrome.system.display.overscanCalibrationComplete = function(id) {}; 203 chrome.system.display.overscanCalibrationComplete = function(id) {};
163 204
164 /** 205 /**
165 * Fired when anything changes to the display configuration. 206 * Fired when anything changes to the display configuration.
166 * @type {!ChromeEvent} 207 * @type {!ChromeEvent}
167 * @see https://developer.chrome.com/extensions/system.display#event-onDisplayCh anged 208 * @see https://developer.chrome.com/extensions/system.display#event-onDisplayCh anged
168 */ 209 */
169 chrome.system.display.onDisplayChanged; 210 chrome.system.display.onDisplayChanged;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698