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

Side by Side Diff: chrome/common/extensions/api/system_info_display.idl

Issue 16817006: Add ability to change display settings to chrome.systemInfo.display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 namespace systemInfo.display { 5 namespace systemInfo.display {
6 6
7 dictionary Bounds { 7 dictionary Bounds {
8 // The x-coordinate of the upper-left corner. 8 // The x-coordinate of the upper-left corner.
9 long left; 9 long left;
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // The display's insets within its screen's bounds. 71 // The display's insets within its screen's bounds.
72 // Currently exposed only on ChromeOS. Will be set to empty insets on 72 // Currently exposed only on ChromeOS. Will be set to empty insets on
73 // other platforms. 73 // other platforms.
74 Insets overscan; 74 Insets overscan;
75 75
76 // The usable work area of the display within the display bounds. The work 76 // The usable work area of the display within the display bounds. The work
77 // area excludes areas of the display reserved for OS, for example taskbar 77 // area excludes areas of the display reserved for OS, for example taskbar
78 // and launcher. 78 // and launcher.
79 Bounds workArea; 79 Bounds workArea;
80 }; 80 };
81
82 dictionary SetDisplayUnitInfoParams {
83 // If set and not empty, starts mirroring between this and the display with
84 // the provided id (the system will determine which of the displays is
85 // actually mirrored).
86 // If set and not empty, stops mirroring between this and the display with
87 // the specified id (if mirroring is in progress).
88 // If set, no other parameter may be set.
89 DOMString? mirroringSourceId;
90
91 // If set to true, makes the display primary. No-op if set to false.
92 boolean? isPrimary;
93
94 // If set, sets the display's overscan insets to the provided values. Note
95 // that overscan values may not be negative or larger than a half of the
96 // screen's size. Overscan cannot be changed on the internal monitor.
97 // It's applied after <code>isPrimary</code> parameter.
98 Insets? overscan;
99
100 // If set, updates the display's rotation, if display rotation is enabled on
101 // the device. Legal values are [0, 90, 180, 270]. The rotation is set
102 // clockwise, relative to the display's vertical position.
103 // It's applied after <code>overscan</code> paramter.
104 long? rotation;
105
106 // If set, updates the display's logical bounds origin along x-axis. Applied
107 // together with <code>boundsOriginY</code>, if <code>boundsOriginY</code>
108 // is set. Note that, when updating the display origin, some constraints wil l
Greg Spencer (Chromium) 2013/06/12 23:14:15 >80 chars.
tbarzic 2013/06/12 23:40:41 Done.
109 // be applied, so the final bounds origin may be different than the one set.
110 // The final bounds can be retrieved using $ref:getDisplayInfo.
111 // The bounds origin is applied after <code>rotation</code>.
112 // The bounds origin cannot be changed on the primary display. Note that is
113 // also invalid to set bounds origin values if <code>isPrimary</code> is
114 // also set (as <code>isPrimary</code> parameter is applied first).
115 long? boundsOriginX;
116
117 // If set, updates the display's logical bounds origin along y-axis.
118 // See documentation for <code>boundsOriginX</code> parameter.
119 long? boundsOriginY;
120 };
81 121
82 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); 122 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo);
123 callback SetDisplayUnitInfoCallback = void();
83 124
84 interface Functions { 125 interface Functions {
85 // Get the information of all attached display devices. 126 // Get the information of all attached display devices.
86 static void getDisplayInfo(DisplayInfoCallback callback); 127 static void getDisplayInfo(DisplayInfoCallback callback);
128
129 // Updates the properties for the monitor specified by provided identifier,
130 // according to the provided parameters. On failure,
131 // $ref:runtime.lastError will be set.
132 // |id|: The display's unique identifier.
133 // |info|: The information about display parameters that should be changed,
134 // including their new values.
135 // |callback|: Empty function called when the function finishes. To find out
136 // whether the function succeeded, $ref:runtime.lastError should be
137 // queried.
138 static void setDisplayUnitInfo(
139 DOMString id,
140 SetDisplayUnitInfoParams info,
141 optional SetDisplayUnitInfoCallback callback);
87 }; 142 };
88 143
89 interface Events { 144 interface Events {
90 // Fired when anything changes to the display configuration. 145 // Fired when anything changes to the display configuration.
91 static void onDisplayChanged(); 146 static void onDisplayChanged();
92 }; 147 };
93 }; 148 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698