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

Side by Side Diff: extensions/common/api/system_display.idl

Issue 2802603005: MD Settings: Display: Add unified desktop control and modify api (Closed)
Patch Set: Fix closure and tests 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 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 // True if this is the primary display. 123 // True if this is the primary display.
124 boolean isPrimary; 124 boolean isPrimary;
125 125
126 // True if this is an internal display. 126 // True if this is an internal display.
127 boolean isInternal; 127 boolean isInternal;
128 128
129 // True if this display is enabled. 129 // True if this display is enabled.
130 boolean isEnabled; 130 boolean isEnabled;
131 131
132 // True for all displays when in unified desktop mode. See documentation
133 // for $(ref:enableUnifiedDesktop).
134 boolean isUnified;
135
132 // The number of pixels per inch along the x-axis. 136 // The number of pixels per inch along the x-axis.
133 double dpiX; 137 double dpiX;
134 138
135 // The number of pixels per inch along the y-axis. 139 // The number of pixels per inch along the y-axis.
136 double dpiY; 140 double dpiY;
137 141
138 // The display's clockwise rotation in degrees relative to the vertical 142 // The display's clockwise rotation in degrees relative to the vertical
139 // position. 143 // position.
140 // Currently exposed only on ChromeOS. Will be set to 0 on other platforms. 144 // Currently exposed only on ChromeOS. Will be set to 0 on other platforms.
141 long rotation; 145 long rotation;
(...skipping 14 matching lines...) Expand all
156 // The list of available display modes. The current mode will have 160 // The list of available display modes. The current mode will have
157 // isSelected=true. Only available on Chrome OS. Will be set to an empty 161 // isSelected=true. Only available on Chrome OS. Will be set to an empty
158 // array on other platforms. 162 // array on other platforms.
159 DisplayMode[] modes; 163 DisplayMode[] modes;
160 164
161 // True if this display has a touch input device associated with it. 165 // True if this display has a touch input device associated with it.
162 boolean hasTouchSupport; 166 boolean hasTouchSupport;
163 }; 167 };
164 168
165 dictionary DisplayProperties { 169 dictionary DisplayProperties {
170 // Chrome OS only. If set to true, changes the display mode to unified
171 // desktop (see $(ref:enableUnifiedDesktop) for details). If set to false,
172 // unified desktop mode will be disabled. This is only valid for the
173 // primary display. If provided, mirroringSourceId must not be provided and
174 // other properties may not apply. This is has no effect if not provided.
175 boolean? isUnified;
176
166 // Chrome OS only. If set and not empty, enables mirroring for this display. 177 // Chrome OS only. If set and not empty, enables mirroring for this display.
167 // Otherwise disables mirroring for this display. This value should indicate 178 // Otherwise disables mirroring for this display. This value should indicate
168 // the id of the source display to mirror, which must not be the same as the 179 // the id of the source display to mirror, which must not be the same as the
169 // id passed to setDisplayProperties. If set, no other property may be set. 180 // id passed to setDisplayProperties. If set, no other property may be set.
170 DOMString? mirroringSourceId; 181 DOMString? mirroringSourceId;
171 182
172 // If set to true, makes the display primary. No-op if set to false. 183 // If set to true, makes the display primary. No-op if set to false.
173 boolean? isPrimary; 184 boolean? isPrimary;
174 185
175 // If set, sets the display's overscan insets to the provided values. Note 186 // If set, sets the display's overscan insets to the provided values. Note
(...skipping 20 matching lines...) Expand all
196 long? boundsOriginX; 207 long? boundsOriginX;
197 208
198 // If set, updates the display's logical bounds origin along y-axis. 209 // If set, updates the display's logical bounds origin along y-axis.
199 // See documentation for <code>boundsOriginX</code> parameter. 210 // See documentation for <code>boundsOriginX</code> parameter.
200 long? boundsOriginY; 211 long? boundsOriginY;
201 212
202 // If set, updates the display mode to the mode matching this value. 213 // If set, updates the display mode to the mode matching this value.
203 DisplayMode? displayMode; 214 DisplayMode? displayMode;
204 }; 215 };
205 216
217 dictionary GetInfoFlags {
218 // If set to true, only a single $(ref:DisplayUnitInfo) will be returned
219 // by $(ref:getInfo) when in unified desktop mode (see
220 // $(ref:enableUnifiedDesktop)). Defaults to false.
221 boolean? singleUnified;
222 };
223
206 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); 224 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo);
207 callback DisplayLayoutCallback = void (DisplayLayout[] layouts); 225 callback DisplayLayoutCallback = void (DisplayLayout[] layouts);
208 callback SetDisplayUnitInfoCallback = void(); 226 callback SetDisplayUnitInfoCallback = void();
209 callback SetDisplayLayoutCallback = void(); 227 callback SetDisplayLayoutCallback = void();
210 callback NativeTouchCalibrationCallback = void(boolean success); 228 callback NativeTouchCalibrationCallback = void(boolean success);
211 229
212 interface Functions { 230 interface Functions {
213 // Get the information of all attached display devices. 231 // Requests the information for all attached display devices.
214 static void getInfo(DisplayInfoCallback callback); 232 // |flags|: Options affecting how the information is returned.
233 // |callback|: The callback to invoke with the results.
234 static void getInfo(optional GetInfoFlags flags,
235 DisplayInfoCallback callback);
215 236
216 // Get the layout info for all displays. 237 // Requests the layout info for all displays.
217 // NOTE: This is only available to Chrome OS Kiosk apps and Web UI. 238 // NOTE: This is only available to Chrome OS Kiosk apps and Web UI.
239 // |callback|: The callback to invoke with the results.
218 static void getDisplayLayout(DisplayLayoutCallback callback); 240 static void getDisplayLayout(DisplayLayoutCallback callback);
219 241
220 // Updates the properties for the display specified by |id|, according to 242 // Updates the properties for the display specified by |id|, according to
221 // the information provided in |info|. On failure, $(ref:runtime.lastError) 243 // the information provided in |info|. On failure, $(ref:runtime.lastError)
222 // will be set. 244 // will be set.
223 // NOTE: This is only available to Chrome OS Kiosk apps and Web UI. 245 // NOTE: This is only available to Chrome OS Kiosk apps and Web UI.
224 // |id|: The display's unique identifier. 246 // |id|: The display's unique identifier.
225 // |info|: The information about display properties that should be changed. 247 // |info|: The information about display properties that should be changed.
226 // A property will be changed only if a new value for it is specified in 248 // A property will be changed only if a new value for it is specified in
227 // |info|. 249 // |info|.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // display. 333 // display.
312 // |id|: The display's unique identifier. 334 // |id|: The display's unique identifier.
313 static void clearTouchCalibration(DOMString id); 335 static void clearTouchCalibration(DOMString id);
314 }; 336 };
315 337
316 interface Events { 338 interface Events {
317 // Fired when anything changes to the display configuration. 339 // Fired when anything changes to the display configuration.
318 static void onDisplayChanged(); 340 static void onDisplayChanged();
319 }; 341 };
320 }; 342 };
OLDNEW
« no previous file with comments | « extensions/browser/api/system_display/system_display_api.cc ('k') | third_party/closure_compiler/externs/system_display.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698