Commit c6bfb881 authored by Anastasiia Nikolaienko's avatar Anastasiia Nikolaienko Committed by Commit Bot

Use FireWebUIListener in InlineLoginHandlerImpl

Call FireWebUIListener instead of CallJavascriptFunction in
InlineLoginHandlerImpl. It will allow to get notification about the
event using cr.addWebUIListener instead of directly exporting the
function.

Bug: 1096007
Change-Id: Ib36630b1d618e1eec948d2f733e38bbe120c2c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252144Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Commit-Queue: Anastasiia N <anastasiian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788666}
parent f04a7346
......@@ -69,6 +69,7 @@ cr.define('inline.login', function() {
cr.addWebUIListener('show-back-button', showBackButton);
cr.addWebUIListener('load-auth-extension', loadAuthExtension);
cr.addWebUIListener('close-dialog', closeDialog);
cr.addWebUIListener('send-lst-fetch-results', sendLSTFetchResults);
authExtHost = new cr.login.Authenticator('signin-frame');
authExtHost.addEventListener('dropLink', onDropLink);
......@@ -155,7 +156,6 @@ cr.define('inline.login', function() {
return {
closeDialog: closeDialog,
sendLSTFetchResults: sendLSTFetchResults,
getAuthExtHost: getAuthExtHost,
handleOAuth2TokenFailure: handleOAuth2TokenFailure,
initialize: initialize,
......
......@@ -819,7 +819,7 @@ void InlineLoginHandlerImpl::HandleLoginError(const std::string& error_msg,
void InlineLoginHandlerImpl::SendLSTFetchResultsMessage(
const base::Value& arg) {
if (IsJavascriptAllowed())
CallJavascriptFunction("inline.login.sendLSTFetchResults", arg);
FireWebUIListener("send-lst-fetch-results", arg);
}
Browser* InlineLoginHandlerImpl::GetDesktopBrowser() {
......
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