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

Side by Side Diff: chrome/browser/resources/chromeos/proxy_settings.js

Issue 10391044: retry 136193 - convert localStrings to loadTimeData for options page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 var OptionsPage = options.OptionsPage; 5 var OptionsPage = options.OptionsPage;
6 var Preferences = options.Preferences; 6 var Preferences = options.Preferences;
7 var DetailsInternetPage = options.internet.DetailsInternetPage; 7 var DetailsInternetPage = options.internet.DetailsInternetPage;
8 8
9 /** 9 /**
10 * DOMContentLoaded handler, sets up the page. 10 * DOMContentLoaded handler, sets up the page.
11 */ 11 */
12 function load() { 12 function load() {
13 localStrings = new LocalStrings();
14
15 if (cr.isChromeOS) 13 if (cr.isChromeOS)
16 document.documentElement.setAttribute('os', 'chromeos'); 14 document.documentElement.setAttribute('os', 'chromeos');
17 15
18 // Decorate the existing elements in the document. 16 // Decorate the existing elements in the document.
19 cr.ui.decorate('input[pref][type=checkbox]', options.PrefCheckbox); 17 cr.ui.decorate('input[pref][type=checkbox]', options.PrefCheckbox);
20 cr.ui.decorate('input[pref][type=number]', options.PrefNumber); 18 cr.ui.decorate('input[pref][type=number]', options.PrefNumber);
21 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio); 19 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio);
22 cr.ui.decorate('input[pref][type=range]', options.PrefRange); 20 cr.ui.decorate('input[pref][type=range]', options.PrefRange);
23 cr.ui.decorate('select[pref]', options.PrefSelect); 21 cr.ui.decorate('select[pref]', options.PrefSelect);
24 cr.ui.decorate('input[pref][type=text]', options.PrefTextField); 22 cr.ui.decorate('input[pref][type=text]', options.PrefTextField);
25 cr.ui.decorate('input[pref][type=url]', options.PrefTextField); 23 cr.ui.decorate('input[pref][type=url]', options.PrefTextField);
26 DetailsInternetPage.initializeProxySettings(); 24 DetailsInternetPage.initializeProxySettings();
27 25
28 // TODO(ivankr): remove when http://crosbug.com/20660 is resolved. 26 // TODO(ivankr): remove when http://crosbug.com/20660 is resolved.
29 var inputs = document.querySelectorAll('input[pref]'); 27 var inputs = document.querySelectorAll('input[pref]');
30 for (var i = 0, el; el = inputs[i]; i++) { 28 for (var i = 0, el; el = inputs[i]; i++) {
31 el.addEventListener('keyup', function(e) { 29 el.addEventListener('keyup', function(e) {
32 cr.dispatchSimpleEvent(this, 'change'); 30 cr.dispatchSimpleEvent(this, 'change');
33 }); 31 });
34 } 32 }
35 33
36 Preferences.getInstance().initialize(); 34 Preferences.getInstance().initialize();
37 chrome.send('coreOptionsInitialize'); 35 chrome.send('coreOptionsInitialize');
38 36
39 DetailsInternetPage.showProxySettings(); 37 DetailsInternetPage.showProxySettings();
40 } 38 }
41 39
42 document.addEventListener('DOMContentLoaded', load); 40 document.addEventListener('DOMContentLoaded', load);
43
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698