Change Add Supervision web dialog to use CanCloseDialog()
The Add Supervision dialog was using OnCloseContents() and OnDialogCloseRequested() to catch attempts to close the dialog, for the purpose of showing the signout confirmation dialog. This failed when OnCloseContents() was called, because by the time that callback was called, the web contents were already disposed of, resulting in dialog contents becoming unusable if the user chose to return to the dialog rather than signing out. Instead, capturing the close event in CanCloseDialog() occurs before the contents are invalidated, therefore it is the correct place to stop the closing of the dialog Bug: 1001732 Change-Id: I50262bd4606e3380700c81f98df925ea3a61f87c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790130 Commit-Queue: Danan S <danan@chromium.org> Reviewed-by:Michael Giuffrida <michaelpg@chromium.org> Cr-Commit-Position: refs/heads/master@{#694832}
Showing
Please register or sign in to comment