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,9 +120,9 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
}
],
"returns_async": {
"name": "callback",
"parameters": [
{
......@@ -130,7 +130,6 @@
}
]
}
]
},
{
"name": "getCurrent",
......@@ -141,9 +140,9 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
}
],
"returns_async": {
"name": "callback",
"parameters": [
{
......@@ -151,7 +150,6 @@
}
]
}
]
},
{
"name": "getLastFocused",
......@@ -162,9 +160,9 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
}
],
"returns_async": {
"name": "callback",
"parameters": [
{
......@@ -172,7 +170,6 @@
}
]
}
]
},
{
"name": "getAll",
......@@ -183,9 +180,9 @@
"name": "queryOptions",
"$ref": "QueryOptions",
"optional": true
},
{
"type": "function",
}
],
"returns_async": {
"name": "callback",
"parameters": [
{
......@@ -193,7 +190,6 @@
}
]
}
]
},
{
"name": "create",
......@@ -236,9 +232,9 @@
}
},
"optional": true
},
{
"type": "function",
}
],
"returns_async": {
"name": "callback",
"optional": true,
"parameters": [
......@@ -248,7 +244,6 @@
}
]
}
]
},
{
"name": "update",
......@@ -272,9 +267,9 @@
"description": "The new state of the window. The 'minimized', 'maximized', and 'fullscreen' states cannot be combined with 'left', 'top', 'width', or 'height'."
}
}
},
{
"type": "function",
}
],
"returns_async": {
"name": "callback",
"optional": true,
"parameters": [
......@@ -283,16 +278,15 @@
}
]
}
]
},
{
"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