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

Side by Side Diff: chrome/browser/resources/options/chromeos/network_list.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.network', function() { 5 cr.define('options.network', function() {
6 6
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var List = cr.ui.List; 8 var List = cr.ui.List;
9 var ListItem = cr.ui.ListItem; 9 var ListItem = cr.ui.ListItem;
10 var Menu = cr.ui.Menu; 10 var Menu = cr.ui.Menu;
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 data: {}}; 459 data: {}};
460 if (disabled) { 460 if (disabled) {
461 entry.command = null; 461 entry.command = null;
462 entry.tooltip = 462 entry.tooltip =
463 loadTimeData.getString('dataRoamingDisableToggleTooltip'); 463 loadTimeData.getString('dataRoamingDisableToggleTooltip');
464 } else { 464 } else {
465 var self = this; 465 var self = this;
466 entry.command = function() { 466 entry.command = function() {
467 options.Preferences.setBooleanPref( 467 options.Preferences.setBooleanPref(
468 'cros.signed.data_roaming_enabled', 468 'cros.signed.data_roaming_enabled',
469 !enableDataRoaming_); 469 !enableDataRoaming_, true);
470 // Force revalidation of the menu the next time it is displayed. 470 // Force revalidation of the menu the next time it is displayed.
471 self.menu_ = null; 471 self.menu_ = null;
472 }; 472 };
473 } 473 }
474 addendum.push(entry); 474 addendum.push(entry);
475 } 475 }
476 var list = this.data.rememberedNetworks; 476 var list = this.data.rememberedNetworks;
477 if (list && list.length > 0) { 477 if (list && list.length > 0) {
478 var callback = function(list) { 478 var callback = function(list) {
479 $('remembered-network-list').clear(); 479 $('remembered-network-list').clear();
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 * Whether the Network list is disabled. Only used for display purpose. 1126 * Whether the Network list is disabled. Only used for display purpose.
1127 * @type {boolean} 1127 * @type {boolean}
1128 */ 1128 */
1129 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); 1129 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR);
1130 1130
1131 // Export 1131 // Export
1132 return { 1132 return {
1133 NetworkList: NetworkList 1133 NetworkList: NetworkList
1134 }; 1134 };
1135 }); 1135 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/resources/options/chromeos/proxy_rules_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698