Improve the timing of OnLoadEnd (fixes issue #3341)

Use WebContentsDelegate::DidFinishLoad instead of a custom Mojo message.
This fixes flaky OnLoadEnd behavior with NavigationTest.Order.
This commit is contained in:
Marshall Greenblatt
2022-08-25 18:17:51 -04:00
parent 5ec6e62656
commit 37aee4d3a0
12 changed files with 42 additions and 59 deletions

View File

@ -848,14 +848,6 @@ bool CefBrowserHostBase::Navigate(const content::OpenURLParams& params) {
return false;
}
void CefBrowserHostBase::OnDidFinishLoad(CefRefPtr<CefFrameHostImpl> frame,
const GURL& validated_url,
int http_status_code) {
frame->RefreshAttributes();
contents_delegate_->OnLoadEnd(frame, validated_url, http_status_code);
}
void CefBrowserHostBase::ViewText(const std::string& text) {
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT,