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

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

Issue 12092089: Display an info banner on the clear browsing data dialog if the browsing data was cleared within th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments round 2 from James. Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 7
8 /** 8 /**
9 * ClearBrowserDataOverlay class 9 * ClearBrowserDataOverlay class
10 * Encapsulated handling of the 'Clear Browser Data' overlay page. 10 * Encapsulated handling of the 'Clear Browser Data' overlay page.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 $('clear-browser-data-time-period').disabled = state; 88 $('clear-browser-data-time-period').disabled = state;
89 $('cbd-throbber').style.visibility = state ? 'visible' : 'hidden'; 89 $('cbd-throbber').style.visibility = state ? 'visible' : 'hidden';
90 $('clear-browser-data-dismiss').disabled = state; 90 $('clear-browser-data-dismiss').disabled = state;
91 91
92 if (state) 92 if (state)
93 $('clear-browser-data-commit').disabled = true; 93 $('clear-browser-data-commit').disabled = true;
94 else 94 else
95 ClearBrowserDataOverlay.getInstance().updateCommitButtonState_(); 95 ClearBrowserDataOverlay.getInstance().updateCommitButtonState_();
96 }; 96 };
97 97
98 ClearBrowserDataOverlay.setBannerVisibility = function(args) {
99 var visible = args[0];
100 $('info-banner').hidden = !visible;
101 };
102
98 ClearBrowserDataOverlay.doneClearing = function() { 103 ClearBrowserDataOverlay.doneClearing = function() {
99 // The delay gives the user some feedback that the clearing 104 // The delay gives the user some feedback that the clearing
100 // actually worked. Otherwise the dialog just vanishes instantly in most 105 // actually worked. Otherwise the dialog just vanishes instantly in most
101 // cases. 106 // cases.
102 window.setTimeout(function() { 107 window.setTimeout(function() {
103 ClearBrowserDataOverlay.dismiss(); 108 ClearBrowserDataOverlay.dismiss();
104 }, 200); 109 }, 200);
105 }; 110 };
106 111
107 ClearBrowserDataOverlay.dismiss = function() { 112 ClearBrowserDataOverlay.dismiss = function() {
108 OptionsPage.closeOverlay(); 113 OptionsPage.closeOverlay();
109 this.setClearingState(false); 114 this.setClearingState(false);
110 }; 115 };
111 116
112 // Export 117 // Export
113 return { 118 return {
114 ClearBrowserDataOverlay: ClearBrowserDataOverlay 119 ClearBrowserDataOverlay: ClearBrowserDataOverlay
115 }; 120 };
116 }); 121 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/clear_browser_data_overlay.html ('k') | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698