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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.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/ui/views/frame/browser_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index f47f782eb689d5fe33693693cf13f95b6a82514a..33018dba823cb6e9511a0f64cfe2aefb1b926e3f 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -260,7 +260,7 @@ void BrowserViewLayout::ViewRemoved(views::View* host, views::View* view) {
}
void BrowserViewLayout::Layout(views::View* host) {
- // Showing instant extended suggestions causes us to temporarily hide any
+ // Showing Instant extended suggestions causes us to temporarily hide any
// visible bookmark bar and infobars. In turn, this hiding would normally
// cause the content below the suggestions to shift upwards, which looks
// surprising (since from the user's perspective, we're "covering" rather than
@@ -269,9 +269,9 @@ void BrowserViewLayout::Layout(views::View* host) {
// contents to continue to display from that origin.
const chrome::search::Mode& mode = browser()->search_model()->mode();
views::WebView* contents = browser_view_->contents_container_;
- int preview_height = contents_container_->preview_height();
+ int overlay_height = contents_container_->overlay_height();
gfx::Point old_contents_origin;
- if (preview_height > 0 && mode.is_search_suggestions() &&
+ if (overlay_height > 0 && mode.is_search_suggestions() &&
mode.is_origin_default()) {
old_contents_origin = contents->bounds().origin();
views::View::ConvertPointToTarget(contents->parent(), browser_view_,
@@ -314,7 +314,7 @@ void BrowserViewLayout::Layout(views::View* host) {
// fully cover that gap, and leaving the contents at their original height
// would leave an odd-looking blank space. In this case, we allow the
// contents to go ahead and shift upward.
- if (active_top_margin > 0 && active_top_margin < preview_height)
+ if (active_top_margin > 0 && active_top_margin < overlay_height)
contents_container_->SetActiveTopMargin(active_top_margin);
}

Powered by Google App Engine
This is Rietveld 408576698