Chromium Code Reviews| Index: chrome/common/extensions/api/app_window.idl |
| diff --git a/chrome/common/extensions/api/app_window.idl b/chrome/common/extensions/api/app_window.idl |
| index 9dca0a3706de6a2dcc08a942cbf6afbb63897e63..7c140b3cdc7ad025822a696581123545d93c4127 100644 |
| --- a/chrome/common/extensions/api/app_window.idl |
| +++ b/chrome/common/extensions/api/app_window.idl |
| @@ -3,6 +3,9 @@ |
| // found in the LICENSE file. |
| namespace app.window { |
| + // minimized / maximized state of a window or normal/restored/resizable |
| + enum WindowState {normal, minimized, maximized, fullscreen}; |
| + |
| dictionary CreateWindowOptions { |
| // Id to identify the window. This will be used to remember the size |
| // and position of the window and restore that geometry when a window |
| @@ -56,6 +59,44 @@ namespace app.window { |
| void ([instanceOf=AppWindow] object created_window); |
| dictionary AppWindow { |
| + // The identity of this window used on creation for persisting state |
|
Mihai Parparita -not on Chrome
2012/09/16 05:31:39
Nit: this was called "id" in the create params, so
tapted
2012/09/17 08:48:56
sticking with `id` in crrev.com/10910304/
|
| + DOMString windowKey; |
| + |
| + // The internal routing ID, to lookup properties |
| + [nodoc] long viewId; |
| + |
| + // The last known width of the window |
| + long width; |
| + |
| + // The last known height of the window |
| + long height; |
| + |
| + // The last known screenX position |
| + long left; |
| + |
| + // The last known screenY position |
| + long top; |
| + |
| + // Check if the window currently has focus |
| + boolean hasFocus; |
| + |
| + // Get the current window state |
| + DOMString windowState; |
|
Mihai Parparita -not on Chrome
2012/09/16 05:31:39
Why not use the WindowState enum here?
tapted
2012/09/17 08:48:56
will do
|
| + |
| + // Get the minimum user-resizable dimensions of the window |
| + long minWidth; |
| + long minHeight; |
| + |
| + // Get the maximum user-resizable dimensions of the window |
| + long maxWidth; |
| + long maxHeight; |
| + |
| + // Get the window type (e.g. 'shell') |
| + DOMString windowType; |
| + |
| + // Get the frame type (e.g. 'none' or 'chrome') |
| + DOMString frameType; |
| + |
| // Focus the window. |
| static void focus(); |
| @@ -74,6 +115,12 @@ namespace app.window { |
| // Resize the window to |width|x|height| pixels in size. |
| static void resizeTo(long width, long height); |
| + // Update the minimum user-resizable dimensions of the window |
| + static void setMinSize(long x, long y); |
| + |
| + // Update the maximum user-resizable dimensions of the window |
| + static void setMaxSize(long x, long y); |
| + |
| // The JavaScript 'window' object for the created child. |
| [instanceOf=global] object contentWindow; |
| }; |
| @@ -109,5 +156,6 @@ namespace app.window { |
| optional CreateWindowCallback callback); |
| [nocompile] static AppWindow current(); |
| + [internal, nocompile] static void makeAppWindow(object state); |
| }; |
| }; |