Commit 59980acd authored by Zain Afzal's avatar Zain Afzal Committed by Commit Bot

Change clientApiDelegate from a class to a object.

This is because the media app attempts to use the spread operator on the
class which, due to the typescript compilation step which targets ES5,
doesn't handle the class instance correctly.

Bug: 996088
Change-Id: Idfb4e00aa29c40864fecf7d5ee777d470f40566d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098192Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Zain Afzal <zafzal@google.com>
Cr-Commit-Position: refs/heads/master@{#749558}
parent e9cc819f
......@@ -69,13 +69,13 @@ parentMessagePipe.registerHandler(Message.LOAD_FILE, (message) => {
/**
* A delegate which exposes privileged WebUI functionality to the media
* app.
* @implements mediaApp.ClientApiDelegate
* @type {!mediaApp.ClientApiDelegate}
*/
class Delegate {
const DELEGATE = {
/** @override */
async openFeedbackDialog() {
const response = await parentMessagePipe.sendMessage(
Message.OPEN_FEEDBACK_DIALOG);
const response =
await parentMessagePipe.sendMessage(Message.OPEN_FEEDBACK_DIALOG);
return /** @type {?string} */ (response['errorMessage']);
}
};
......@@ -113,7 +113,7 @@ async function loadFile(token, file) {
* @param {!mediaApp.ClientApi} app
*/
function initializeApp(app) {
app.setDelegate(new Delegate());
app.setDelegate(DELEGATE);
}
/**
......
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