Commit 8bd7dec6 authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

mojo: reset-password: Use new bindings names for reset password

Mojo JS Lite Bindings were recently renamed to align with the new C++
names. This CL changes usage of the old names with the new ones. See
bug for more details.

Also adds the closure_compile target to webui_closure_compile.
Otherwise there is no type checking.

Bug: 968369

Change-Id: Ie1e050a754a86ab7134ddacf8ebe482636221af5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1717407
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: default avatarcalamity <calamity@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681165}
parent 290e1505
...@@ -12,6 +12,7 @@ if (closure_compile) { ...@@ -12,6 +12,7 @@ if (closure_compile) {
deps = [ deps = [
"engagement:closure_compile", "engagement:closure_compile",
"interventions_internals:closure_compile", "interventions_internals:closure_compile",
"reset_password:closure_compile",
] ]
if (is_linux || is_win || is_mac) { if (is_linux || is_win || is_mac) {
deps += [ deps += [
......
...@@ -12,7 +12,7 @@ js_type_check("closure_compile") { ...@@ -12,7 +12,7 @@ js_type_check("closure_compile") {
js_library("reset_password") { js_library("reset_password") {
deps = [ deps = [
"//chrome/browser/ui/webui/reset_password:mojo_bindings_js_externs", "//chrome/browser/ui/webui/reset_password:mojo_bindings_js_library_for_compile",
"//ui/webui/resources/js:assert", "//ui/webui/resources/js:assert",
"//ui/webui/resources/js:util", "//ui/webui/resources/js:util",
] ]
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
*/ */
(function() { (function() {
/** @type {mojom.ResetPasswordHandlerProxy} */ /** @type {mojom.ResetPasswordHandlerRemote} */
let uiHandler; let pageHandler;
function initialize() { function initialize() {
uiHandler = mojom.ResetPasswordHandler.getProxy(); pageHandler = mojom.ResetPasswordHandler.getRemote();
/** @type {?HTMLElement} */ /** @type {?HTMLElement} */
const resetPasswordButton = $('reset-password-button'); const resetPasswordButton = $('reset-password-button');
resetPasswordButton.addEventListener('click', function() { resetPasswordButton.addEventListener('click', function() {
uiHandler.handlePasswordReset(); pageHandler.handlePasswordReset();
}); });
} }
......
...@@ -8,7 +8,4 @@ mojom("mojo_bindings") { ...@@ -8,7 +8,4 @@ mojom("mojo_bindings") {
sources = [ sources = [
"reset_password.mojom", "reset_password.mojom",
] ]
# TODO(https://crbug.com/968369): Change to use new names.
use_old_js_lite_bindings_names = true
} }
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