| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gfx/size.h" | 11 #include "base/gfx/size.h" |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 13 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| 14 #include "chrome/common/notification_registrar.h" | 14 #include "chrome/common/notification_registrar.h" |
| 15 #include "chrome/common/renderer_preferences.h" | 15 #include "chrome/common/renderer_preferences.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 | 17 |
| 18 class MessageLoop; | |
| 19 class NavigationEntry; | 18 class NavigationEntry; |
| 20 class TabContents; | 19 class TabContents; |
| 21 class TabContentsView; | 20 class TabContentsView; |
| 22 | 21 |
| 23 // This class is a base class for interstitial pages, pages that show some | 22 // This class is a base class for interstitial pages, pages that show some |
| 24 // informative message asking for user validation before reaching the target | 23 // informative message asking for user validation before reaching the target |
| 25 // 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 |
| 26 // malware are typical cases where an interstitial is required.) | 25 // malware are typical cases where an interstitial is required.) |
| 27 // | 26 // |
| 28 // If specified in its constructor, this class creates a navigation entry so | 27 // If specified in its constructor, this class creates a navigation entry so |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 bool should_revert_tab_title_; | 191 bool should_revert_tab_title_; |
| 193 | 192 |
| 194 // Whether the ResourceDispatcherHost has been notified to cancel/resume the | 193 // Whether the ResourceDispatcherHost has been notified to cancel/resume the |
| 195 // resource requests blocked for the RenderViewHost. | 194 // resource requests blocked for the RenderViewHost. |
| 196 bool resource_dispatcher_host_notified_; | 195 bool resource_dispatcher_host_notified_; |
| 197 | 196 |
| 198 // The original title of the tab that should be reverted to when the | 197 // The original title of the tab that should be reverted to when the |
| 199 // interstitial is hidden. | 198 // interstitial is hidden. |
| 200 std::wstring original_tab_title_; | 199 std::wstring original_tab_title_; |
| 201 | 200 |
| 202 MessageLoop* ui_loop_; | |
| 203 | |
| 204 // Our RenderViewHostViewDelegate, necessary for accelerators to work. | 201 // Our RenderViewHostViewDelegate, necessary for accelerators to work. |
| 205 scoped_ptr<InterstitialPageRVHViewDelegate> rvh_view_delegate_; | 202 scoped_ptr<InterstitialPageRVHViewDelegate> rvh_view_delegate_; |
| 206 | 203 |
| 207 // We keep a map of the various blocking pages shown as the UI tests need to | 204 // We keep a map of the various blocking pages shown as the UI tests need to |
| 208 // be able to retrieve them. | 205 // be able to retrieve them. |
| 209 typedef std::map<TabContents*, InterstitialPage*> InterstitialPageMap; | 206 typedef std::map<TabContents*, InterstitialPage*> InterstitialPageMap; |
| 210 static InterstitialPageMap* tab_to_interstitial_page_; | 207 static InterstitialPageMap* tab_to_interstitial_page_; |
| 211 | 208 |
| 212 // Settings passed to the renderer. | 209 // Settings passed to the renderer. |
| 213 RendererPreferences renderer_preferences_; | 210 RendererPreferences renderer_preferences_; |
| 214 | 211 |
| 215 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); | 212 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); |
| 216 }; | 213 }; |
| 217 | 214 |
| 218 #endif // CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 215 #endif // CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| OLD | NEW |