| 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 739fc61ebe4557ee56177e651e87cbfd3d433762..0496215f21dda6a3e2848d844d637cac285ff121 100644
|
| --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
|
| @@ -159,10 +159,15 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
|
|
|
| pref_change_registrar_.Init(GetProfile()->GetPrefs());
|
| pref_change_registrar_.Add(prefs::kShowBookmarkBar, this);
|
| +
|
| +#if !defined(OS_ANDROID)
|
| + // TODO(tedchoc): Remove when Android uses a natively rendered Android UI
|
| + // for the NTP.
|
| // Listen for theme installation.
|
| registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
|
| content::Source<ThemeService>(
|
| ThemeServiceFactory::GetForProfile(GetProfile())));
|
| +#endif
|
| }
|
|
|
| NewTabUI::~NewTabUI() {
|
| @@ -230,6 +235,9 @@ void NewTabUI::Observe(int type,
|
| web_ui()->CallJavascriptFunction("ntp.setBookmarkBarAttached", attached);
|
| break;
|
| }
|
| +#if !defined(OS_ANDROID)
|
| + // TODO(tedchoc): Remove when Android uses a natively rendered Android UI
|
| + // for the NTP.
|
| case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: {
|
| InitializeCSSCaches();
|
| StringValue attribution(
|
| @@ -238,6 +246,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;
|
| @@ -248,9 +257,13 @@ void NewTabUI::Observe(int type,
|
| }
|
|
|
| void NewTabUI::InitializeCSSCaches() {
|
| +#if !defined(OS_ANDROID)
|
| + // TODO(tedchoc): Remove when Android uses a natively rendered Android UI
|
| + // for the NTP.
|
| Profile* profile = GetProfile();
|
| ThemeSource* theme = new ThemeSource(profile);
|
| profile->GetChromeURLDataManager()->AddDataSource(theme);
|
| +#endif
|
| }
|
|
|
| // static
|
|
|