OLD | NEW |
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 /** | 5 /** |
6 * @fileoverview Base class for dialogs that require saving preferences on | 6 * @fileoverview Base class for dialogs that require saving preferences on |
7 * confirm and resetting preference inputs on cancel. | 7 * confirm and resetting preference inputs on cancel. |
8 */ | 8 */ |
9 | 9 |
10 cr.define('options', function() { | 10 cr.define('options', function() { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 var prefs = Preferences.getInstance(); | 59 var prefs = Preferences.getInstance(); |
60 var els = this.pageDiv.querySelectorAll('[dialog-pref]'); | 60 var els = this.pageDiv.querySelectorAll('[dialog-pref]'); |
61 for (var i = 0; i < els.length; i++) { | 61 for (var i = 0; i < els.length; i++) { |
62 if (els[i].pref) | 62 if (els[i].pref) |
63 prefs.rollbackPref(els[i].pref); | 63 prefs.rollbackPref(els[i].pref); |
64 } | 64 } |
65 }, | 65 }, |
66 }; | 66 }; |
67 | 67 |
68 return { | 68 return {SettingsDialog: SettingsDialog}; |
69 SettingsDialog: SettingsDialog | |
70 }; | |
71 }); | 69 }); |
OLD | NEW |