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

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

Issue 26427002: Add always-on-top property to app windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cache state of isAlwaysOnTop in widget. Fixed clobber in x11 window init. Created 7 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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>chrome.app.window</code> API to create windows. Windows 5 // Use the <code>chrome.app.window</code> API to create windows. Windows
6 // have an optional frame with title bar and size controls. They are not 6 // have an optional frame with title bar and size controls. They are not
7 // associated with any Chrome browser windows. 7 // associated with any Chrome browser windows.
8 namespace app.window { 8 namespace app.window {
9 dictionary Bounds { 9 dictionary Bounds {
10 long? left; 10 long? left;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // If true, the window will be resizable by the user. Defaults to true. 97 // If true, the window will be resizable by the user. Defaults to true.
98 boolean? resizable; 98 boolean? resizable;
99 99
100 // By default if you specify an id for the window, the window will only be 100 // By default if you specify an id for the window, the window will only be
101 // created if another window with the same id doesn't already exist. If a 101 // created if another window with the same id doesn't already exist. If a
102 // window with the same id already exists that window is activated instead. 102 // window with the same id already exists that window is activated instead.
103 // If you do want to create multiple windows with the same id, you can 103 // If you do want to create multiple windows with the same id, you can
104 // set this property to false. 104 // set this property to false.
105 boolean? singleton; 105 boolean? singleton;
106
107 // If true, the window will stay above most other windows. If there are
108 // multiple windows of this kind, the currently focused window will be in
109 // the foreground. Defaults to false. Call <code>setAlwaysOnTop()</code> on
110 // the window to change this property after creation.
111 // Currently available in the Dev channel only.
112 [nodoc] boolean? alwaysOnTop;
benwells 2013/10/09 02:00:50 Why are these nodoc?
tmdiep 2013/10/09 06:18:08 Removed [nodoc].
106 }; 113 };
107 114
108 // Called in the creating window (parent) before the load event is called in 115 // Called in the creating window (parent) before the load event is called in
109 // the created window (child). The parent can set fields or functions on the 116 // the created window (child). The parent can set fields or functions on the
110 // child usable from onload. E.g. background.js:<br> 117 // child usable from onload. E.g. background.js:<br>
111 // <code>function(created_window) { created_window.contentWindow.foo = 118 // <code>function(created_window) { created_window.contentWindow.foo =
112 // function () { }; };</code> 119 // function () { }; };</code>
113 // <br>window.js:<br> 120 // <br>window.js:<br>
114 // <code>window.onload = function () { foo(); }</code> 121 // <code>window.onload = function () { foo(); }</code>
115 callback CreateWindowCallback = 122 callback CreateWindowCallback =
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 [nocompile] static Bounds getBounds(); 172 [nocompile] static Bounds getBounds();
166 173
167 // Set the window's bounds. 174 // Set the window's bounds.
168 static void setBounds(Bounds bounds); 175 static void setBounds(Bounds bounds);
169 176
170 // Set the app icon for the window (experimental). 177 // Set the app icon for the window (experimental).
171 // Currently this is only being implemented on Ash. 178 // Currently this is only being implemented on Ash.
172 // TODO(stevenjb): Investigate implementing this on Windows and OSX. 179 // TODO(stevenjb): Investigate implementing this on Windows and OSX.
173 [nodoc] static void setIcon(DOMString icon_url); 180 [nodoc] static void setIcon(DOMString icon_url);
174 181
182 // Is the window always on top?
183 // Currently available in the Dev channel only.
184 [nodoc] static boolean isAlwaysOnTop();
185
186 // Set whether the window should stay above most other windows.
187 // Currently available in the Dev channel only.
188 [nodoc] static void setAlwaysOnTop(boolean always_on_top);
189
175 // The JavaScript 'window' object for the created child. 190 // The JavaScript 'window' object for the created child.
176 [instanceOf=Window] object contentWindow; 191 [instanceOf=Window] object contentWindow;
177 }; 192 };
178 193
179 interface Functions { 194 interface Functions {
180 // The size and position of a window can be specified in a number of 195 // The size and position of a window can be specified in a number of
181 // different ways. The most simple option is not specifying anything at 196 // different ways. The most simple option is not specifying anything at
182 // all, in which case a default size and platform dependent position will 197 // all, in which case a default size and platform dependent position will
183 // be used. 198 // be used.
184 // 199 //
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // Fired when the window is maximized. 235 // Fired when the window is maximized.
221 [nocompile] static void onMaximized(); 236 [nocompile] static void onMaximized();
222 237
223 // Fired when the window is minimized. 238 // Fired when the window is minimized.
224 [nocompile] static void onMinimized(); 239 [nocompile] static void onMinimized();
225 240
226 // Fired when the window is restored from being minimized or maximized. 241 // Fired when the window is restored from being minimized or maximized.
227 [nocompile] static void onRestored(); 242 [nocompile] static void onRestored();
228 }; 243 };
229 }; 244 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698