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', function() { | 5 cr.define('options', function() { |
6 | 6 |
7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
8 | 8 |
9 // | 9 // |
10 // AdvancedOptions class | 10 // AdvancedOptions class |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 chrome.send('backgroundModeAction', | 115 chrome.send('backgroundModeAction', |
116 [String($('backgroundModeCheckbox').checked)]); | 116 [String($('backgroundModeCheckbox').checked)]); |
117 }; | 117 }; |
118 } | 118 } |
119 | 119 |
120 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on | 120 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on |
121 // certain platforms, or could be enabled by a lab. | 121 // certain platforms, or could be enabled by a lab. |
122 if (!cr.isChromeOS) { | 122 if (!cr.isChromeOS) { |
123 $('cloudPrintConnectorSetupButton').onclick = function(event) { | 123 $('cloudPrintConnectorSetupButton').onclick = function(event) { |
124 if ($('cloudPrintManageButton').style.display == 'none') { | 124 if ($('cloudPrintManageButton').style.display == 'none') { |
125 // Disable the button, set it's text to the intermediate state. | 125 // Disable the button, set its text to the intermediate state. |
126 $('cloudPrintConnectorSetupButton').textContent = | 126 $('cloudPrintConnectorSetupButton').textContent = |
127 localStrings.getString('cloudPrintConnectorEnablingButton'); | 127 localStrings.getString('cloudPrintConnectorEnablingButton'); |
128 $('cloudPrintConnectorSetupButton').disabled = true; | 128 $('cloudPrintConnectorSetupButton').disabled = true; |
129 chrome.send('showCloudPrintSetupDialog'); | 129 chrome.send('showCloudPrintSetupDialog'); |
130 } else { | 130 } else { |
131 chrome.send('disableCloudPrintConnector'); | 131 chrome.send('disableCloudPrintConnector'); |
132 } | 132 } |
133 }; | 133 }; |
134 } | 134 } |
135 $('cloudPrintManageButton').onclick = function(event) { | 135 $('cloudPrintManageButton').onclick = function(event) { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 connectorSectionElm.parentNode.removeChild(connectorSectionElm); | 267 connectorSectionElm.parentNode.removeChild(connectorSectionElm); |
268 } | 268 } |
269 }; | 269 }; |
270 | 270 |
271 // Export | 271 // Export |
272 return { | 272 return { |
273 AdvancedOptions: AdvancedOptions | 273 AdvancedOptions: AdvancedOptions |
274 }; | 274 }; |
275 | 275 |
276 }); | 276 }); |
OLD | NEW |