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

Side by Side Diff: content/public/browser/interstitial_page.h

Issue 2953513002: Fix a race between navigation and an interstitial. (Closed)
Patch Set: reword Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_
6 #define CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ 6 #define CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 class GURL; 10 class GURL;
(...skipping 30 matching lines...) Expand all
41 // the interstitial was triggered by a loading a sub-resource in a page. Takes 41 // the interstitial was triggered by a loading a sub-resource in a page. Takes
42 // ownership of |delegate|. 42 // ownership of |delegate|.
43 // 43 //
44 // Reloading the interstitial page will result in a new navigation to |url|. 44 // Reloading the interstitial page will result in a new navigation to |url|.
45 CONTENT_EXPORT static InterstitialPage* Create( 45 CONTENT_EXPORT static InterstitialPage* Create(
46 WebContents* web_contents, 46 WebContents* web_contents,
47 bool new_navigation, 47 bool new_navigation,
48 const GURL& url, 48 const GURL& url,
49 InterstitialPageDelegate* delegate); 49 InterstitialPageDelegate* delegate);
50 50
51 // Retrieves the InterstitialPage if any associated with the specified 51 // Returns the InterstitialPage, if any, associated with the specified
52 // |web_contents|. 52 // |web_contents|. Note: This returns a value from the time the interstitial
53 // page has Show() called on it.
54 //
55 // Compare to WebContents::GetInterstitialPage.
53 CONTENT_EXPORT static InterstitialPage* GetInterstitialPage( 56 CONTENT_EXPORT static InterstitialPage* GetInterstitialPage(
54 WebContents* web_contents); 57 WebContents* web_contents);
55 58
56 // Retrieves the InterstitialPage that hosts the RenderFrameHost, or nullptr 59 // Returns the InterstitialPage that hosts the RenderFrameHost, or nullptr if
57 // if |rfh| is not a part of any InterstitialPage. 60 // |rfh| is not a part of any InterstitialPage.
58 CONTENT_EXPORT static InterstitialPage* FromRenderFrameHost( 61 CONTENT_EXPORT static InterstitialPage* FromRenderFrameHost(
59 RenderFrameHost* rfh); 62 RenderFrameHost* rfh);
60 63
61 virtual ~InterstitialPage() {} 64 virtual ~InterstitialPage() {}
62 65
63 // Shows the interstitial page in the tab. 66 // Shows the interstitial page in the tab.
64 virtual void Show() = 0; 67 virtual void Show() = 0;
65 68
66 // Hides the interstitial page. 69 // Hides the interstitial page.
67 virtual void Hide() = 0; 70 virtual void Hide() = 0;
(...skipping 27 matching lines...) Expand all
95 // the interstitial page's main frame. 98 // the interstitial page's main frame.
96 virtual RenderFrameHost* GetMainFrame() const = 0; 99 virtual RenderFrameHost* GetMainFrame() const = 0;
97 100
98 virtual InterstitialPageDelegate* GetDelegateForTesting() = 0; 101 virtual InterstitialPageDelegate* GetDelegateForTesting() = 0;
99 virtual void DontCreateViewForTesting() = 0; 102 virtual void DontCreateViewForTesting() = 0;
100 }; 103 };
101 104
102 } // namespace content 105 } // namespace content
103 106
104 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ 107 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698