For Supervised User committed interstitials, handling commands is pretty simple:
- Going back can be implemented by Javascript in the renderer as a simple back navigation.
- Proceed happens by events triggered in the browser process, e.g. when the URL filter changes. All that needs to happen for Proceed is that the page should be refreshed, but we need to know that a Supervised User page is showing so that we know to refresh. To do so:
- When the SupervisedUserNavigationObserver generates a supervised user error page for a navigation, remember the navigation ID (we probably need to pass the ID as a parameter to OnRequestBlocked).
- When the observer observes a committed navigation with a remembered navigation ID, set a flag to note that the currently committed navigation is a supervised user error page.
- When we want to Proceed, refresh the page if the currently committed navigation is a supervised user error page (determined by the flag described above).
- When a navigation finishes (DidFinishNavigation), we can clean up the remembered navigation ID for that navigation.
Comment 1 by est...@chromium.org
, Oct 31 2017