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

Unified Diff: chrome/browser/ui/webui/theme_handler.cc

Issue 1440113002: [MD] Change appearance of incognito NTP to MD spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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/ui/webui/ntp/ntp_resource_cache.cc ('k') | chrome/browser/ui/webui/theme_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/theme_handler.cc
diff --git a/chrome/browser/ui/webui/theme_handler.cc b/chrome/browser/ui/webui/theme_handler.cc
index 7759fa1d855379d49472d592a8ab53b3db31ad8e..f8b693cb3baac8f053a9c88aebaf0a8ec2384704 100644
--- a/chrome/browser/ui/webui/theme_handler.cc
+++ b/chrome/browser/ui/webui/theme_handler.cc
@@ -39,7 +39,11 @@ void ThemeHandler::Observe(int type,
const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_BROWSER_THEME_CHANGED, type);
InitializeCSSCaches();
- web_ui()->CallJavascriptFunction("ntp.themeChanged");
+ bool has_custom_bg = ThemeServiceFactory::GetForProfile(GetProfile())
+ ->HasCustomImage(IDR_THEME_NTP_BACKGROUND);
+ base::DictionaryValue dictionary;
+ dictionary.SetBoolean("hasCustomBackground", has_custom_bg);
+ web_ui()->CallJavascriptFunction("ntp.themeChanged", dictionary);
}
void ThemeHandler::InitializeCSSCaches() {
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | chrome/browser/ui/webui/theme_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698