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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 10915217: Hook up SetInstantPreviewHeight for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fixes. Created 8 years, 3 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/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);

Powered by Google App Engine
This is Rietveld 408576698