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

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

Issue 10827141: Move handling of dialog preferences to Preferences class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed PrefCheckbox. Created 8 years, 3 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 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
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, true);
37 Preferences.setBooleanPref('spellcheck.confirm_dialog_shown',
38 true, true);
37 }, 39 },
38 40
39 /** @inheritDoc */ 41 /** @inheritDoc */
40 handleCancel: function() { 42 handleCancel: function() {
41 SettingsDialog.prototype.handleCancel.call(this); 43 SettingsDialog.prototype.handleCancel.call(this);
42 $('spelling-enabled-control').checked = false; 44 $('spelling-enabled-control').checked = false;
43 }, 45 },
44 }; 46 };
45 47
46 // Export 48 // Export
47 return { 49 return {
48 SpellingConfirmOverlay: SpellingConfirmOverlay 50 SpellingConfirmOverlay: SpellingConfirmOverlay
49 }; 51 };
50 }); 52 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/settings_dialog.js ('k') | chrome/browser/ui/webui/options/core_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698