Index: chrome/browser/instant/instant_controller.cc |
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc |
index 4f8ba0185e950b99b5384f76fc52e08bb3158bb1..24f89bd4117fc08176d364240addca0cead8780e 100644 |
--- a/chrome/browser/instant/instant_controller.cc |
+++ b/chrome/browser/instant/instant_controller.cc |
@@ -561,6 +561,16 @@ void InstantController::OnActiveTabModeChanged(chrome::search::Mode new_mode) { |
} |
} |
+void InstantController::OnThemeChanged(const ThemeBackgroundInfo& theme_info) { |
+ if (loader_.get()) |
sreeram
2012/11/19 18:12:02
Use "if (GetPreviewContents())" instead of "if (lo
kuan
2012/11/19 22:06:07
Done.
|
+ loader_->SendThemeBackgroundInfo(theme_info); |
+} |
+ |
+void InstantController::OnThemeAreaHeightChanged(int height) { |
+ if (loader_.get()) |
+ loader_->SendThemeAreaHeight(height); |
+} |
+ |
bool InstantController::commit_on_pointer_release() const { |
return GetPreviewContents() && loader_->IsPointerDownFromActivate(); |
} |
@@ -692,8 +702,9 @@ void InstantController::ResetLoader(const std::string& instant_url, |
loader_.reset(new InstantLoader(this, instant_url, active_tab)); |
loader_->Init(); |
- // Ensure the searchbox API has the correct context. |
+ // Ensure the searchbox API has the correct context and theme-related info. |
loader_->OnActiveTabModeChanged(active_tab_mode_.is_ntp()); |
+ browser_->UpdateThemeRelatedInfoForPreview(); |
sreeram
2012/11/19 18:12:02
Nit: "related" seems unnecessary. Just "UpdateThem
kuan
2012/11/19 22:06:07
Done.
|
// Reset the loader timer. |
stale_loader_timer_.Stop(); |