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

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

Issue 11413018: alternate ntp: implement searchbox api for instant overlay to adopt themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed sreeram's comments, fixed to not set theme fields if no theme Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/instant/instant_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 09aee030bad29ff4805634404b125bbe49b62af4..c630f0e3e14f88e91c247af898b54071503602db 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -526,6 +526,16 @@ void InstantController::SetInstantEnabled(bool instant_enabled) {
DeleteLoader();
}
+void InstantController::ThemeChanged(const ThemeBackgroundInfo& theme_info) {
+ if (GetPreviewContents())
+ loader_->SendThemeBackgroundInfo(theme_info);
+}
+
+void InstantController::ThemeAreaHeightChanged(int height) {
+ if (GetPreviewContents())
+ loader_->SendThemeAreaHeight(height);
+}
+
void InstantController::SetSuggestions(
InstantLoader* loader,
const std::vector<InstantSuggestion>& suggestions) {
@@ -645,7 +655,8 @@ bool InstantController::ResetLoader(const TemplateURL* template_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 theme-related info and context.
+ browser_->UpdateThemeInfoForPreview();
if (extended_enabled_)
loader_->OnActiveTabModeChanged(search_mode_.is_ntp());
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | chrome/browser/instant/instant_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698