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

Unified Diff: chrome/common/extensions/api/windows.json

Issue 1219983006: Move the identical getInfo parameters from the windows API into a shared type. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/windows.json
diff --git a/chrome/common/extensions/api/windows.json b/chrome/common/extensions/api/windows.json
index 7d16e291cefa8165a89c049121cd0662ab2d3f44..7609952679bce21e638ec5a8e8f85595dc9c506e 100644
--- a/chrome/common/extensions/api/windows.json
+++ b/chrome/common/extensions/api/windows.json
@@ -53,6 +53,18 @@
"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"]
+ },
+ {
+ "id": "GetInfo",
+ "type": "object",
+ "description": "Additional options given to the family of get functions: $(ref:windows.get), $(ref:windows.getCurrent), $(ref:windows.getLastFocused), and $(ref:windows.getAll).",
+ "properties": {
+ "populate": {
+ "type": "boolean",
+ "optional": true,
+ "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
+ }
+ }
}
],
"properties": {
@@ -72,15 +84,7 @@
"description": "Gets details about a window.",
"parameters": [
{"type": "integer", "name": "windowId", "minimum": -2},
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." }
- }
- },
+ {"$ref": "GetInfo", "name": "getInfo", "optional": true},
{
"type": "function",
"name": "callback",
@@ -97,15 +101,7 @@
"type": "function",
"description": "Gets the <a href='#current-window'>current window</a>.",
"parameters": [
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." }
- }
- },
+ {"$ref": "GetInfo", "name": "getInfo", "optional": true},
{
"type": "function",
"name": "callback",
@@ -122,15 +118,7 @@
"type": "function",
"description": "Gets the window that was most recently focused &mdash; typically the window 'on top'.",
"parameters": [
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." }
- }
- },
+ {"$ref": "GetInfo", "name": "getInfo", "optional": true},
{
"type": "function",
"name": "callback",
@@ -147,15 +135,7 @@
"type": "function",
"description": "Gets all windows.",
"parameters": [
- {
- "type": "object",
- "name": "getInfo",
- "optional": true,
- "description": "",
- "properties": {
- "populate": {"type": "boolean", "optional": true, "description": "If true, each $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission." }
- }
- },
+ {"$ref": "GetInfo", "name": "getInfo", "optional": true},
{
"type": "function",
"name": "callback",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698