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

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

Issue 215423002: [Hotword] Make ConfirmDialog subclass from SettingsDialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some more cleanup Created 6 years, 9 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 6
7 ///////////////////////////////////////////////////////////////////////////// 7 /////////////////////////////////////////////////////////////////////////////
8 // Preferences class: 8 // Preferences class:
9 9
10 /** 10 /**
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 setPrefNoCommit_: function(name, type, value) { 209 setPrefNoCommit_: function(name, type, value) {
210 var pref = this.registeredPreferences_[name]; 210 var pref = this.registeredPreferences_[name];
211 pref.action = 'set'; 211 pref.action = 'set';
212 pref.type = type; 212 pref.type = type;
213 pref.value = value; 213 pref.value = value;
214 214
215 var event = new Event(name); 215 var event = new Event(name);
216 // Decorate pref value as CoreOptionsHandler::CreateValueForPref() does. 216 // Decorate pref value as CoreOptionsHandler::CreateValueForPref() does.
217 event.value = { 217 event.value = {
218 value: value, 218 value: value,
219 recommendedValue: pref.orig.recommendedValue, 219 recommendedValue: pref.orig ? pref.orig.recommendedValue : undefined,
220 disabled: pref.orig.disabled, 220 disabled: pref.orig ? pref.orig.disabled : undefined,
221 uncommitted: true, 221 uncommitted: true,
222 }; 222 };
Dan Beam 2014/03/27 21:06:43 nit: event.value = {value: value, uncommitted: tr
rpetterson 2014/03/27 21:26:00 Done.
223 this.dispatchEvent(event); 223 this.dispatchEvent(event);
224 }, 224 },
225 225
226 /** 226 /**
227 * Clears a preference and signals its new value. The change is propagated 227 * Clears a preference and signals its new value. The change is propagated
228 * throughout the UI code but is not committed to Chrome yet. 228 * throughout the UI code but is not committed to Chrome yet.
229 * @param {string} name Preference name. 229 * @param {string} name Preference name.
230 * @private 230 * @private
231 */ 231 */
232 clearPrefNoCommit_: function(name) { 232 clearPrefNoCommit_: function(name) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 prefs.registeredPreferences_[notification[0]] = {orig: notification[1]}; 329 prefs.registeredPreferences_[notification[0]] = {orig: notification[1]};
330 prefs.dispatchEvent(event); 330 prefs.dispatchEvent(event);
331 }; 331 };
332 332
333 // Export 333 // Export
334 return { 334 return {
335 Preferences: Preferences 335 Preferences: Preferences
336 }; 336 };
337 337
338 }); 338 });
OLDNEW
« chrome/browser/resources/options/pref_ui.js ('K') | « chrome/browser/resources/options/pref_ui.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698