OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 cr.define('options', function() { |
| 6 var SettingsDialog = options.SettingsDialog; |
| 7 |
| 8 /** |
| 9 * DoNotTrackConfirmOverlay class |
| 10 * Dialog to confirm that the user really wants to enable Do Not Track. |
| 11 * @extends {SettingsDialog} |
| 12 */ |
| 13 function DoNotTrackConfirmOverlay() { |
| 14 SettingsDialog.call(this, |
| 15 'doNotTrackConfirm', |
| 16 loadTimeData.getString('doNotTrackConfirmTitle'), |
| 17 'do-not-track-confirm-overlay', |
| 18 $('do-not-track-confirm-ok'), |
| 19 $('do-not-track-confirm-cancel')); |
| 20 }; |
| 21 |
| 22 cr.addSingletonGetter(DoNotTrackConfirmOverlay); |
| 23 |
| 24 DoNotTrackConfirmOverlay.prototype = { |
| 25 __proto__: SettingsDialog.prototype, |
| 26 |
| 27 /** @inheritDoc */ |
| 28 handleConfirm: function() { |
| 29 SettingsDialog.prototype.handleConfirm.call(this); |
| 30 Preferences.setBooleanPref('enable_do_not_track', true, true); |
| 31 }, |
| 32 |
| 33 /** @inheritDoc */ |
| 34 handleCancel: function() { |
| 35 SettingsDialog.prototype.handleCancel.call(this); |
| 36 $('do-not-track-enabled').checked = false; |
| 37 }, |
| 38 }; |
| 39 |
| 40 // Export |
| 41 return { |
| 42 DoNotTrackConfirmOverlay: DoNotTrackConfirmOverlay |
| 43 }; |
| 44 }); |
OLD | NEW |