| Index: content/public/browser/web_ui_message_handler.h
|
| diff --git a/content/public/browser/web_ui_message_handler.h b/content/public/browser/web_ui_message_handler.h
|
| index ed0117931f59bc8cc8db1b135a2c606aea0c2015..b088c07030cc7b3a87d807f556baea3ab963a11e 100644
|
| --- a/content/public/browser/web_ui_message_handler.h
|
| +++ b/content/public/browser/web_ui_message_handler.h
|
| @@ -77,6 +77,18 @@ class CONTENT_EXPORT WebUIMessageHandler {
|
| // to deregister or disabled observers that push JavaScript calls to the page.
|
| virtual void OnJavascriptDisallowed() {}
|
|
|
| + // Helper method for responding to JS requests initiated with
|
| + // cr.sendWithPromise(), for the case where the returned promise should be
|
| + // resolved (request succeeded).
|
| + void ResolveJavascriptCallback(const base::Value& callback_id,
|
| + const base::Value& response);
|
| +
|
| + // Helper method for responding to JS requests initiated with
|
| + // cr.sendWithPromise(), for the case where the returned promise should be
|
| + // rejected (request failed).
|
| + void RejectJavascriptCallback(const base::Value& callback_id,
|
| + const base::Value& response);
|
| +
|
| // Call a Javascript function by sending its name and arguments down to
|
| // the renderer. This is asynchronous; there's no way to get the result
|
| // of the call, and should be thought of more like sending a message to
|
|
|