| 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 namespace app.window { | 5 namespace app.window { |
| 6 dictionary CreateWindowOptions { | 6 dictionary CreateWindowOptions { |
| 7 // Id to identify the window. This will be used to remember the size | 7 // Id to identify the window. This will be used to remember the size |
| 8 // and position of the window and restore that geometry when a window | 8 // and position of the window and restore that geometry when a window |
| 9 // with the same id (and no explicit size or position) is later opened. | 9 // with the same id (and no explicit size or position) is later opened. |
| 10 DOMString? id; | 10 DOMString? id; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Close the window. | 94 // Close the window. |
| 95 static void close(); | 95 static void close(); |
| 96 | 96 |
| 97 // Show the window. Does nothing if the window is already visible. | 97 // Show the window. Does nothing if the window is already visible. |
| 98 static void show(); | 98 static void show(); |
| 99 | 99 |
| 100 // Hide the window. Does nothing if the window is already hidden. | 100 // Hide the window. Does nothing if the window is already hidden. |
| 101 static void hide(); | 101 static void hide(); |
| 102 | 102 |
| 103 // Set the window's bounds. |
| 104 static void setBounds(Bounds bounds); |
| 105 |
| 103 // The JavaScript 'window' object for the created child. | 106 // The JavaScript 'window' object for the created child. |
| 104 [instanceOf=global] object contentWindow; | 107 [instanceOf=global] object contentWindow; |
| 105 }; | 108 }; |
| 106 | 109 |
| 107 interface Functions { | 110 interface Functions { |
| 108 // The size and position of a window can be specified in a number of | 111 // The size and position of a window can be specified in a number of |
| 109 // different ways. The most simple option is not specifying anything at | 112 // different ways. The most simple option is not specifying anything at |
| 110 // all, in which case a default size and platform dependent position will | 113 // all, in which case a default size and platform dependent position will |
| 111 // be used. | 114 // be used. |
| 112 // | 115 // |
| (...skipping 22 matching lines...) Expand all Loading... |
| 135 optional CreateWindowCallback callback); | 138 optional CreateWindowCallback callback); |
| 136 | 139 |
| 137 // Returns an <a href="#type-AppWindow">AppWindow</a> object for the | 140 // Returns an <a href="#type-AppWindow">AppWindow</a> object for the |
| 138 // current script context (ie JavaScript 'window' object). This can also be | 141 // current script context (ie JavaScript 'window' object). This can also be |
| 139 // called on a handle to a script context for another page, for example: | 142 // called on a handle to a script context for another page, for example: |
| 140 // otherWindow.chrome.app.window.current(). | 143 // otherWindow.chrome.app.window.current(). |
| 141 [nocompile] static AppWindow current(); | 144 [nocompile] static AppWindow current(); |
| 142 [nocompile, nodoc] static void initializeAppWindow(object state); | 145 [nocompile, nodoc] static void initializeAppWindow(object state); |
| 143 }; | 146 }; |
| 144 }; | 147 }; |
| OLD | NEW |