• Pavol Marko's avatar
    Use (Oobe)WebViewDialog as WebContentsDelegate for views-based oobe WebContents · b7c509a5
    Pavol Marko authored
    Ensure that the OobeWebViewDialog is the WebContentsDelegate for the
    WebContents used in views-based sign-in/OOBE. This fixes
    camera access by SAML providers on the sign-in screen, because
    the versions of CheckMediaAccessPermission/RequestMediaAccessPermission
    forwarding to MediaCaptureDevicesDispatcher are invoked again.
    
    Move focus/keyboard handling from OobeUIDialogDelegate to
    OobeWebViewDialog to make changing the delegate unnecessary.
    
    Background:
    WebDialogView usually acts as the WebContentsDelegate for the
    WebContents it embeds. CL:1178111 introduced the subclasss
    OobeWebDialogView which customizes the WebContentsDelegate handling to
    allow media requests.
    CL:1197785 then exchanged the WebContents' delegate altogether to
    implement keyboard/focus handling, orphaning the functions introduced in
    CL:1178111. This CL moves the keyboard/focus handling to the
    OobeWebDialogView and restores its function as WebContentsDelegate.
    
    Bug: 900323
    Test: out/Default/browser_tests --gtest_filter=*SAMLPolicy*Test*TestLoginMedia*
    Change-Id: I6c12b8b08efaa71a9f9cbb93d674448cdccbdeaf
    Reviewed-on: https://chromium-review.googlesource.com/c/1323075
    Commit-Queue: Pavol Marko <pmarko@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarQuan Nguyen <qnnguyen@chromium.org>
    Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#606111}
    b7c509a5
oobe_base_test.cc 11.3 KB