Commit 5a21b8e6 authored by Tobias Sargeant's avatar Tobias Sargeant Committed by Commit Bot

aw: Update background colour on newly created main frames.

Bug: 802172
Change-Id: I5841fe34ee7226611a5ad2c66cf3c971fd40c670
Reviewed-on: https://chromium-review.googlesource.com/873977
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530540}
parent 9aff02e5
......@@ -129,12 +129,6 @@ void AwRenderViewHostExt::SmoothScroll(int target_x,
static_cast<int>(duration_ms)));
}
void AwRenderViewHostExt::RenderViewCreated(
content::RenderViewHost* render_view_host) {
web_contents()->GetMainFrame()->Send(new AwViewMsg_SetBackgroundColor(
web_contents()->GetMainFrame()->GetRoutingID(), background_color_));
}
void AwRenderViewHostExt::RenderViewHostChanged(
content::RenderViewHost* old_host,
content::RenderViewHost* new_host) {
......@@ -154,6 +148,10 @@ void AwRenderViewHostExt::RenderFrameCreated(
registry_.AddInterface(
base::Bind(&web_restrictions::WebRestrictionsMojoImplementation::Create,
AwBrowserContext::GetDefault()->GetWebRestrictionProvider()));
if (!frame_host->GetParent()) {
frame_host->Send(new AwViewMsg_SetBackgroundColor(
frame_host->GetRoutingID(), background_color_));
}
}
void AwRenderViewHostExt::DidFinishNavigation(
......
......@@ -81,7 +81,6 @@ class AwRenderViewHostExt : public content::WebContentsObserver {
private:
// content::WebContentsObserver implementation.
void RenderViewCreated(content::RenderViewHost* view_host) override;
void RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) override;
void RenderFrameCreated(content::RenderFrameHost* frame_host) override;
......
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