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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 338633003: Prerender Instant search base url on omnibox focus event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 6 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/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index 3e95e325a1a2cafeddc3491ca24746dc1a52075e..421bbf0fdb17e3c3071c552da5a7b055dd28aca2 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -111,6 +111,19 @@ void BrowserInstantController::ActiveTabChanged() {
instant_.ActiveTabChanged();
}
+void BrowserInstantController::TabInsertedAt(content::WebContents* contents,
+ int index,
+ bool foreground) {
+ if (foreground) {
+ InstantSearchPrerenderer* prerenderer =
+ GetInstantSearchPrerenderer(profile());
+ if (prerenderer)
+ prerenderer->Init(
+ contents->GetController().GetSessionStorageNamespaceMap(),
+ contents->GetContainerBounds().size());
+ }
+}
+
void BrowserInstantController::TabDeactivated(content::WebContents* contents) {
instant_.TabDeactivated(contents);

Powered by Google App Engine
This is Rietveld 408576698