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

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

Issue 6292008: Added flags to prevent messing with network connections while 3G device is be... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // InternetOptions class: 10 // InternetOptions class:
(...skipping 13 matching lines...) Expand all
24 InternetOptions.prototype = { 24 InternetOptions.prototype = {
25 __proto__: OptionsPage.prototype, 25 __proto__: OptionsPage.prototype,
26 26
27 /** 27 /**
28 * Initializes InternetOptions page. 28 * Initializes InternetOptions page.
29 * Calls base class implementation to starts preference initialization. 29 * Calls base class implementation to starts preference initialization.
30 */ 30 */
31 initializePage: function() { 31 initializePage: function() {
32 OptionsPage.prototype.initializePage.call(this); 32 OptionsPage.prototype.initializePage.call(this);
33 33
34 if (templateData.accessLocked) {
35 var page = $('internetPage');
36 page.setAttribute('accesslocked', true);
37 }
38
34 options.internet.NetworkElement.decorate($('wiredList')); 39 options.internet.NetworkElement.decorate($('wiredList'));
35 $('wiredList').load(templateData.wiredList); 40 $('wiredList').load(templateData.wiredList);
36 options.internet.NetworkElement.decorate($('wirelessList')); 41 options.internet.NetworkElement.decorate($('wirelessList'));
37 $('wirelessList').load(templateData.wirelessList); 42 $('wirelessList').load(templateData.wirelessList);
38 options.internet.NetworkElement.decorate($('rememberedList')); 43 options.internet.NetworkElement.decorate($('rememberedList'));
39 $('rememberedList').load(templateData.rememberedList); 44 $('rememberedList').load(templateData.rememberedList);
40 45
41 options.internet.CellularPlanElement.decorate($('planList')); 46 options.internet.CellularPlanElement.decorate($('planList'));
42 47
43 $('wiredSection').hidden = (templateData.wiredList.length == 0); 48 $('wiredSection').hidden = (templateData.wiredList.length == 0);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 InternetOptions.updateLocked = false; 173 InternetOptions.updateLocked = false;
169 if (InternetOptions.updatePending) { 174 if (InternetOptions.updatePending) {
170 InternetOptions.refreshNetworkData(InternetOptions.updateData); 175 InternetOptions.refreshNetworkData(InternetOptions.updateData);
171 } 176 }
172 }; 177 };
173 178
174 // 179 //
175 //Chrome callbacks 180 //Chrome callbacks
176 // 181 //
177 InternetOptions.refreshNetworkData = function (data) { 182 InternetOptions.refreshNetworkData = function (data) {
183 var page = $('internetPage');
184 if (data.accessLocked) {
185 page.setAttribute('accesslocked', true);
186 return;
187 }
188 page.removeAttribute('accesslocked');
178 if (InternetOptions.updateLocked) { 189 if (InternetOptions.updateLocked) {
179 InternetOptions.updateData = data; 190 InternetOptions.updateData = data;
180 InternetOptions.updatePending = true; 191 InternetOptions.updatePending = true;
181 } else { 192 } else {
182 $('wiredList').load(data.wiredList); 193 $('wiredList').load(data.wiredList);
183 $('wirelessList').load(data.wirelessList); 194 $('wirelessList').load(data.wirelessList);
184 $('rememberedList').load(data.rememberedList); 195 $('rememberedList').load(data.rememberedList);
185 196
186 $('wiredSection').hidden = (data.wiredList.length == 0); 197 $('wiredSection').hidden = (data.wiredList.length == 0);
187 $('wirelessSection').hidden = (data.wirelessList.length == 0); 198 $('wirelessSection').hidden = (data.wirelessList.length == 0);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 360 }
350 OptionsPage.showOverlay('detailsInternetPage'); 361 OptionsPage.showOverlay('detailsInternetPage');
351 }; 362 };
352 363
353 // Export 364 // Export
354 return { 365 return {
355 InternetOptions: InternetOptions 366 InternetOptions: InternetOptions
356 }; 367 };
357 368
358 }); 369 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698