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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var SettingsDialog = options.SettingsDialog; | 6 var SettingsDialog = options.SettingsDialog; |
7 | 7 |
8 /* | 8 /* |
9 * SpellingConfirmOverlay class | 9 * SpellingConfirmOverlay class |
10 * Dialog to confirm that the user really wants to use the Spelling service | 10 * Dialog to confirm that the user really wants to use the Spelling service |
(...skipping 14 matching lines...) Expand all Loading... | |
25 __proto__: SettingsDialog.prototype, | 25 __proto__: SettingsDialog.prototype, |
26 | 26 |
27 /** @inheritDoc */ | 27 /** @inheritDoc */ |
28 initializePage: function() { | 28 initializePage: function() { |
29 SettingsDialog.prototype.initializePage.call(this); | 29 SettingsDialog.prototype.initializePage.call(this); |
30 }, | 30 }, |
31 | 31 |
32 /** @inheritDoc */ | 32 /** @inheritDoc */ |
33 handleConfirm: function() { | 33 handleConfirm: function() { |
34 SettingsDialog.prototype.handleConfirm.call(this); | 34 SettingsDialog.prototype.handleConfirm.call(this); |
35 Preferences.setBooleanPref('spellcheck.use_spelling_service', true); | 35 Preferences.setBooleanPref('spellcheck.use_spelling_service', |
36 Preferences.setBooleanPref('spellcheck.confirm_dialog_shown', true); | 36 true, |
James Hawkins
2012/08/02 20:33:32
Optional nit: Condense parameters.
bartfab (slow)
2012/08/31 14:14:30
Done.
| |
37 true); | |
38 Preferences.setBooleanPref('spellcheck.confirm_dialog_shown', | |
39 true, | |
40 true); | |
37 }, | 41 }, |
38 | 42 |
39 /** @inheritDoc */ | 43 /** @inheritDoc */ |
40 handleCancel: function() { | 44 handleCancel: function() { |
41 SettingsDialog.prototype.handleCancel.call(this); | 45 SettingsDialog.prototype.handleCancel.call(this); |
42 $('spelling-enabled-control').checked = false; | 46 $('spelling-enabled-control').checked = false; |
43 }, | 47 }, |
44 }; | 48 }; |
45 | 49 |
46 // Export | 50 // Export |
47 return { | 51 return { |
48 SpellingConfirmOverlay: SpellingConfirmOverlay | 52 SpellingConfirmOverlay: SpellingConfirmOverlay |
49 }; | 53 }; |
50 }); | 54 }); |
OLD | NEW |