| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" | |
| 6 | |
| 7 #include "chrome/browser/profiles/profile.h" | |
| 8 #include "chrome/browser/renderer_preferences_util.h" | |
| 9 #include "chrome/common/render_messages.h" | |
| 10 #include "content/browser/renderer_host/render_view_host.h" | |
| 11 #include "content/public/browser/web_contents.h" | |
| 12 | |
| 13 using content::WebContents; | |
| 14 | |
| 15 ChromeInterstitialPage::ChromeInterstitialPage(WebContents* tab, | |
| 16 bool new_navigation, | |
| 17 const GURL& url) | |
| 18 : InterstitialPage(tab, new_navigation, url) { | |
| 19 Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); | |
| 20 content::RendererPreferences prefs; | |
| 21 renderer_preferences_util::UpdateFromSystemSettings(&prefs, profile); | |
| 22 set_renderer_preferences(prefs); | |
| 23 } | |
| 24 | |
| 25 ChromeInterstitialPage::~ChromeInterstitialPage() { | |
| 26 } | |
| 27 | |
| 28 void ChromeInterstitialPage::Show() { | |
| 29 InterstitialPage::Show(); | |
| 30 | |
| 31 render_view_host()->Send( | |
| 32 new ChromeViewMsg_SetAsInterstitial(render_view_host()->routing_id())); | |
| 33 } | |
| OLD | NEW |