| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Show the window. Does nothing if the window is already visible. | 115 // Show the window. Does nothing if the window is already visible. |
| 116 static void show(); | 116 static void show(); |
| 117 | 117 |
| 118 // Hide the window. Does nothing if the window is already hidden. | 118 // Hide the window. Does nothing if the window is already hidden. |
| 119 static void hide(); | 119 static void hide(); |
| 120 | 120 |
| 121 // Set the window's bounds. | 121 // Set the window's bounds. |
| 122 static void setBounds(Bounds bounds); | 122 static void setBounds(Bounds bounds); |
| 123 | 123 |
| 124 // Set the app icon for the window (experimental). |
| 125 // Currently this is only being implemented on Ash. |
| 126 // TODO(stevenjb): Investigate implementing this on Windows and OSX. |
| 127 [nodoc] static void setIcon(DOMString icon_url); |
| 128 |
| 124 // The JavaScript 'window' object for the created child. | 129 // The JavaScript 'window' object for the created child. |
| 125 [instanceOf=global] object contentWindow; | 130 [instanceOf=global] object contentWindow; |
| 126 }; | 131 }; |
| 127 | 132 |
| 128 interface Functions { | 133 interface Functions { |
| 129 // The size and position of a window can be specified in a number of | 134 // The size and position of a window can be specified in a number of |
| 130 // different ways. The most simple option is not specifying anything at | 135 // different ways. The most simple option is not specifying anything at |
| 131 // all, in which case a default size and platform dependent position will | 136 // all, in which case a default size and platform dependent position will |
| 132 // be used. | 137 // be used. |
| 133 // | 138 // |
| (...skipping 23 matching lines...) Expand all Loading... |
| 157 optional CreateWindowCallback callback); | 162 optional CreateWindowCallback callback); |
| 158 | 163 |
| 159 // Returns an <a href="#type-AppWindow">AppWindow</a> object for the | 164 // Returns an <a href="#type-AppWindow">AppWindow</a> object for the |
| 160 // current script context (ie JavaScript 'window' object). This can also be | 165 // current script context (ie JavaScript 'window' object). This can also be |
| 161 // called on a handle to a script context for another page, for example: | 166 // called on a handle to a script context for another page, for example: |
| 162 // otherWindow.chrome.app.window.current(). | 167 // otherWindow.chrome.app.window.current(). |
| 163 [nocompile] static AppWindow current(); | 168 [nocompile] static AppWindow current(); |
| 164 [nocompile, nodoc] static void initializeAppWindow(object state); | 169 [nocompile, nodoc] static void initializeAppWindow(object state); |
| 165 }; | 170 }; |
| 166 }; | 171 }; |
| OLD | NEW |