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