Chromium Code Reviews| Index: chrome/browser/instant/instant_controller.cc |
| diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc |
| index 69d2e7d91ffba0a64a1558ed312862de113e54d0..f6e8d5a5ede85f75eca6dad93ca4d0494ccf39dc 100644 |
| --- a/chrome/browser/instant/instant_controller.cc |
| +++ b/chrome/browser/instant/instant_controller.cc |
| @@ -297,6 +297,10 @@ void InstantController::Hide() { |
| if (is_showing_) { |
| is_showing_ = false; |
| delegate_->HideInstant(); |
| + // In extended mode, the Instant page may have resized the preview. Reset |
| + // its height to full here so that it starts that way on each invocation. |
|
sreeram
2012/09/17 17:26:12
"on each invocation" -> "on the next Update()"?
Jered
2012/09/18 22:12:00
Removed, this lives in the view now (as it was in
|
| + if (mode_ == EXTENDED) |
| + delegate_->SetInstantPreviewHeight(100, INSTANT_SIZE_PERCENT); |
| } |
| } |
| @@ -507,6 +511,14 @@ void InstantController::CommitInstantLoader(InstantLoader* loader) { |
| CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST); |
| } |
| +void InstantController::SetInstantPreviewHeight(InstantLoader* loader, |
| + int height, |
| + InstantSizeUnits units) { |
| + DCHECK_EQ(loader_.get(), loader); |
| + if (mode_ == EXTENDED) |
| + delegate_->SetInstantPreviewHeight(height, units); |
| +} |
| + |
| void InstantController::InstantLoaderPreviewLoaded(InstantLoader* loader) { |
| DCHECK_EQ(loader_.get(), loader); |
| AddPreviewUsageForHistogram(mode_, PREVIEW_LOADED); |