Call the callback function when the pause app dialog is closed.
SetAcceptCallback for the pause app dialog only quarantines the callback function is called when the OK button is clicked. When press 'esc' to dismiss the dialog, the callback is not called. For the pause app dialog, the callback function should be called when: 1: the OK button is called 2: 'esc' is pressed to dismiss the dialog, The dialog view needs 2 separate callback functions for Accept and Close cases separately, however, we have 1 callback only. So we don't use the dialog view's function, but create the local closed_callback_ variable, and when the pause app dialog is destroyed, call the closed_callback_, so both the above 2 scenarios can call the callback function. The browser test is modified to test the above 2 scenarios. BUG=1144386 Change-Id: I5dd7accfd4e16fcafb7d019877c648b25d71b881 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515864 Commit-Queue: Nancy Wang <nancylingwang@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#823872}
Showing
Please register or sign in to comment