commit | 1c02971a1ffadffcc23c96886788f6365a45da00 | [log] [tgz] |
---|---|---|
author | Gyuyoung Kim <[email protected]> | Wed Jul 22 09:21:06 2020 |
committer | Commit Bot <[email protected]> | Wed Jul 22 09:21:06 2020 |
tree | e55504c23da4591d2f09bfe7af2287a911989a71 | |
parent | 9647e68bcfb24fd753199bdd03afec0183aeba03 [diff] [blame] |
Convert PageMsg_SetInsidePortal to Mojo This CL migrates PageMsg_SetInsidePortal to the blink's PageBroadcast interface as InsidePortalChanged method name. Additionally, this CL adds |is_inside_portal| parameter to WebView::Create to remove SetInsidePortal in WebView because it is only called by RenderViewImpl::Initialize once. Bug: 1102426 Change-Id: I2d981efefb380d2e3d92f5eb862b939975564603 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302974 Commit-Queue: Gyuyoung Kim <[email protected]> Reviewed-by: Ted Choc <[email protected]> Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Dave Tapuska <[email protected]> Reviewed-by: Kentaro Hara <[email protected]> Reviewed-by: Chrome Cunningham <[email protected]> Cr-Commit-Position: refs/heads/master@{#790766}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 999a5fd..52adc73 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2091,7 +2091,12 @@ } void WebContentsImpl::NotifyInsidePortal(bool inside_portal) { - SendPageMessage(new PageMsg_SetInsidePortal(MSG_ROUTING_NONE, inside_portal)); + ExecutePageBroadcastMethod(base::BindRepeating( + [](bool inside_portal, RenderViewHostImpl* rvh) { + if (auto& broadcast = rvh->GetAssociatedPageBroadcast()) + broadcast->SetInsidePortal(inside_portal); + }, + inside_portal)); } void WebContentsImpl::DidChangeVisibleSecurityState() {