Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 1629013002: Allow a main interstitial frame to act as an ExtensionMessagePort opener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extension-message-port-onDisconnect-580882
Patch Set: Remove trailing space Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/interstitial_page_impl.cc
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index 9e63d829f1ae2fa5b32dbb9a8aeae248441e0e42..251e3bc642fd0178581478cb5dd30f2144fd38f0 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -148,6 +148,14 @@ InterstitialPage* InterstitialPage::GetInterstitialPage(
return iter->second;
}
+InterstitialPage* InterstitialPage::FromRenderFrameHost(RenderFrameHost* rfh) {
+ if (!rfh)
+ return nullptr;
+ return static_cast<RenderFrameHostImpl*>(rfh)
+ ->delegate()
+ ->GetAsInterstitialPage();
+}
+
InterstitialPageImpl::InterstitialPageImpl(
WebContents* web_contents,
RenderWidgetHostDelegate* render_widget_host_delegate,
@@ -424,6 +432,10 @@ void InterstitialPageImpl::UpdateTitle(
controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_TITLE);
}
+InterstitialPage* InterstitialPageImpl::GetAsInterstitialPage() {
+ return this;
+}
+
AccessibilityMode InterstitialPageImpl::GetAccessibilityMode() const {
if (web_contents_)
return static_cast<WebContentsImpl*>(web_contents_)->GetAccessibilityMode();
@@ -475,6 +487,10 @@ RenderViewHostDelegateView* InterstitialPageImpl::GetDelegateView() {
return rvh_delegate_view_.get();
}
+WebContents* InterstitialPageImpl::GetWebContents() const {
+ return web_contents();
+}
+
const GURL& InterstitialPageImpl::GetMainFrameLastCommittedURL() const {
return url_;
}
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.h ('k') | content/browser/frame_host/render_frame_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698