Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc |
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc |
index 330abd805cb7c87faeac71cd072b3064e3f68850..cd40cb6e99628383277e6aa7ab37db0ac367c5df 100644 |
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc |
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc |
@@ -385,6 +385,12 @@ void NTPResourceCache::CreateNewTabHTML() { |
ui::Animation::ShouldRenderRichAnimation() ? "true" : "false"; |
localized_strings.SetString("anim", anim); |
+ int alignment; |
+ ui::ThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_); |
+ tp->GetDisplayProperty(ThemeService::NTP_BACKGROUND_ALIGNMENT, &alignment); |
+ if (alignment & ThemeService::ALIGN_RIGHT) |
+ localized_strings.SetString("themegravity", "right"); |
+ |
// Pass the shown_sections pref early so that we can prevent flicker. |
const int shown_sections = ShownSectionsHandler::GetShownSections( |
profile_->GetPrefs()); |