Chromium Code Reviews| 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..868d458de8aafe078940743a1abdda67b24ebeb5 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 |
| + // notificaions (e.g. RenderFrameDeleted). The only sensible use of this |
|
Charlie Reis
2016/01/26 01:14:30
nit: notifications
robwu
2016/01/26 11:29:32
Done.
|
| + // returned WebContents is to add a WebContentObserver and listen for the |
| + // DidAttachInterstitialPage or DidDetachInterstitialPage notifications. |
| + virtual WebContents* GetUnderlyingWebContents() const = 0; |
|
Charlie Reis
2016/01/26 01:14:30
Underlying isn't a term we use elsewhere for inter
robwu
2016/01/26 11:29:32
Done. (I called it GetUnderlyingWebContents becaus
Charlie Reis
2016/01/26 23:58:27
Ah, I was mistaken. But yeah, that's hidden away
|
| + |
| // Gets the RenderFrameHost associated with |
| // the interstitial page's main frame. |
| virtual RenderFrameHost* GetMainFrame() const = 0; |