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 @@ ...@@ -120,9 +120,9 @@
"name": "queryOptions", "name": "queryOptions",
"$ref": "QueryOptions", "$ref": "QueryOptions",
"optional": true "optional": true
}, }
{ ],
"type": "function", "returns_async": {
"name": "callback", "name": "callback",
"parameters": [ "parameters": [
{ {
...@@ -130,7 +130,6 @@ ...@@ -130,7 +130,6 @@
} }
] ]
} }
]
}, },
{ {
"name": "getCurrent", "name": "getCurrent",
...@@ -141,9 +140,9 @@ ...@@ -141,9 +140,9 @@
"name": "queryOptions", "name": "queryOptions",
"$ref": "QueryOptions", "$ref": "QueryOptions",
"optional": true "optional": true
}, }
{ ],
"type": "function", "returns_async": {
"name": "callback", "name": "callback",
"parameters": [ "parameters": [
{ {
...@@ -151,7 +150,6 @@ ...@@ -151,7 +150,6 @@
} }
] ]
} }
]
}, },
{ {
"name": "getLastFocused", "name": "getLastFocused",
...@@ -162,9 +160,9 @@ ...@@ -162,9 +160,9 @@
"name": "queryOptions", "name": "queryOptions",
"$ref": "QueryOptions", "$ref": "QueryOptions",
"optional": true "optional": true
}, }
{ ],
"type": "function", "returns_async": {
"name": "callback", "name": "callback",
"parameters": [ "parameters": [
{ {
...@@ -172,7 +170,6 @@ ...@@ -172,7 +170,6 @@
} }
] ]
} }
]
}, },
{ {
"name": "getAll", "name": "getAll",
...@@ -183,9 +180,9 @@ ...@@ -183,9 +180,9 @@
"name": "queryOptions", "name": "queryOptions",
"$ref": "QueryOptions", "$ref": "QueryOptions",
"optional": true "optional": true
}, }
{ ],
"type": "function", "returns_async": {
"name": "callback", "name": "callback",
"parameters": [ "parameters": [
{ {
...@@ -193,7 +190,6 @@ ...@@ -193,7 +190,6 @@
} }
] ]
} }
]
}, },
{ {
"name": "create", "name": "create",
...@@ -236,9 +232,9 @@ ...@@ -236,9 +232,9 @@
} }
}, },
"optional": true "optional": true
}, }
{ ],
"type": "function", "returns_async": {
"name": "callback", "name": "callback",
"optional": true, "optional": true,
"parameters": [ "parameters": [
...@@ -248,7 +244,6 @@ ...@@ -248,7 +244,6 @@
} }
] ]
} }
]
}, },
{ {
"name": "update", "name": "update",
...@@ -272,9 +267,9 @@ ...@@ -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'." "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", "name": "callback",
"optional": true, "optional": true,
"parameters": [ "parameters": [
...@@ -283,16 +278,15 @@ ...@@ -283,16 +278,15 @@
} }
] ]
} }
]
}, },
{ {
"name": "remove", "name": "remove",
"type": "function", "type": "function",
"description": "Removes (closes) a window and all the tabs inside it.", "description": "Removes (closes) a window and all the tabs inside it.",
"parameters": [ "parameters": [
{"type": "integer", "name": "windowId", "minimum": 0}, {"type": "integer", "name": "windowId", "minimum": 0}
{"type": "function", "name": "callback", "optional": true, "parameters": []} ],
] "returns_async": {"name": "callback", "optional": true, "parameters": []}
} }
], ],
"events": [ "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