Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(839)

Unified Diff: chrome/common/extensions/api/app_window.idl

Issue 10915085: Functions for accessing app window properties, and modifying AppWindow-specifics (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: stray event, js linter Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};
};

Powered by Google App Engine
This is Rietveld 408576698