Commit d858d948 authored by Tim Judkins's avatar Tim Judkins Committed by Commit Bot

[Extensions] Enable promise support on the windows API

This CL changes over the json schema to use the new returns_async format
to define callbacks, enabling promise support on those APIs.

Bug: 328932
Change-Id: I524d814fd6c9839e9804e6de808bd62ebc2f8fb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515441Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Tim Judkins <tjudkins@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826843}
parent 4045db04
......@@ -120,17 +120,16 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
]
],
"returns_async": {
"name": "callback",
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
},
{
"name": "getCurrent",
......@@ -141,17 +140,16 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
]
],
"returns_async": {
"name": "callback",
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
},
{
"name": "getLastFocused",
......@@ -162,17 +160,16 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
]
],
"returns_async": {
"name": "callback",
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
},
{
"name": "getAll",
......@@ -183,17 +180,16 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "windows", "type": "array", "items": { "$ref": "Window" }
}
]
}
]
],
"returns_async": {
"name": "callback",
"parameters": [
{
"name": "windows", "type": "array", "items": { "$ref": "Window" }
}
]
}
},
{
"name": "create",
......@@ -236,19 +232,18 @@
}
},
"optional": true
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "window", "$ref": "Window", "description": "Contains details about the created window.",
"optional": true
}
]
}
]
],
"returns_async": {
"name": "callback",
"optional": true,
"parameters": [
{
"name": "window", "$ref": "Window", "description": "Contains details about the created window.",
"optional": true
}
]
}
},
{
"name": "update",
......@@ -272,27 +267,26 @@
"description": "The new state of the window. The 'minimized', 'maximized', and 'fullscreen' states cannot be combined with 'left', 'top', 'width', or 'height'."
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
]
],
"returns_async": {
"name": "callback",
"optional": true,
"parameters": [
{
"name": "window", "$ref": "Window"
}
]
}
},
{
"name": "remove",
"type": "function",
"description": "Removes (closes) a window and all the tabs inside it.",
"parameters": [
{"type": "integer", "name": "windowId", "minimum": 0},
{"type": "function", "name": "callback", "optional": true, "parameters": []}
]
{"type": "integer", "name": "windowId", "minimum": 0}
],
"returns_async": {"name": "callback", "optional": true, "parameters": []}
}
],
"events": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment