Always start RenderFrames and their RenderWidgets as hidden.

We start them as shown if the WebContents is shown, then immediately
send a Hide() unconditionally - in different places for child and main
frames. Instead just always start them hidden and remove all the

This is toward
wherein I'd like to DCHECK we don't call OnHidden IPC for a provisional
RenderWidget, which we currently do. Right now we DCHECK that we don't
call it for a frozen widget, which includes provisional main frame
widgets, but not the first one. And it's the first one we create shown
and then hide.

Renderer-created widgets (eg go through
WebContentsImpl::CreateNewWidget() and should Show() immediately if the
renderer has initialized the page as shown, since there may be no navigation
afterward to show the widget in that case.

Bug: 419087, 745091
Change-Id: Id7cc1981ae9fbf6a71c51a4b54fc488ba47f1753
Reviewed-by: Daniel Cheng <>
Reviewed-by: Avi Drissman <>
Commit-Queue: danakj <>
Cr-Commit-Position: refs/heads/master@{#683381}
30 files changed