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; |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Size; | 13 class Size; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class InterstitialPageDelegate; | 18 class InterstitialPageDelegate; |
19 class RenderViewHost; | 19 class RenderFrameHost; |
20 class WebContents; | 20 class WebContents; |
21 | 21 |
22 // This class is used for showing interstitial pages, pages that show some | 22 // This class is used for showing interstitial pages, pages that show some |
23 // informative message asking for user validation before reaching the target | 23 // informative message asking for user validation before reaching the target |
24 // page. (Navigating to a page served over bad HTTPS or a page containing | 24 // page. (Navigating to a page served over bad HTTPS or a page containing |
25 // malware are typical cases where an interstitial is required.) | 25 // malware are typical cases where an interstitial is required.) |
26 // | 26 // |
27 // If specified in the Create function, this class creates a navigation entry so | 27 // If specified in the Create function, this class creates a navigation entry so |
28 // that when the interstitial shows, the current entry is the target URL. | 28 // that when the interstitial shows, the current entry is the target URL. |
29 // | 29 // |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // the target URL. | 72 // the target URL. |
73 // Warning: 'this' has been deleted when this method returns. | 73 // Warning: 'this' has been deleted when this method returns. |
74 virtual void Proceed() = 0; | 74 virtual void Proceed() = 0; |
75 | 75 |
76 // Sizes the RenderViewHost showing the actual interstitial page contents. | 76 // Sizes the RenderViewHost showing the actual interstitial page contents. |
77 virtual void SetSize(const gfx::Size& size) = 0; | 77 virtual void SetSize(const gfx::Size& size) = 0; |
78 | 78 |
79 // Sets the focus to the interstitial. | 79 // Sets the focus to the interstitial. |
80 virtual void Focus() = 0; | 80 virtual void Focus() = 0; |
81 | 81 |
82 virtual RenderViewHost* GetRenderViewHostForTesting() const = 0; | 82 // Gets the RenderFrameHost associated with |
| 83 // the interstitial page's main frame. |
| 84 virtual RenderFrameHost* GetMainFrame() const = 0; |
| 85 |
83 virtual InterstitialPageDelegate* GetDelegateForTesting() = 0; | 86 virtual InterstitialPageDelegate* GetDelegateForTesting() = 0; |
84 virtual void DontCreateViewForTesting() = 0; | 87 virtual void DontCreateViewForTesting() = 0; |
85 }; | 88 }; |
86 | 89 |
87 } // namespace content | 90 } // namespace content |
88 | 91 |
89 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ | 92 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_H_ |
OLD | NEW |