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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 // Gets an $(ref:AppWindow) with the given id. If no window with the given i
d | 405 // Gets an $(ref:AppWindow) with the given id. If no window with the given i
d |
406 // exists null is returned. This method is new in Chrome 33. | 406 // exists null is returned. This method is new in Chrome 33. |
407 [nocompile] static AppWindow get(DOMString id); | 407 [nocompile] static AppWindow get(DOMString id); |
408 }; | 408 }; |
409 | 409 |
410 interface Events { | 410 interface Events { |
411 // Fired when the window is resized. | 411 // Fired when the window is resized. |
412 [nocompile] static void onBoundsChanged(); | 412 [nocompile] static void onBoundsChanged(); |
413 | 413 |
414 // Fired when the window is closed. | 414 // Fired when the window is closed. Note, this should be listened to from |
| 415 // a window other than the window being closed, for example from the |
| 416 // background page. This is because the window being closed will be in the |
| 417 // process of being torn down when the event is fired, which means not all |
| 418 // APIs in the window's script context will be functional. |
415 [nocompile] static void onClosed(); | 419 [nocompile] static void onClosed(); |
416 | 420 |
417 // Fired when the window is fullscreened. | 421 // Fired when the window is fullscreened. |
418 [nocompile] static void onFullscreened(); | 422 [nocompile] static void onFullscreened(); |
419 | 423 |
420 // Fired when the window is maximized. | 424 // Fired when the window is maximized. |
421 [nocompile] static void onMaximized(); | 425 [nocompile] static void onMaximized(); |
422 | 426 |
423 // Fired when the window is minimized. | 427 // Fired when the window is minimized. |
424 [nocompile] static void onMinimized(); | 428 [nocompile] static void onMinimized(); |
425 | 429 |
426 // Fired when the window is restored from being minimized or maximized. | 430 // Fired when the window is restored from being minimized or maximized. |
427 [nocompile] static void onRestored(); | 431 [nocompile] static void onRestored(); |
428 }; | 432 }; |
429 }; | 433 }; |
OLD | NEW |