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

Unified Diff: chrome/browser/tab_contents/interstitial_page.cc

Issue 56135: Adding unit tests for the SafeBrowsingBlockingPage class (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/interstitial_page.cc
===================================================================
--- chrome/browser/tab_contents/interstitial_page.cc (revision 12779)
+++ chrome/browser/tab_contents/interstitial_page.cc (working copy)
@@ -174,6 +174,7 @@
DCHECK(!render_view_host_);
render_view_host_ = CreateRenderViewHost();
+ CreateWebContentsView();
std::string data_url = "data:text/html;charset=utf-8," +
EscapePath(GetHTMLContents());
@@ -253,16 +254,20 @@
RenderViewHost* render_view_host = new RenderViewHost(
SiteInstance::CreateSiteInstance(tab()->profile()),
this, MSG_ROUTING_NONE, NULL);
+ return render_view_host;
+}
+
+WebContentsView* InterstitialPage::CreateWebContentsView() {
WebContentsView* web_contents_view = tab()->view();
RenderWidgetHostView* view =
- web_contents_view->CreateViewForWidget(render_view_host);
- render_view_host->set_view(view);
- render_view_host->AllowDomAutomationBindings();
- render_view_host->CreateRenderView();
+ web_contents_view->CreateViewForWidget(render_view_host_);
+ render_view_host_->set_view(view);
+ render_view_host_->AllowDomAutomationBindings();
+ render_view_host_->CreateRenderView();
view->SetSize(web_contents_view->GetContainerSize());
// Don't show the interstitial until we have navigated to it.
view->Hide();
- return render_view_host;
+ return web_contents_view;
}
void InterstitialPage::Proceed() {
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.h ('k') | chrome/browser/tab_contents/web_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698