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/samples/
window-state"> | 8 // href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/
window-state"> |
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 // permission. Defaults to false. | 265 // permission. Defaults to false. |
266 // | 266 // |
267 // Call <code>setAlwaysOnTop()</code> on the window to change this property | 267 // Call <code>setAlwaysOnTop()</code> on the window to change this property |
268 // after creation. | 268 // after creation. |
269 boolean? alwaysOnTop; | 269 boolean? alwaysOnTop; |
270 | 270 |
271 // If true, the window will be focused when created. Defaults to true. | 271 // If true, the window will be focused when created. Defaults to true. |
272 boolean? focused; | 272 boolean? focused; |
273 | 273 |
274 // If true, the window will be visible on all workspaces. | 274 // If true, the window will be visible on all workspaces. |
275 // This is only available on dev channel. | |
276 boolean? visibleOnAllWorkspaces; | 275 boolean? visibleOnAllWorkspaces; |
277 }; | 276 }; |
278 | 277 |
279 // Called in the creating window (parent) before the load event is called in | 278 // Called in the creating window (parent) before the load event is called in |
280 // the created window (child). The parent can set fields or functions on the | 279 // the created window (child). The parent can set fields or functions on the |
281 // child usable from onload. E.g. background.js: | 280 // child usable from onload. E.g. background.js: |
282 // | 281 // |
283 // <code>function(createdWindow) { createdWindow.contentWindow.foo = | 282 // <code>function(createdWindow) { createdWindow.contentWindow.foo = |
284 // function () { }; };</code> | 283 // function () { }; };</code> |
285 // | 284 // |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // Set whether the window should stay above most other windows. Requires the | 383 // Set whether the window should stay above most other windows. Requires the |
385 // <code>alwaysOnTopWindows</code> permission. | 384 // <code>alwaysOnTopWindows</code> permission. |
386 static void setAlwaysOnTop(boolean alwaysOnTop); | 385 static void setAlwaysOnTop(boolean alwaysOnTop); |
387 | 386 |
388 // Can the window use alpha transparency? | 387 // Can the window use alpha transparency? |
389 // TODO(jackhou): Document this properly before going to stable. | 388 // TODO(jackhou): Document this properly before going to stable. |
390 [nodoc] static boolean alphaEnabled(); | 389 [nodoc] static boolean alphaEnabled(); |
391 | 390 |
392 // For platforms that support multiple workspaces, is this window visible on | 391 // For platforms that support multiple workspaces, is this window visible on |
393 // all of them? | 392 // all of them? |
394 // This is only available on dev channel. | |
395 static void setVisibleOnAllWorkspaces(boolean alwaysVisible); | 393 static void setVisibleOnAllWorkspaces(boolean alwaysVisible); |
396 | 394 |
397 // Set whether the window should get all keyboard events including system | 395 // Set whether the window should get all keyboard events including system |
398 // keys that are usually not sent. This is best-effort subject to platform | 396 // keys that are usually not sent. This is best-effort subject to platform |
399 // specific constraints. Requires the <code>"app.window.allKeys"</code> | 397 // specific constraints. Requires the <code>"app.window.allKeys"</code> |
400 // permission. This is currently available only in dev channel on Windows. | 398 // permission. This is currently available only in dev channel on Windows. |
401 static void setInterceptAllKeys(boolean wantAllKeys); | 399 static void setInterceptAllKeys(boolean wantAllKeys); |
402 | 400 |
403 // The JavaScript 'window' object for the created child. | 401 // The JavaScript 'window' object for the created child. |
404 [instanceOf=Window] object contentWindow; | 402 [instanceOf=Window] object contentWindow; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Fired when the window is restored from being minimized or maximized. | 485 // Fired when the window is restored from being minimized or maximized. |
488 [nocompile] static void onRestored(); | 486 [nocompile] static void onRestored(); |
489 | 487 |
490 // Fired when the window's ability to use alpha transparency changes. | 488 // Fired when the window's ability to use alpha transparency changes. |
491 [nocompile, nodoc] static void onAlphaEnabledChanged(); | 489 [nocompile, nodoc] static void onAlphaEnabledChanged(); |
492 | 490 |
493 // Event for testing. Lets tests wait until a window has been shown. | 491 // Event for testing. Lets tests wait until a window has been shown. |
494 [nocompile, nodoc] static void onWindowFirstShown(); | 492 [nocompile, nodoc] static void onWindowFirstShown(); |
495 }; | 493 }; |
496 }; | 494 }; |
OLD | NEW |