-
Lukasz Anforowicz authored
There is a desire to add more kinds of hang timeouts - in addition to having an input-event-ack-timeout we also want to have navigation-commit-timeout and possibly other timeouts. This means that HungRendererDialogView::Accept (handling "Wait" button in the "hung renderer dialog") shouldn't be hardcoded to always call RenderWidgetH::RestartHangMonitorTimeoutIfNecessary, but should instead call a generic callback that will vary depending on the original source of the dialog. This CL enables future CLs (e.g. https://crrev.com/c/1089797) that need to provide different ways of restarting the hang timeout. This CL refactors RWH::RestartHangMonitorTimeoutIfNecessary into a generic base::RepeatingClosure passed as an argument of WebContentsDelegate::RendererUnresponsive method. I've tested this CL manually (on Linux) by: 1. Navigating 1st tab to https://peteblois.github.io/tmp/iframe_scrolling2/ 2. Opening a second tab, navigating it to https://peteblois.github.io/tmp/iframe_kill/ and switching back to the 1st tab. 3. Interacting with the OOPIF (for example double-clicking to select some of the words) and waiting 30 seconds for the hung renderer dialog to appear. 4. Clicking "Wait" button in the dialog 5. Verifying that the dialog reappears after 30 seconds Bug: 848821 Change-Id: I2d133483832ca3d640a74c9f23fc9677f478721d Reviewed-on: https://chromium-review.googlesource.com/1096362 Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by:
Trent Apted <tapted@chromium.org> Reviewed-by:
Lucas Gadani <lfg@chromium.org> Reviewed-by:
Bo <boliu@chromium.org> Reviewed-by:
Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#568861}
52b9372f