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

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

Issue 9702011: Migrate proxy-settings.html to options2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright notices. Created 8 years, 9 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) 2011 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 ProxyOptions = options.ProxyOptions; 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(); 13 localStrings = new LocalStrings();
14 14
15 if (cr.isChromeOS) 15 if (cr.isChromeOS)
16 document.documentElement.setAttribute('os', 'chromeos'); 16 document.documentElement.setAttribute('os', 'chromeos');
17 17
18 // Decorate the existing elements in the document. 18 // Decorate the existing elements in the document.
19 cr.ui.decorate('input[pref][type=checkbox]', options.PrefCheckbox); 19 cr.ui.decorate('input[pref][type=checkbox]', options.PrefCheckbox);
20 cr.ui.decorate('input[pref][type=number]', options.PrefNumber); 20 cr.ui.decorate('input[pref][type=number]', options.PrefNumber);
21 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio); 21 cr.ui.decorate('input[pref][type=radio]', options.PrefRadio);
22 cr.ui.decorate('input[pref][type=range]', options.PrefRange); 22 cr.ui.decorate('input[pref][type=range]', options.PrefRange);
23 cr.ui.decorate('select[pref]', options.PrefSelect); 23 cr.ui.decorate('select[pref]', options.PrefSelect);
24 cr.ui.decorate('input[pref][type=text]', options.PrefTextField); 24 cr.ui.decorate('input[pref][type=text]', options.PrefTextField);
25 cr.ui.decorate('input[pref][type=url]', options.PrefTextField); 25 cr.ui.decorate('input[pref][type=url]', options.PrefTextField);
26 ProxyOptions.getInstance().initializePage(); 26 DetailsInternetPage.initializeProxySettings();
27 27
28 // TODO(ivankr): remove when http://crosbug.com/20660 is resolved. 28 // TODO(ivankr): remove when http://crosbug.com/20660 is resolved.
29 var inputs = document.querySelectorAll('input[pref]'); 29 var inputs = document.querySelectorAll('input[pref]');
30 for (var i = 0, el; el = inputs[i]; i++) { 30 for (var i = 0, el; el = inputs[i]; i++) {
31 el.addEventListener('keyup', function(e) { 31 el.addEventListener('keyup', function(e) {
32 cr.dispatchSimpleEvent(this, 'change'); 32 cr.dispatchSimpleEvent(this, 'change');
33 }); 33 });
34 } 34 }
35 35
36 Preferences.getInstance().initialize(); 36 Preferences.getInstance().initialize();
37 chrome.send('coreOptionsInitialize'); 37 chrome.send('coreOptionsInitialize');
38 38
39 ProxyOptions.getInstance().visible = true; 39 DetailsInternetPage.showProxySettings();
40 } 40 }
41 41
42 document.addEventListener('DOMContentLoaded', load); 42 document.addEventListener('DOMContentLoaded', load);
43 43
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/proxy_settings.html ('k') | chrome/browser/resources/options2/chromeos/internet_detail.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698