Chromium Code Reviews| 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. See the <a | 7 // associated with any Chrome browser windows. See the <a |
| 8 // href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/window-s tate"> | 8 // href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/window-s tate"> |
| 9 // Window State Sample</a> for a demonstration of these options. | 9 // Window State Sample</a> for a demonstration of these options. |
| 10 namespace app.window { | 10 namespace app.window { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 | 208 |
| 209 // Maximum width of the window. | 209 // Maximum width of the window. |
| 210 [deprecated="Use innerBounds or outerBounds."] long? maxWidth; | 210 [deprecated="Use innerBounds or outerBounds."] long? maxWidth; |
| 211 | 211 |
| 212 // Maximum height of the window. | 212 // Maximum height of the window. |
| 213 [deprecated="Use innerBounds or outerBounds."] long? maxHeight; | 213 [deprecated="Use innerBounds or outerBounds."] long? maxHeight; |
| 214 | 214 |
| 215 // Type of window to create. | 215 // Type of window to create. |
| 216 [nodoc] WindowType? type; | 216 [nodoc] WindowType? type; |
| 217 | 217 |
| 218 // Creates a special ime window. This window is not focusable and can be | |
| 219 // stacked above virtual keyboard window. This is restriced to component ime | |
| 220 // extensions. | |
| 221 // Requires app.window.ime API permission. | |
| 222 [nodoc] boolean? ime; | |
| 223 | |
| 218 // Frame type: <code>none</code> or <code>chrome</code> (defaults to | 224 // Frame type: <code>none</code> or <code>chrome</code> (defaults to |
| 219 // <code>chrome</code>). For <code>none</code>, the | 225 // <code>chrome</code>). For <code>none</code>, the |
| 220 // <code>-webkit-app-region</code> CSS property can be used to apply | 226 // <code>-webkit-app-region</code> CSS property can be used to apply |
| 221 // draggability to the app's window. <code>-webkit-app-region: drag</code> | 227 // draggability to the app's window. <code>-webkit-app-region: drag</code> |
| 222 // can be used to mark regions draggable. <code>no-drag</code> can be used | 228 // can be used to mark regions draggable. <code>no-drag</code> can be used |
| 223 // to disable this style on nested elements. | 229 // to disable this style on nested elements. |
| 224 // | 230 // |
| 225 // Use of <code>FrameOptions</code> is new in M36. | 231 // Use of <code>FrameOptions</code> is new in M36. |
| 226 (DOMString or FrameOptions)? frame; | 232 (DOMString or FrameOptions)? frame; |
| 227 | 233 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 362 [nodoc] boolean? firstShowHasHappened; | 368 [nodoc] boolean? firstShowHasHappened; |
| 363 | 369 |
| 364 // Set whether the window should stay above most other windows. Requires the | 370 // Set whether the window should stay above most other windows. Requires the |
| 365 // <code>"alwaysOnTopWindows"</code> permission. | 371 // <code>"alwaysOnTopWindows"</code> permission. |
| 366 static void setAlwaysOnTop(boolean alwaysOnTop); | 372 static void setAlwaysOnTop(boolean alwaysOnTop); |
| 367 | 373 |
| 368 // Can the window use alpha transparency? | 374 // Can the window use alpha transparency? |
| 369 // TODO(jackhou): Document this properly before going to stable. | 375 // TODO(jackhou): Document this properly before going to stable. |
| 370 [nodoc] static boolean alphaEnabled(); | 376 [nodoc] static boolean alphaEnabled(); |
| 371 | 377 |
| 378 // Is the window an ime window? | |
| 379 [nodoc] static boolean isImeWindow(); | |
|
jackhou1
2014/09/12 03:24:51
Is this necessary? For alphaEnabled, requesting al
bshe
2014/09/12 17:44:12
I thought that IME extensions can create non-ime w
| |
| 380 | |
| 372 // The JavaScript 'window' object for the created child. | 381 // The JavaScript 'window' object for the created child. |
| 373 [instanceOf=Window] object contentWindow; | 382 [instanceOf=Window] object contentWindow; |
| 374 | 383 |
| 375 // The id the window was created with. | 384 // The id the window was created with. |
| 376 DOMString id; | 385 DOMString id; |
| 377 | 386 |
| 378 // The position, size and constraints of the window's content, which does | 387 // The position, size and constraints of the window's content, which does |
| 379 // not include window decorations. | 388 // not include window decorations. |
| 380 // This property is new in Chrome 36. | 389 // This property is new in Chrome 36. |
| 381 Bounds innerBounds; | 390 Bounds innerBounds; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 // Fired when the window is restored from being minimized or maximized. | 460 // Fired when the window is restored from being minimized or maximized. |
| 452 [nocompile] static void onRestored(); | 461 [nocompile] static void onRestored(); |
| 453 | 462 |
| 454 // Fired when the window's ability to use alpha transparency changes. | 463 // Fired when the window's ability to use alpha transparency changes. |
| 455 [nocompile, nodoc] static void onAlphaEnabledChanged(); | 464 [nocompile, nodoc] static void onAlphaEnabledChanged(); |
| 456 | 465 |
| 457 // Event for testing. Lets tests wait until a window has been shown. | 466 // Event for testing. Lets tests wait until a window has been shown. |
| 458 [nocompile, nodoc] static void onWindowFirstShown(); | 467 [nocompile, nodoc] static void onWindowFirstShown(); |
| 459 }; | 468 }; |
| 460 }; | 469 }; |
| OLD | NEW |