Commit e26adffa authored by Albert J. Wong's avatar Albert J. Wong Committed by Commit Bot

Reduce temporal coupling of RenderWidgetHostImpl and RenderViewHostImpl init.

Prior work has already detangled a lot of RenderWidgetHostImpl and
RenderViewHostImpl. Moving the registration of the RenderViewHostImpl
with the RenderWidgetHostImpl as late as possible in the construction
sequence further decouples the two classes.

This is preparation for moving RWHI ownership to RenderFrameHost.

Bug: 545684
Change-Id: I5a21a60d1eaeb77fe0270bc2506248162405fb37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808184Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697085}
parent ac9f3449
......@@ -237,8 +237,6 @@ RenderViewHostImpl::RenderViewHostImpl(
CHECK(result.second) << "Inserting a duplicate item!";
GetProcess()->AddRoute(routing_id_, this);
GetWidget()->set_owner_delegate(this);
GetProcess()->AddObserver(this);
ui::GpuSwitchingManager::GetInstance()->AddObserver(this);
......@@ -255,6 +253,8 @@ RenderViewHostImpl::RenderViewHostImpl(
&RenderViewHostImpl::ClosePageTimeout, weak_factory_.GetWeakPtr())));
input_device_change_observer_.reset(new InputDeviceChangeObserver(this));
GetWidget()->set_owner_delegate(this);
}
RenderViewHostImpl::~RenderViewHostImpl() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment