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

Side by Side Diff: chrome/browser/resources/options/chromeos/internet_detail.js

Issue 517413002: Compile chrome://settings, part 1: remove all warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: s/event/Event/ 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
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 // require: onc_data.js 5 // require: onc_data.js
6 6
7 // NOTE(stevenjb): This code is in the process of being converted to be 7 // NOTE(stevenjb): This code is in the process of being converted to be
8 // compatible with the networkingPrivate extension API: 8 // compatible with the networkingPrivate extension API:
9 // * The network property dictionaries are being converted to use ONC values. 9 // * The network property dictionaries are being converted to use ONC values.
10 // * chrome.send calls will be replaced with an API object that simulates the 10 // * chrome.send calls will be replaced with an API object that simulates the
(...skipping 11 matching lines...) Expand all
22 * @param {string} selector CSS selector for extracting a list of elements. 22 * @param {string} selector CSS selector for extracting a list of elements.
23 * @param {bool} hidden New hidden value. 23 * @param {bool} hidden New hidden value.
24 */ 24 */
25 function updateHidden(selector, hidden) { 25 function updateHidden(selector, hidden) {
26 var elements = cr.doc.querySelectorAll(selector); 26 var elements = cr.doc.querySelectorAll(selector);
27 for (var i = 0, el; el = elements[i]; i++) { 27 for (var i = 0, el; el = elements[i]; i++) {
28 el.hidden = hidden; 28 el.hidden = hidden;
29 } 29 }
30 } 30 }
31 31
32 /* 32 /**
33 * Helper function to update the properties of the data object from the 33 * Helper function to update the properties of the data object from the
34 * properties in the update object. 34 * properties in the update object.
35 * @param {object} data object to update. 35 * @param {Object} data Object to update.
36 * @param {object} object containing the updated properties. 36 * @param {Object} update Object containing the updated properties.
37 */ 37 */
38 function updateDataObject(data, update) { 38 function updateDataObject(data, update) {
39 for (var prop in update) { 39 for (var prop in update) {
40 if (prop in data) 40 if (prop in data)
41 data[prop] = update[prop]; 41 data[prop] = update[prop];
42 } 42 }
43 } 43 }
44 44
45 /** 45 /**
46 * Monitor pref change of given element. 46 * Monitor pref change of given element.
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 model.value = model.automatic; 374 model.value = model.automatic;
375 fields[i].model = model; 375 fields[i].model = model;
376 } 376 }
377 } 377 }
378 if (!checked) 378 if (!checked)
379 $('ip-address').focus(); 379 $('ip-address').focus();
380 }, 380 },
381 381
382 /** 382 /**
383 * Handler for when the name server selection changes. 383 * Handler for when the name server selection changes.
384 * @param {Event} e The click event. 384 * @param {Event} event The click event.
385 * @private 385 * @private
386 */ 386 */
387 handleNameServerTypeChange_: function(event) { 387 handleNameServerTypeChange_: function(event) {
388 var type = event.target.value; 388 var type = event.target.value;
389 DetailsInternetPage.updateNameServerDisplay(type); 389 DetailsInternetPage.updateNameServerDisplay(type);
390 }, 390 },
391 391
392 /** 392 /**
393 * Creates an indicator event for controlled properties using 393 * Creates an indicator event for controlled properties using
394 * the same dictionary format as CoreOptionsHandler::CreateValueForPref. 394 * the same dictionary format as CoreOptionsHandler::CreateValueForPref.
395 * @param {string} name The name for the Event. 395 * @param {string} name The name for the Event.
396 * @param {Object} propData Property dictionary with |value|, |controlledBy| 396 * @param {!{value: *, controlledBy: *, recommendedValue: *}} propData
397 * and |recommendedValue| properties set. 397 * Property dictionary,
398 * @private 398 * @private
399 */ 399 */
400 createControlledEvent_: function(name, propData) { 400 createControlledEvent_: function(name, propData) {
401 var event = new Event(name); 401 var event = new Event(name);
402 event.value = { 402 event.value = {
403 value: propData.value, 403 value: propData.value,
404 controlledBy: propData.controlledBy, 404 controlledBy: propData.controlledBy,
405 recommendedValue: propData.recommendedValue 405 recommendedValue: propData.recommendedValue
406 }; 406 };
407 return event; 407 return event;
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 1341
1342 // Don't show page name in address bar and in history to prevent people 1342 // Don't show page name in address bar and in history to prevent people
1343 // navigate here by hand and solve issue with page session restore. 1343 // navigate here by hand and solve issue with page session restore.
1344 PageManager.showPageByName('detailsInternetPage', false); 1344 PageManager.showPageByName('detailsInternetPage', false);
1345 }; 1345 };
1346 1346
1347 return { 1347 return {
1348 DetailsInternetPage: DetailsInternetPage 1348 DetailsInternetPage: DetailsInternetPage
1349 }; 1349 };
1350 }); 1350 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698