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

Unified Diff: content/public/browser/interstitial_page.h

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
« no previous file with comments | « content/browser/frame_host/render_frame_host_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/interstitial_page.h
diff --git a/content/public/browser/interstitial_page.h b/content/public/browser/interstitial_page.h
index 71b8707e54dfa88395cecda7ce7c4cd794d65e06..e22f402985dc9c73433c3ed37639055c444a369e 100644
--- a/content/public/browser/interstitial_page.h
+++ b/content/public/browser/interstitial_page.h
@@ -53,6 +53,11 @@ class InterstitialPage {
CONTENT_EXPORT static InterstitialPage* GetInterstitialPage(
WebContents* web_contents);
+ // Retrieves the InterstitialPage that hosts the RenderFrameHost, or nullptr
+ // if |rfh| is not a part of any InterstitialPage.
+ CONTENT_EXPORT static InterstitialPage* FromRenderFrameHost(
+ RenderFrameHost* rfh);
+
virtual ~InterstitialPage() {}
// Shows the interstitial page in the tab.
@@ -79,6 +84,13 @@ class InterstitialPage {
// Sets the focus to the interstitial.
virtual void Focus() = 0;
+ // Get the WebContents in which this interstitial is shown. Warning: Frames
+ // in the intersitital are NOT visible through WebContentObservers' normal
+ // notifications (e.g. RenderFrameDeleted). The only sensible use of this
+ // returned WebContents is to add a WebContentObserver and listen for the
+ // DidAttachInterstitialPage or DidDetachInterstitialPage notifications.
+ virtual WebContents* GetWebContents() const = 0;
+
// Gets the RenderFrameHost associated with
// the interstitial page's main frame.
virtual RenderFrameHost* GetMainFrame() const = 0;
« no previous file with comments | « content/browser/frame_host/render_frame_host_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698