Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chrome/browser/tab_contents/chrome_interstitial_page.cc

Issue 9323071: Use InterstitialPage through a delegate interface instead of deriving from it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/chrome_interstitial_page.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698