permissions: allow delegate callbacks during dialog close
Right now, PermissionRequestManager requires that the PermissionPrompt not call any of the PermissionPrompt::Delegate methods if the PermissionPrompt is being destroyed by the PermissionRequestManager itself. This mainly happens when the user switches tabs, in which case the PRM wants to destroy the bubble but not treat the permission request as handled yet. This CL changes the contract of the PermissionPrompt: now the PermissionPrompt always calls the notification methods on PermissionPrompt::Delegate, and it is up to the PRM to ignore these callbacks if they are not relevant. This centralizes knowledge of this PRM behavior in a single place (PRM itself) and simplifies PermissionPromptBubbleView. Bug: 1011446 Change-Id: Ie023ca572848e26f63cb9287ee216dd738f32473 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2039730Reviewed-by:Peter Kasting <pkasting@chromium.org> Reviewed-by:
Bret Sepulveda <bsep@chromium.org> Reviewed-by:
Balazs Engedy <engedy@chromium.org> Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#739394}
Showing
Please register or sign in to comment