• Lucas Tenório's avatar
    Improve the Supervision Onboarding webview host interface. · 26fc5960
    Lucas Tenório authored
    With this change we add basic error reporting (to be improved with UMA
    later) as well as more UI configuration options.
    
    This essentially decouples the webview loading from the presentation of
    the flow, so we don't flicker when we make async decisions. Example:
    1: WebviewHost finishes load and reports header value.
    2: WebviewHost shows empty webview contents.
    3: Controller processes the value and decides to exit the flow.
    4: The screen flickers since steps 2 and 3 happen too fast and are
       racing.
    
    Introducing a presentation struct solves this issue and also helps to
    implement another requirement, optional buttons for flow pages.
    
    This leaves us with the Controller holding all the important state for
    the flow, which allows us to write pretty detailed unit tests that cover
    most issues. This will remove some of the burden from the browser_tests,
    which are already too complex.
    
    Bug: 958995
    Change-Id: I5929688ee6a753f817b023937f5d56be597b9fb1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628035Reviewed-by: default avatarOliver Chang <ochang@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
    Commit-Queue: Lucas Tenório <ltenorio@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#665052}
    26fc5960
supervision_onboarding.js 7.1 KB