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

Side by Side Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 1219753007: Add network proxy input to md-settings internet details (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_470445_onc_proxy
Patch Set: . Created 5 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'cr-settings-internet-detail' is the settings subpage containing details 7 * 'cr-settings-internet-detail' is the settings subpage containing details
8 * for a network. 8 * for a network.
9 * 9 *
10 * @group Chrome Settings Elements 10 * @group Chrome Settings Elements
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return; 349 return;
350 } 350 }
351 // setValidStaticIPConfig will fill in any other properties from 351 // setValidStaticIPConfig will fill in any other properties from
352 // networkState. This is necessary since we update IP Address and 352 // networkState. This is necessary since we update IP Address and
353 // NameServers independently. 353 // NameServers independently.
354 CrOnc.setValidStaticIPConfig(onc, this.networkState); 354 CrOnc.setValidStaticIPConfig(onc, this.networkState);
355 this.setNetworkProperties_(onc); 355 this.setNetworkProperties_(onc);
356 }, 356 },
357 357
358 /** 358 /**
359 * Event triggered when the Proxy configuration element changes.
360 * @param {!{detail: { field: string, value: CrOnc.ProxySettings}}} event
361 * The network-proxy changed event.
362 * @private
363 */
364 onProxyChanged_: function(event) {
365 var field = event.detail.field;
366 var value = event.detail.value;
367 console.debug('DetailPage.ProxyChanged: ' + field);
368 console.debug(value);
369 if (field != 'ProxySettings')
370 return;
371 var onc = { ProxySettings: value };
372 this.setNetworkProperties_(onc);
373 },
374
375 /**
359 * @param {?CrOnc.NetworkStateProperties} state The network state properties. 376 * @param {?CrOnc.NetworkStateProperties} state The network state properties.
360 * @return {boolean} True if the AutoConnect checkbox should be shown. 377 * @return {boolean} True if the AutoConnect checkbox should be shown.
361 * @private 378 * @private
362 */ 379 */
363 showAutoConnect_: function(state) { 380 showAutoConnect_: function(state) {
364 return state && state.Type != 'Ethernet'; 381 return state && state.Type != 'Ethernet';
365 }, 382 },
366 383
367 /** 384 /**
368 * @param {?CrOnc.NetworkStateProperties} state The network state properties. 385 * @param {?CrOnc.NetworkStateProperties} state The network state properties.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 484
468 /** 485 /**
469 * @param {?CrOnc.NetworkStateProperties} state The network state properties. 486 * @param {?CrOnc.NetworkStateProperties} state The network state properties.
470 * @return {boolean} True if the network section should be shown. 487 * @return {boolean} True if the network section should be shown.
471 * @private 488 * @private
472 */ 489 */
473 hasNetworkSection_: function(state) { 490 hasNetworkSection_: function(state) {
474 return state && state.Type != 'VPN'; 491 return state && state.Type != 'VPN';
475 } 492 }
476 }); 493 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698