Combine AddToHomescreenDialog.Delegate#{onDialogCancelled(),onDialogDismised()}.
This CL addresses an inconsistency in behaviour between explicitly tapping "Cancel" in the add to home screen dialog and tapping outside the dialog to dismiss it (also effectively cancelling). Explicitly tapping on "Cancel" allowed the site to receive a new beforeinstallpromptevent to trigger a new dialog, but tapping outside the dialog did not. This CL removes the inconsistency by eliminating the AddToHomescreenDialog.Delegate#onDialogCancelled() method (previously only called when explicitly tapping "Cancel"), and maintaining state in the AppBannerUiDelegateAndroid to determine whether or not to call AppBannerUiDelegateAndroid#nativeOnUiCancelled(). This ensures a fresh beforeinstallpromptevent is dispatched when the dialog isn't accepted - whether it was explicitly cancelled or implicitly dismissed by tapping elsewhere on the screen. BUG=867465 Change-Id: I4e37d4a34e2b25797ee5bc386010de0b995e3d93 Reviewed-on: https://chromium-review.googlesource.com/1157945 Commit-Queue: Dominick Ng <dominickn@chromium.org> Reviewed-by:Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#580685}
Showing
Please register or sign in to comment