InstantExtended: Committed NTP
Use separate dedicated WebContents for the NTP and Instant overlay (both residing in the Instant process). Intercept any navigations to the New Tab Page and swap in the preloaded Instant NTP contents when available.
BUG=168828,174498,174498
Review URL: https://chromiumcodereview.appspot.com/11824050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181397 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 03b10fe9..07e67162 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2059,7 +2059,9 @@
if (web_ui)
return web_ui->ShouldFocusLocationBarByDefault();
NavigationEntry* entry = controller_.GetActiveEntry();
- return (entry && entry->GetURL() == GURL(chrome::kAboutBlankURL));
+ if (entry && entry->GetURL() == GURL(chrome::kAboutBlankURL))
+ return true;
+ return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this);
}
void WebContentsImpl::SetFocusToLocationBar(bool select_all) {