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

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

Issue 560563004: Compile chrome://settings, part 5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_make_public
Patch Set: fixed assert errors Created 6 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/handler_options.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** @const */ var SettingsDialog = options.SettingsDialog; 6 /** @const */ var SettingsDialog = options.SettingsDialog;
7 7
8 /** 8 /**
9 * A dialog that will pop up when the user attempts to set the value of the 9 * A dialog that will pop up when the user attempts to set the value of the
10 * Boolean |pref| to |true|, asking for confirmation. If the user clicks OK, 10 * Boolean |pref| to |true|, asking for confirmation. If the user clicks OK,
11 * the new value is committed to Chrome. If the user clicks Cancel or leaves 11 * the new value is committed to Chrome. If the user clicks Cancel or leaves
12 * the settings page, the new value is discarded. 12 * the settings page, the new value is discarded.
13 * @constructor 13 * @constructor
14 * @param {string} name See Page constructor. 14 * @param {string} name See Page constructor.
15 * @param {string} title See Page constructor. 15 * @param {string} title See Page constructor.
16 * @param {string} pageDivName See Page constructor. 16 * @param {string} pageDivName See Page constructor.
17 * @param {HTMLInputElement} okButton The confirmation button element. 17 * @param {HTMLButtonElement} okButton The confirmation button element.
18 * @param {HTMLInputElement} cancelButton The cancellation button element. 18 * @param {HTMLButtonElement} cancelButton The cancellation button element.
19 * @param {string} pref The pref that requires confirmation. 19 * @param {string} pref The pref that requires confirmation.
20 * @param {string} metric User metrics identifier. 20 * @param {string} metric User metrics identifier.
21 * @param {string=} opt_confirmedPref A pref used to remember whether the 21 * @param {string=} opt_confirmedPref A pref used to remember whether the
22 * user has confirmed the dialog before. This ensures that the user is 22 * user has confirmed the dialog before. This ensures that the user is
23 * presented with the dialog only once. If left |undefined|, the dialog 23 * presented with the dialog only once. If left |undefined|, the dialog
24 * will pop up every time the user attempts to set |pref| to |true|. 24 * will pop up every time the user attempts to set |pref| to |true|.
25 * @extends {options.SettingsDialog} 25 * @extends {options.SettingsDialog}
26 */ 26 */
27 function ConfirmDialog(name, title, pageDivName, okButton, cancelButton, pref, 27 function ConfirmDialog(name, title, pageDivName, okButton, cancelButton, pref,
28 metric, opt_confirmedPref) { 28 metric, opt_confirmedPref) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 willHidePage: function() { 118 willHidePage: function() {
119 if (this.visible) 119 if (this.visible)
120 Preferences.getInstance().rollbackPref(this.pref); 120 Preferences.getInstance().rollbackPref(this.pref);
121 }, 121 },
122 }; 122 };
123 123
124 return { 124 return {
125 ConfirmDialog: ConfirmDialog 125 ConfirmDialog: ConfirmDialog
126 }; 126 };
127 }); 127 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/handler_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698