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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 9515010: Chrome on Android : Begin removing references to themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ntp resource cache into a separate CL and removed SyncPromoUI changes. Created 8 years, 10 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/ui/webui/ntp/new_tab_ui.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index 48b24383a843898d7f95e5edeb350ae7a3107737..7ce727e53fa847598e061b787d01f64e5623cd1d 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -135,10 +135,13 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
pref_change_registrar_.Init(GetProfile()->GetPrefs());
pref_change_registrar_.Add(prefs::kShowBookmarkBar, this);
+
+#if !defined(OS_ANDROID)
Elliot Glaysher 2012/03/07 23:52:46 Comment about why this is temporary
Ted C 2012/03/08 19:42:08 Done. Comment added. I will also look into creat
// Listen for theme installation.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(GetProfile())));
+#endif
}
NewTabUI::~NewTabUI() {
@@ -206,6 +209,7 @@ void NewTabUI::Observe(int type,
web_ui()->CallJavascriptFunction("ntp.setBookmarkBarAttached", attached);
break;
}
+#if !defined(OS_ANDROID)
case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: {
InitializeCSSCaches();
StringValue attribution(
@@ -214,6 +218,7 @@ void NewTabUI::Observe(int type,
web_ui()->CallJavascriptFunction("ntp.themeChanged", attribution);
break;
}
+#endif
case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT: {
last_paint_ = base::TimeTicks::Now();
break;
@@ -224,9 +229,11 @@ void NewTabUI::Observe(int type,
}
void NewTabUI::InitializeCSSCaches() {
+#if !defined(OS_ANDROID)
Profile* profile = GetProfile();
ThemeSource* theme = new ThemeSource(profile);
profile->GetChromeURLDataManager()->AddDataSource(theme);
+#endif
}
// static

Powered by Google App Engine
This is Rietveld 408576698