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

Unified Diff: chrome/browser/infobars/infobar_container.cc

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/infobars/infobar_container.cc
diff --git a/chrome/browser/infobars/infobar_container.cc b/chrome/browser/infobars/infobar_container.cc
index 3da8c0fa75b2c08b07b1ddd82ca7e2de932ec219..dbd191e2198cc1bf824feb3d65df19b7e8d98d22 100644
--- a/chrome/browser/infobars/infobar_container.cc
+++ b/chrome/browser/infobars/infobar_container.cc
@@ -48,7 +48,7 @@ void InfoBarContainer::ChangeInfoBarService(InfoBarService* infobar_service) {
registrar_.RemoveAll();
// Note that HideAllInfoBars() sets |infobars_shown_| to false, because that's
- // what the other, instant-related callers want; but here we actually
+ // what the other, Instant-related callers want; but here we actually
// explicitly want to reset this variable to true. So do that after calling
// the function.
HideAllInfoBars();
@@ -179,8 +179,8 @@ void InfoBarContainer::ModeChanged(const chrome::search::Mode& old_mode,
// Hide infobars when showing Instant Extended suggestions.
if (new_mode.is_search_suggestions()) {
// If suggestions are being shown on a |DEFAULT| page, delay the hiding
- // until notification that instant preview is ready is received via
- // PreviewStateChanged(); this prevents jankiness caused by infobars hiding
+ // until notification that Instant overlay is ready is received via
+ // OverlayStateChanged(); this prevents jankiness caused by infobars hiding
// followed by suggestions appearing.
if (new_mode.is_origin_default())
return;
@@ -192,11 +192,10 @@ void InfoBarContainer::ModeChanged(const chrome::search::Mode& old_mode,
}
}
-void InfoBarContainer::PreviewStateChanged(const InstantModel& model) {
- // If suggestions are being shown on a |DEFAULT| page, hide the infobars now.
+void InfoBarContainer::OverlayStateChanged(const InstantModel& model) {
+ // Suggestions are being shown on a |DEFAULT| page. Hide the infobars now.
// See comments for ModeChanged() for explanation.
- if (model.mode().is_search_suggestions() &&
- model.mode().is_origin_default()) {
+ if (model.overlay()) {
HideAllInfoBars();
OnInfoBarStateChanged(false);
}

Powered by Google App Engine
This is Rietveld 408576698