DescriptionMake RenderFrameHostImpl::GetRenderWidgetHost() always return an object
Using GetRenderWidgetHost as an accessor for the RFHI's data member is
error prone because it is easy to assume that a frame attached to the
frame tree will always have a widget to talk to, and also it is
inconsistent with RenderViewImpl::GetHost() which does not return
nullptr.
While it is generally preferable for features to interact with a
RenderWidgetHostView rather than a RenderWidgetHost for the purposes
of input and renderering interactions, where possible, RenderWidgetHost
availability is sometimes necessary and GetView() can unavoidably
return nullptr in some cases (for instance, if the renderer just
crashed).
This CL also does some related cleanup.
BUG=455245
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/0e8dc209f5e4a6140e43551de0e036324c68a383
Cr-Commit-Position: refs/heads/master@{#396751}
Patch Set 1 #Patch Set 2 : Compile fix #Patch Set 3 : Need a cast in test #
Total comments: 18
Patch Set 4 : Addressing creis' comments #
Messages
Total messages: 11 (5 generated)
|