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 dictionary Bounds { | 9 dictionary Bounds { |
10 long? left; | 10 long? left; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 // Height of the window. (Deprecated; use 'bounds'.) | 48 // Height of the window. (Deprecated; use 'bounds'.) |
49 [nodoc] long? height; | 49 [nodoc] long? height; |
50 | 50 |
51 // X coordinate of the window. (Deprecated; use 'bounds'.) | 51 // X coordinate of the window. (Deprecated; use 'bounds'.) |
52 [nodoc] long? left; | 52 [nodoc] long? left; |
53 | 53 |
54 // Y coordinate of the window. (Deprecated; use 'bounds'.) | 54 // Y coordinate of the window. (Deprecated; use 'bounds'.) |
55 [nodoc] long? top; | 55 [nodoc] long? top; |
56 | 56 |
57 // Minimum width for the lifetime of the window. | 57 // Minimum width of the window. |
58 long? minWidth; | 58 long? minWidth; |
59 | 59 |
60 // Minimum height for the lifetime of the window. | 60 // Minimum height of the window. |
61 long? minHeight; | 61 long? minHeight; |
62 | 62 |
63 // Maximum width for the lifetime of the window. | 63 // Maximum width of the window. |
64 long? maxWidth; | 64 long? maxWidth; |
65 | 65 |
66 // Maximum height for the lifetime of the window. | 66 // Maximum height of the window. |
67 long? maxHeight; | 67 long? maxHeight; |
68 | 68 |
69 // Type of window to create. | 69 // Type of window to create. |
70 [nodoc] WindowType? type; | 70 [nodoc] WindowType? type; |
71 | 71 |
72 // Frame type: <code>none</code> or <code>chrome</code> (defaults to | 72 // Frame type: <code>none</code> or <code>chrome</code> (defaults to |
73 // <code>chrome</code>). For <code>none</code>, the | 73 // <code>chrome</code>). For <code>none</code>, the |
74 // <code>-webkit-app-region</code> CSS property can be used to apply | 74 // <code>-webkit-app-region</code> CSS property can be used to apply |
75 // draggability to the app's window. <code>-webkit-app-region: drag</code> | 75 // draggability to the app's window. <code>-webkit-app-region: drag</code> |
76 // can be used to mark regions draggable. <code>no-drag</code> can be used | 76 // can be used to mark regions draggable. <code>no-drag</code> can be used |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 // Hide the window. Does nothing if the window is already hidden. | 161 // Hide the window. Does nothing if the window is already hidden. |
162 static void hide(); | 162 static void hide(); |
163 | 163 |
164 // Get the window's bounds as a $ref:Bounds object. | 164 // Get the window's bounds as a $ref:Bounds object. |
165 [nocompile] static Bounds getBounds(); | 165 [nocompile] static Bounds getBounds(); |
166 | 166 |
167 // Set the window's bounds. | 167 // Set the window's bounds. |
168 static void setBounds(Bounds bounds); | 168 static void setBounds(Bounds bounds); |
169 | 169 |
| 170 // Get the current minimum width of the window. |
| 171 [nocompile] static long getMinWidth(); |
| 172 |
| 173 // Get the current minimum height of the window. |
| 174 [nocompile] static long getMinHeight(); |
| 175 |
| 176 // Get the current maximum width of the window. |
| 177 [nocompile] static long getMaxWidth(); |
| 178 |
| 179 // Get the current maximum height of the window. |
| 180 [nocompile] static long getMaxHeight(); |
| 181 |
| 182 // Set the current minimum width of the window. |
| 183 static void setMinWidth(optional long minWidth); |
| 184 |
| 185 // Set the current minimum height of the window. |
| 186 static void setMinHeight(optional long minHeight); |
| 187 |
| 188 // Set the current maximum width of the window. |
| 189 static void setMaxWidth(optional long maxWidth); |
| 190 |
| 191 // Set the current maximum height of the window. |
| 192 static void setMaxHeight(optional long maxHeight); |
| 193 |
170 // Set the app icon for the window (experimental). | 194 // Set the app icon for the window (experimental). |
171 // Currently this is only being implemented on Ash. | 195 // Currently this is only being implemented on Ash. |
172 // TODO(stevenjb): Investigate implementing this on Windows and OSX. | 196 // TODO(stevenjb): Investigate implementing this on Windows and OSX. |
173 [nodoc] static void setIcon(DOMString icon_url); | 197 [nodoc] static void setIcon(DOMString icon_url); |
174 | 198 |
175 // The JavaScript 'window' object for the created child. | 199 // The JavaScript 'window' object for the created child. |
176 [instanceOf=Window] object contentWindow; | 200 [instanceOf=Window] object contentWindow; |
177 }; | 201 }; |
178 | 202 |
179 interface Functions { | 203 interface Functions { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // Fired when the window is maximized. | 244 // Fired when the window is maximized. |
221 [nocompile] static void onMaximized(); | 245 [nocompile] static void onMaximized(); |
222 | 246 |
223 // Fired when the window is minimized. | 247 // Fired when the window is minimized. |
224 [nocompile] static void onMinimized(); | 248 [nocompile] static void onMinimized(); |
225 | 249 |
226 // Fired when the window is restored from being minimized or maximized. | 250 // Fired when the window is restored from being minimized or maximized. |
227 [nocompile] static void onRestored(); | 251 [nocompile] static void onRestored(); |
228 }; | 252 }; |
229 }; | 253 }; |
OLD | NEW |