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

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

Issue 11232059: Clean up copy&paste in confirmation dialogs for prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit addressed. Created 8 years, 2 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
(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 * SpellingConfirmOverlay class
10 * Dialog to confirm that the user really wants to use the Spelling service
11 * @extends {SettingsDialog}
12 */
13 function SpellingConfirmOverlay() {
14 SettingsDialog.call(
15 this,
16 'spellingConfirm',
17 loadTimeData.getString('spellingConfirmOverlayTabTitle'),
18 'spelling-confirm-overlay',
19 $('spelling-confirm-ok'),
20 $('spelling-confirm-cancel'));
21 };
22
23 cr.addSingletonGetter(SpellingConfirmOverlay);
24
25 SpellingConfirmOverlay.prototype = {
26 __proto__: SettingsDialog.prototype,
27
28 /** @inheritDoc */
29 initializePage: function() {
30 SettingsDialog.prototype.initializePage.call(this);
31 },
32
33 /** @inheritDoc */
34 handleConfirm: function() {
35 SettingsDialog.prototype.handleConfirm.call(this);
36 Preferences.setBooleanPref('spellcheck.use_spelling_service',
37 true, true);
38 Preferences.setBooleanPref('spellcheck.confirm_dialog_shown',
39 true, true);
40 },
41
42 /** @inheritDoc */
43 handleCancel: function() {
44 SettingsDialog.prototype.handleCancel.call(this);
45 $('spelling-enabled-control').checked = false;
46 },
47 };
48
49 // Export
50 return {
51 SpellingConfirmOverlay: SpellingConfirmOverlay
52 };
53 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/options_bundle.js ('k') | chrome/browser/ui/webui/options/options_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698