summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/ntp4/incognito_tab.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-23 17:21:03 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-23 16:25:15 +0000
commitc551f43206405019121bd2b2c93714319a0a3300 (patch)
tree1f48c30631c421fd4bbb3c36da20183c8a2ed7d7 /chromium/chrome/browser/resources/ntp4/incognito_tab.js
parent7961cea6d1041e3e454dae6a1da660b453efd238 (diff)
BASELINE: Update Chromium to 79.0.3945.139
Change-Id: I336b7182fab9bca80b709682489c07db112eaca5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/ntp4/incognito_tab.js')
-rw-r--r--chromium/chrome/browser/resources/ntp4/incognito_tab.js26
1 files changed, 18 insertions, 8 deletions
diff --git a/chromium/chrome/browser/resources/ntp4/incognito_tab.js b/chromium/chrome/browser/resources/ntp4/incognito_tab.js
index bca80d57e69..aa7de31ab36 100644
--- a/chromium/chrome/browser/resources/ntp4/incognito_tab.js
+++ b/chromium/chrome/browser/resources/ntp4/incognito_tab.js
@@ -3,7 +3,25 @@
// found in the LICENSE file.
window.addEventListener('load', function() {
+ cr.addWebUIListener('theme-changed', themeData => {
+ document.documentElement.setAttribute(
+ 'hascustombackground', themeData.hasCustomBackground);
+ $('incognitothemecss').href =
+ 'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now();
+ });
chrome.send('observeThemeChanges');
+
+ cr.addWebUIListener('cookie-controls-changed', checked => {
+ $('cookie-controls-toggle').checked = checked;
+ });
+ cr.addWebUIListener(
+ 'third-party-cookie-blocking-changed', shouldHideCookieControls => {
+ $('cookie-controls').hidden = shouldHideCookieControls;
+ });
+ $('cookie-controls-toggle').addEventListener('change', event => {
+ chrome.send('cookieControlsToggleChanged', [event.detail]);
+ });
+ chrome.send('observeCookieControlsSettingsChanges');
});
// Handle the bookmark bar, theme, and font size change requests
@@ -13,12 +31,4 @@ const ntp = {
setBookmarkBarAttached: function(attached) {
document.documentElement.setAttribute('bookmarkbarattached', attached);
},
-
- /** @param {!{hasCustomBackground: boolean}} themeData */
- themeChanged: function(themeData) {
- document.documentElement.setAttribute(
- 'hascustombackground', themeData.hasCustomBackground);
- $('incognitothemecss').href =
- 'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now();
- },
};