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( | |
15 this, | |
16 'doNotTrackConfirm', | |
17 loadTimeData.getString('doNotTrackConfirmOverlayTabTitle'), | |
18 'do-not-track-confirm-overlay', | |
19 $('do-not-track-confirm-ok'), | |
20 $('do-not-track-confirm-cancel')); | |
21 }; | |
22 | |
23 cr.addSingletonGetter(DoNotTrackConfirmOverlay); | |
24 | |
25 DoNotTrackConfirmOverlay.prototype = { | |
26 __proto__: SettingsDialog.prototype, | |
27 | |
28 /** @inheritDoc */ | |
29 handleConfirm: function() { | |
30 SettingsDialog.prototype.handleConfirm.call(this); | |
31 Preferences.setBooleanPref('enable_do_not_track', true, true); | |
32 }, | |
33 | |
34 /** @inheritDoc */ | |
35 handleCancel: function() { | |
36 SettingsDialog.prototype.handleCancel.call(this); | |
37 $('do-not-track-enabled').checked = false; | |
38 }, | |
39 }; | |
40 | |
41 // Export | |
42 return { | |
43 DoNotTrackConfirmOverlay: DoNotTrackConfirmOverlay | |
44 }; | |
45 }); | |
OLD | NEW |