| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // navigation controller. | 137 // navigation controller. |
| 138 // Gives an opportunity to sub-classes to set states on the |entry|. | 138 // Gives an opportunity to sub-classes to set states on the |entry|. |
| 139 // Note that this is only called if the InterstitialPage was constructed with | 139 // Note that this is only called if the InterstitialPage was constructed with |
| 140 // |create_navigation_entry| set to true. | 140 // |create_navigation_entry| set to true. |
| 141 virtual void UpdateEntry(NavigationEntry* entry) {} | 141 virtual void UpdateEntry(NavigationEntry* entry) {} |
| 142 | 142 |
| 143 bool enabled() const { return enabled_; } | 143 bool enabled() const { return enabled_; } |
| 144 TabContents* tab() const { return tab_; } | 144 TabContents* tab() const { return tab_; } |
| 145 const GURL& url() const { return url_; } | 145 const GURL& url() const { return url_; } |
| 146 RenderViewHost* render_view_host() const { return render_view_host_; } | 146 RenderViewHost* render_view_host() const { return render_view_host_; } |
| 147 void set_renderer_preferences(const RendererPreferences& prefs) { |
| 148 renderer_preferences_ = prefs; |
| 149 } |
| 147 | 150 |
| 148 // Creates the RenderViewHost containing the interstitial content. | 151 // Creates the RenderViewHost containing the interstitial content. |
| 149 // Overriden in unit tests. | 152 // Overriden in unit tests. |
| 150 virtual RenderViewHost* CreateRenderViewHost(); | 153 virtual RenderViewHost* CreateRenderViewHost(); |
| 151 | 154 |
| 152 // Creates the TabContentsView that shows the interstitial RVH. | 155 // Creates the TabContentsView that shows the interstitial RVH. |
| 153 // Overriden in unit tests. | 156 // Overriden in unit tests. |
| 154 virtual TabContentsView* CreateTabContentsView(); | 157 virtual TabContentsView* CreateTabContentsView(); |
| 155 | 158 |
| 156 // Notification magic. | 159 // Notification magic. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 typedef std::map<TabContents*, InterstitialPage*> InterstitialPageMap; | 235 typedef std::map<TabContents*, InterstitialPage*> InterstitialPageMap; |
| 233 static InterstitialPageMap* tab_to_interstitial_page_; | 236 static InterstitialPageMap* tab_to_interstitial_page_; |
| 234 | 237 |
| 235 // Settings passed to the renderer. | 238 // Settings passed to the renderer. |
| 236 RendererPreferences renderer_preferences_; | 239 RendererPreferences renderer_preferences_; |
| 237 | 240 |
| 238 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); | 241 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); |
| 239 }; | 242 }; |
| 240 | 243 |
| 241 #endif // CONTENT_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ | 244 #endif // CONTENT_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ |
| OLD | NEW |