Index: chrome/common/extensions/api/windows.json |
diff --git a/chrome/common/extensions/api/windows.json b/chrome/common/extensions/api/windows.json |
index 9d8bab2f369680113db50e20653404cefc68f6f5..50edb7f6487476bf199fe452a80b50bcbdc9bdd0 100644 |
--- a/chrome/common/extensions/api/windows.json |
+++ b/chrome/common/extensions/api/windows.json |
@@ -11,6 +11,18 @@ |
}, |
"types": [ |
{ |
+ "id": "WindowType", |
+ "type": "string", |
+ "description": "The type of browser window this is. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.", |
+ "enum": ["normal", "popup", "panel", "app"] |
+ }, |
+ { |
+ "id": "WindowState", |
+ "type": "string", |
+ "description": "The state of this browser window. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.", |
+ "enum": ["normal", "minimized", "maximized", "fullscreen"] |
+ }, |
+ { |
"id": "Window", |
"type": "object", |
"properties": { |
@@ -23,20 +35,24 @@ |
"tabs": {"type": "array", "items": { "$ref": "tabs.Tab" }, "optional": true, "description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window."}, |
"incognito": {"type": "boolean", "description": "Whether the window is incognito."}, |
"type": { |
- "type": "string", |
+ "$ref": "WindowType", |
"optional": true, |
- "description": "The type of browser window this is. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.", |
- "enum": ["normal", "popup", "panel", "app"] |
+ "description": "The type of browser window this is." |
}, |
"state": { |
- "type": "string", |
+ "$ref": "WindowState", |
"optional": true, |
- "description": "The state of this browser window. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.", |
- "enum": ["normal", "minimized", "maximized", "fullscreen"] |
+ "description": "The state of this browser window." |
}, |
"alwaysOnTop": {"type": "boolean", "description": "Whether the window is set to be always on top."}, |
"sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API."} |
} |
+ }, |
+ { |
+ "id": "CreateType", |
+ "type": "string", |
+ "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.", |
+ "enum": ["normal", "popup", "panel", "detached_panel"] |
} |
], |
"properties": { |
@@ -176,10 +192,9 @@ |
"focused": {"type": "boolean", "optional": true, "description": "If true, opens an active window. If false, opens an inactive window."}, |
"incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."}, |
"type": { |
- "type": "string", |
+ "$ref": "CreateType", |
"optional": true, |
- "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.", |
- "enum": ["normal", "popup", "panel", "detached_panel"] |
+ "description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set." |
} |
}, |
"optional": true |
@@ -214,10 +229,9 @@ |
"focused": {"type": "boolean", "optional": true, "description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front."}, |
"drawAttention": {"type": "boolean", "optional": true, "description": "If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request."}, |
"state": { |
- "type": "string", |
+ "$ref": "WindowState", |
"optional": true, |
- "description": "The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.", |
- "enum": ["normal", "minimized", "maximized", "fullscreen"] |
+ "description": "The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'." |
} |
} |
}, |