OLD | NEW |
---|---|
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 // Retrieves the InterstitialPage if any associated with the specified |
52 // |web_contents|. | 52 // |web_contents|. |
53 CONTENT_EXPORT static InterstitialPage* GetInterstitialPage( | 53 CONTENT_EXPORT static InterstitialPage* GetInterstitialPage( |
54 WebContents* web_contents); | 54 WebContents* web_contents); |
55 | 55 |
56 // Retrieves the InterstitialPage that hosts the RenderFrameHost, or nullptr | |
57 // if |rfh| is not a part of any InterstitialPage. | |
58 CONTENT_EXPORT static InterstitialPage* FromRenderFrameHost( | |
59 RenderFrameHost* rfh); | |
60 | |
56 virtual ~InterstitialPage() {} | 61 virtual ~InterstitialPage() {} |
57 | 62 |
58 // Shows the interstitial page in the tab. | 63 // Shows the interstitial page in the tab. |
59 virtual void Show() = 0; | 64 virtual void Show() = 0; |
60 | 65 |
61 // Hides the interstitial page. | 66 // Hides the interstitial page. |
62 virtual void Hide() = 0; | 67 virtual void Hide() = 0; |
63 | 68 |
64 // Reverts to the page showing before the interstitial. | 69 // Reverts to the page showing before the interstitial. |
65 // Delegates should call this method when the user has chosen NOT to proceed | 70 // Delegates should call this method when the user has chosen NOT to proceed |
(...skipping 12 matching lines...) Expand all Loading... | |
78 | 83 |
79 // Sets the focus to the interstitial. | 84 // Sets the focus to the interstitial. |
80 virtual void Focus() = 0; | 85 virtual void Focus() = 0; |
81 | 86 |
82 // Gets the RenderFrameHost associated with | 87 // Gets the RenderFrameHost associated with |
83 // the interstitial page's main frame. | 88 // the interstitial page's main frame. |
84 virtual RenderFrameHost* GetMainFrame() const = 0; | 89 virtual RenderFrameHost* GetMainFrame() const = 0; |
85 | 90 |
86 virtual InterstitialPageDelegate* GetDelegateForTesting() = 0; | 91 virtual InterstitialPageDelegate* GetDelegateForTesting() = 0; |
87 virtual void DontCreateViewForTesting() = 0; | 92 virtual void DontCreateViewForTesting() = 0; |
93 | |
94 virtual WebContents* web_contents() const = 0; | |
Charlie Reis
2016/01/25 21:47:38
Style nit: We generally require CamelCase for virt
robwu
2016/01/25 22:54:41
Done.
| |
88 }; | 95 }; |
89 | 96 |
90 } // namespace content | 97 } // namespace content |
91 | 98 |
92 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ | 99 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ |
OLD | NEW |