OLD | NEW |
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.internet', function() { | 5 cr.define('options.internet', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
8 /** @const */ var IPAddressField = options.internet.IPAddressField; | 8 /** @const */ var IPAddressField = options.internet.IPAddressField; |
9 | 9 |
10 /** | 10 /** |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 281 |
282 // We only load this string if we have the string data available | 282 // We only load this string if we have the string data available |
283 // because the proxy settings page on the login screen re-uses the | 283 // because the proxy settings page on the login screen re-uses the |
284 // proxy sub-page from the internet options, and it doesn't ever | 284 // proxy sub-page from the internet options, and it doesn't ever |
285 // show the DNS settings, so we don't need this string there. | 285 // show the DNS settings, so we don't need this string there. |
286 // The string isn't available because | 286 // The string isn't available because |
287 // chrome://settings-frame/strings.js (where the string is | 287 // chrome://settings-frame/strings.js (where the string is |
288 // stored) is not accessible from the login screen. | 288 // stored) is not accessible from the login screen. |
289 // TODO(pneubeck): Remove this once i18n of the proxy dialog on the login | 289 // TODO(pneubeck): Remove this once i18n of the proxy dialog on the login |
290 // page is fixed. http://crbug.com/242865 | 290 // page is fixed. http://crbug.com/242865 |
291 if (loadTimeData.data) { | 291 if (loadTimeData.data_) { |
292 $('google-dns-label').innerHTML = | 292 $('google-dns-label').innerHTML = |
293 loadTimeData.getString('googleNameServers'); | 293 loadTimeData.getString('googleNameServers'); |
294 } | 294 } |
295 }, | 295 }, |
296 | 296 |
297 /** | 297 /** |
298 * Handler for "add" event fired from userNameEdit. | 298 * Handler for "add" event fired from userNameEdit. |
299 * @param {Event} e Add event fired from userNameEdit. | 299 * @param {Event} e Add event fired from userNameEdit. |
300 * @private | 300 * @private |
301 */ | 301 */ |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 this.disableManualProxy_(); | 398 this.disableManualProxy_(); |
399 }, | 399 }, |
400 | 400 |
401 /** | 401 /** |
402 * Updates info banner visibility state. This function shows the banner | 402 * Updates info banner visibility state. This function shows the banner |
403 * if proxy is managed or shared-proxies is off for shared network. | 403 * if proxy is managed or shared-proxies is off for shared network. |
404 * @private | 404 * @private |
405 */ | 405 */ |
406 updateProxyBannerVisibility_: function() { | 406 updateProxyBannerVisibility_: function() { |
407 var bannerDiv = $('network-proxy-info-banner'); | 407 var bannerDiv = $('network-proxy-info-banner'); |
408 if (!loadTimeData.data) { | 408 if (!loadTimeData.data_) { |
409 // TODO(pneubeck): This temporarily prevents an exception below until | 409 // TODO(pneubeck): This temporarily prevents an exception below until |
410 // i18n of the proxy dialog on the login page is | 410 // i18n of the proxy dialog on the login page is |
411 // fixed. http://crbug.com/242865 | 411 // fixed. http://crbug.com/242865 |
412 bannerDiv.hidden = true; | 412 bannerDiv.hidden = true; |
413 return; | 413 return; |
414 } | 414 } |
415 | 415 |
416 // Show banner and determine its message if necessary. | 416 // Show banner and determine its message if necessary. |
417 var controlledBy = $('direct-proxy').controlledBy; | 417 var controlledBy = $('direct-proxy').controlledBy; |
418 if (!controlledBy || controlledBy == '') { | 418 if (!controlledBy || controlledBy == '') { |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 | 1164 |
1165 // Don't show page name in address bar and in history to prevent people | 1165 // Don't show page name in address bar and in history to prevent people |
1166 // navigate here by hand and solve issue with page session restore. | 1166 // navigate here by hand and solve issue with page session restore. |
1167 OptionsPage.showPageByName('detailsInternetPage', false); | 1167 OptionsPage.showPageByName('detailsInternetPage', false); |
1168 }; | 1168 }; |
1169 | 1169 |
1170 return { | 1170 return { |
1171 DetailsInternetPage: DetailsInternetPage | 1171 DetailsInternetPage: DetailsInternetPage |
1172 }; | 1172 }; |
1173 }); | 1173 }); |
OLD | NEW |