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

Side by Side Diff: chrome/browser/resources/options/clear_browser_data_overlay.js

Issue 2075023002: UI Changes to support clearing EME/CDM data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert options_page.css Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * ClearBrowserDataOverlay class 10 * ClearBrowserDataOverlay class
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 Page.prototype.initializePage.call(this); 53 Page.prototype.initializePage.call(this);
54 54
55 var f = this.updateStateOfControls_.bind(this); 55 var f = this.updateStateOfControls_.bind(this);
56 var types = ['browser.clear_data.browsing_history', 56 var types = ['browser.clear_data.browsing_history',
57 'browser.clear_data.download_history', 57 'browser.clear_data.download_history',
58 'browser.clear_data.cache', 58 'browser.clear_data.cache',
59 'browser.clear_data.cookies', 59 'browser.clear_data.cookies',
60 'browser.clear_data.passwords', 60 'browser.clear_data.passwords',
61 'browser.clear_data.form_data', 61 'browser.clear_data.form_data',
62 'browser.clear_data.hosted_apps_data', 62 'browser.clear_data.hosted_apps_data',
63 'browser.clear_data.content_licenses']; 63 'browser.clear_data.media_licenses'];
64 types.forEach(function(type) { 64 types.forEach(function(type) {
65 Preferences.getInstance().addEventListener(type, f); 65 Preferences.getInstance().addEventListener(type, f);
66 }); 66 });
67 67
68 var checkboxes = document.querySelectorAll( 68 var checkboxes = document.querySelectorAll(
69 '#cbd-content-area input[type=checkbox]'); 69 '#cbd-content-area input[type=checkbox]');
70 for (var i = 0; i < checkboxes.length; i++) { 70 for (var i = 0; i < checkboxes.length; i++) {
71 checkboxes[i].onclick = f; 71 checkboxes[i].onclick = f;
72 } 72 }
73 73
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 $('delete-download-history-checkbox').checked = false; 251 $('delete-download-history-checkbox').checked = false;
252 } 252 }
253 253
254 // Enable everything else unless we are in the process of clearing. 254 // Enable everything else unless we are in the process of clearing.
255 var clearing = this.isClearingInProgress_; 255 var clearing = this.isClearingInProgress_;
256 $('delete-cache-checkbox').disabled = clearing; 256 $('delete-cache-checkbox').disabled = clearing;
257 $('delete-cookies-checkbox').disabled = clearing; 257 $('delete-cookies-checkbox').disabled = clearing;
258 $('delete-passwords-checkbox').disabled = clearing; 258 $('delete-passwords-checkbox').disabled = clearing;
259 $('delete-form-data-checkbox').disabled = clearing; 259 $('delete-form-data-checkbox').disabled = clearing;
260 $('delete-hosted-apps-data-checkbox').disabled = clearing; 260 $('delete-hosted-apps-data-checkbox').disabled = clearing;
261 $('deauthorize-content-licenses-checkbox').disabled = clearing; 261 $('delete-media-licenses-checkbox').disabled = clearing;
262 $('clear-browser-data-time-period').disabled = clearing; 262 $('clear-browser-data-time-period').disabled = clearing;
263 $('cbd-throbber').style.visibility = clearing ? 'visible' : 'hidden'; 263 $('cbd-throbber').style.visibility = clearing ? 'visible' : 'hidden';
264 $('clear-browser-data-dismiss').disabled = clearing; 264 $('clear-browser-data-dismiss').disabled = clearing;
265 }, 265 },
266 266
267 /** 267 /**
268 * Updates the given data volume counter with a given text. 268 * Updates the given data volume counter with a given text.
269 * @param {string} pref_name Name of the deletion preference of the counter 269 * @param {string} pref_name Name of the deletion preference of the counter
270 * to be updated. 270 * to be updated.
271 * @param {string} text The new text of the counter. 271 * @param {string} text The new text of the counter.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 var topmostVisiblePage = PageManager.getTopmostVisiblePage(); 331 var topmostVisiblePage = PageManager.getTopmostVisiblePage();
332 if (topmostVisiblePage && topmostVisiblePage.name == 'clearBrowserData') 332 if (topmostVisiblePage && topmostVisiblePage.name == 'clearBrowserData')
333 PageManager.closeOverlay(); 333 PageManager.closeOverlay();
334 }; 334 };
335 335
336 // Export 336 // Export
337 return { 337 return {
338 ClearBrowserDataOverlay: ClearBrowserDataOverlay 338 ClearBrowserDataOverlay: ClearBrowserDataOverlay
339 }; 339 };
340 }); 340 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698