summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/ntp4/new_tab.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/ntp4/new_tab.js')
-rw-r--r--chromium/chrome/browser/resources/ntp4/new_tab.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/chromium/chrome/browser/resources/ntp4/new_tab.js b/chromium/chrome/browser/resources/ntp4/new_tab.js
index 0be7cd9f7a7..d6f7b960b48 100644
--- a/chromium/chrome/browser/resources/ntp4/new_tab.js
+++ b/chromium/chrome/browser/resources/ntp4/new_tab.js
@@ -108,6 +108,10 @@ cr.define('ntp', function() {
startTime = Date.now();
+ cr.addWebUIListener('theme-changed', () => {
+ $('themecss').href =
+ 'chrome://theme/css/new_tab_theme.css?' + Date.now();
+ });
chrome.send('observeThemeChanges');
});
}
@@ -207,15 +211,6 @@ cr.define('ntp', function() {
}
}
- /**
- * Called when the theme has changed.
- * @param {Object=} opt_themeData Not used; only exists to match equivalent
- * function in incognito NTP.
- */
- function themeChanged(opt_themeData) {
- $('themecss').href = 'chrome://theme/css/new_tab_theme.css?' + Date.now();
- }
-
function setBookmarkBarAttached(attached) {
document.documentElement.setAttribute('bookmarkbarattached', attached);
}
@@ -390,7 +385,6 @@ cr.define('ntp', function() {
setAppToBeHighlighted: setAppToBeHighlighted,
setBookmarkBarAttached: setBookmarkBarAttached,
setFaviconDominantColor: setFaviconDominantColor,
- themeChanged: themeChanged,
updateLogin: updateLogin
};
});