| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 // Accessors for testing. | 342 // Accessors for testing. |
| 343 [nodoc] boolean hasFrameColor; | 343 [nodoc] boolean hasFrameColor; |
| 344 [nodoc] long activeFrameColor; | 344 [nodoc] long activeFrameColor; |
| 345 [nodoc] long inactiveFrameColor; | 345 [nodoc] long inactiveFrameColor; |
| 346 | 346 |
| 347 // Set whether the window should stay above most other windows. Requires the | 347 // Set whether the window should stay above most other windows. Requires the |
| 348 // <code>"alwaysOnTopWindows"</code> permission. | 348 // <code>"alwaysOnTopWindows"</code> permission. |
| 349 static void setAlwaysOnTop(boolean alwaysOnTop); | 349 static void setAlwaysOnTop(boolean alwaysOnTop); |
| 350 | 350 |
| 351 // Does the window allow a transparent background? |
| 352 static boolean alphaEnabled(); |
| 353 |
| 351 // The JavaScript 'window' object for the created child. | 354 // The JavaScript 'window' object for the created child. |
| 352 [instanceOf=Window] object contentWindow; | 355 [instanceOf=Window] object contentWindow; |
| 353 | 356 |
| 354 // The id the window was created with. | 357 // The id the window was created with. |
| 355 DOMString id; | 358 DOMString id; |
| 356 | 359 |
| 357 // The position, size and constraints of the window's content, which does | 360 // The position, size and constraints of the window's content, which does |
| 358 // not include window decorations. | 361 // not include window decorations. |
| 359 // This property is new in Chrome 36. | 362 // This property is new in Chrome 36. |
| 360 Bounds innerBounds; | 363 Bounds innerBounds; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 interface Events { | 413 interface Events { |
| 411 // Fired when the window is resized. | 414 // Fired when the window is resized. |
| 412 [nocompile] static void onBoundsChanged(); | 415 [nocompile] static void onBoundsChanged(); |
| 413 | 416 |
| 414 // Fired when the window is closed. | 417 // Fired when the window is closed. |
| 415 [nocompile] static void onClosed(); | 418 [nocompile] static void onClosed(); |
| 416 | 419 |
| 417 // Fired when the window is fullscreened. | 420 // Fired when the window is fullscreened. |
| 418 [nocompile] static void onFullscreened(); | 421 [nocompile] static void onFullscreened(); |
| 419 | 422 |
| 423 // Fired when the alphaEnabled flag changes. |
| 424 [nocompile] static void onAlphaEnabledChanged(); |
| 425 |
| 420 // Fired when the window is maximized. | 426 // Fired when the window is maximized. |
| 421 [nocompile] static void onMaximized(); | 427 [nocompile] static void onMaximized(); |
| 422 | 428 |
| 423 // Fired when the window is minimized. | 429 // Fired when the window is minimized. |
| 424 [nocompile] static void onMinimized(); | 430 [nocompile] static void onMinimized(); |
| 425 | 431 |
| 426 // Fired when the window is restored from being minimized or maximized. | 432 // Fired when the window is restored from being minimized or maximized. |
| 427 [nocompile] static void onRestored(); | 433 [nocompile] static void onRestored(); |
| 428 }; | 434 }; |
| 429 }; | 435 }; |
| OLD | NEW |