OLD | NEW |
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 | 9 |
10 // Previously named Bounds. | 10 // Previously named Bounds. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // to disable this style on nested elements.<br> | 214 // to disable this style on nested elements.<br> |
215 // Use of <code>FrameOptions</code> is only supported in dev channel. | 215 // Use of <code>FrameOptions</code> is only supported in dev channel. |
216 (DOMString or FrameOptions)? frame; | 216 (DOMString or FrameOptions)? frame; |
217 | 217 |
218 // Size and position of the content in the window (excluding the titlebar). | 218 // Size and position of the content in the window (excluding the titlebar). |
219 // If an id is also specified and a window with a matching id has been shown | 219 // If an id is also specified and a window with a matching id has been shown |
220 // before, the remembered bounds of the window will be used instead. | 220 // before, the remembered bounds of the window will be used instead. |
221 [deprecated="Use innerBounds or outerBounds."] ContentBounds? bounds; | 221 [deprecated="Use innerBounds or outerBounds."] ContentBounds? bounds; |
222 | 222 |
223 // Enable window background transparency. | 223 // Enable window background transparency. |
224 // Only supported in ash. Requires experimental API permission. | 224 // Only supported in ash. Requires app.window.alpha API permission. |
225 boolean? transparentBackground; | 225 boolean? alphaEnabled; |
226 | 226 |
227 // The initial state of the window, allowing it to be created already | 227 // The initial state of the window, allowing it to be created already |
228 // fullscreen, maximized, or minimized. Defaults to 'normal'. | 228 // fullscreen, maximized, or minimized. Defaults to 'normal'. |
229 State? state; | 229 State? state; |
230 | 230 |
231 // If true, the window will be created in a hidden state. Call show() on | 231 // If true, the window will be created in a hidden state. Call show() on |
232 // the window to show it once it has been created. Defaults to false. | 232 // the window to show it once it has been created. Defaults to false. |
233 boolean? hidden; | 233 boolean? hidden; |
234 | 234 |
235 // If true, the window will be resizable by the user. Defaults to true. | 235 // If true, the window will be resizable by the user. Defaults to true. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 342 |
343 // Accessors for testing. | 343 // Accessors for testing. |
344 [nodoc] boolean hasFrameColor; | 344 [nodoc] boolean hasFrameColor; |
345 [nodoc] long activeFrameColor; | 345 [nodoc] long activeFrameColor; |
346 [nodoc] long inactiveFrameColor; | 346 [nodoc] long inactiveFrameColor; |
347 | 347 |
348 // Set whether the window should stay above most other windows. Requires the | 348 // Set whether the window should stay above most other windows. Requires the |
349 // <code>"app.window.alwaysOnTop"</code> permission. | 349 // <code>"app.window.alwaysOnTop"</code> permission. |
350 static void setAlwaysOnTop(boolean alwaysOnTop); | 350 static void setAlwaysOnTop(boolean alwaysOnTop); |
351 | 351 |
| 352 // Does the window allow a transparent background? |
| 353 static boolean alphaEnabled(); |
| 354 |
352 // The JavaScript 'window' object for the created child. | 355 // The JavaScript 'window' object for the created child. |
353 [instanceOf=Window] object contentWindow; | 356 [instanceOf=Window] object contentWindow; |
354 | 357 |
355 // The id the window was created with. | 358 // The id the window was created with. |
356 DOMString id; | 359 DOMString id; |
357 | 360 |
358 // The position, size and constraints of the window's content, which does | 361 // The position, size and constraints of the window's content, which does |
359 // not include window decorations. | 362 // not include window decorations. |
360 // This property is new in Chrome 36. | 363 // This property is new in Chrome 36. |
361 Bounds innerBounds; | 364 Bounds innerBounds; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 interface Events { | 414 interface Events { |
412 // Fired when the window is resized. | 415 // Fired when the window is resized. |
413 [nocompile] static void onBoundsChanged(); | 416 [nocompile] static void onBoundsChanged(); |
414 | 417 |
415 // Fired when the window is closed. | 418 // Fired when the window is closed. |
416 [nocompile] static void onClosed(); | 419 [nocompile] static void onClosed(); |
417 | 420 |
418 // Fired when the window is fullscreened. | 421 // Fired when the window is fullscreened. |
419 [nocompile] static void onFullscreened(); | 422 [nocompile] static void onFullscreened(); |
420 | 423 |
| 424 // Fired when the alphaEnabled flag changes. |
| 425 [nocompile] static void onAlphaEnabledChanged(); |
| 426 |
421 // Fired when the window is maximized. | 427 // Fired when the window is maximized. |
422 [nocompile] static void onMaximized(); | 428 [nocompile] static void onMaximized(); |
423 | 429 |
424 // Fired when the window is minimized. | 430 // Fired when the window is minimized. |
425 [nocompile] static void onMinimized(); | 431 [nocompile] static void onMinimized(); |
426 | 432 |
427 // Fired when the window is restored from being minimized or maximized. | 433 // Fired when the window is restored from being minimized or maximized. |
428 [nocompile] static void onRestored(); | 434 [nocompile] static void onRestored(); |
429 }; | 435 }; |
430 }; | 436 }; |
OLD | NEW |