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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
9 | 9 |
10 // | 10 // |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 this.onSpellcheckConfirmDialogShownChanged_.bind(this)); | 275 this.onSpellcheckConfirmDialogShownChanged_.bind(this)); |
276 } | 276 } |
277 // 'metricsReportingEnabled' element is only present on Chrome branded | 277 // 'metricsReportingEnabled' element is only present on Chrome branded |
278 // builds. | 278 // builds. |
279 if ($('metricsReportingEnabled')) { | 279 if ($('metricsReportingEnabled')) { |
280 $('metricsReportingEnabled').onclick = function(event) { | 280 $('metricsReportingEnabled').onclick = function(event) { |
281 chrome.send('metricsReportingCheckboxAction', | 281 chrome.send('metricsReportingCheckboxAction', |
282 [String(event.target.checked)]); | 282 [String(event.target.checked)]); |
283 }; | 283 }; |
284 } | 284 } |
| 285 $('do-not-track-enabled').customChangeHandler = function(event) { |
| 286 if (this.checked) { |
| 287 OptionsPage.showPageByName('doNotTrackConfirm', false); |
| 288 return true; |
| 289 } |
| 290 return false; |
| 291 }; |
285 | 292 |
286 // Bluetooth (CrOS only). | 293 // Bluetooth (CrOS only). |
287 if (cr.isChromeOS) { | 294 if (cr.isChromeOS) { |
288 options.system.bluetooth.BluetoothDeviceList.decorate( | 295 options.system.bluetooth.BluetoothDeviceList.decorate( |
289 $('bluetooth-paired-devices-list')); | 296 $('bluetooth-paired-devices-list')); |
290 | 297 |
291 $('bluetooth-add-device').onclick = | 298 $('bluetooth-add-device').onclick = |
292 this.handleAddBluetoothDevice_.bind(this); | 299 this.handleAddBluetoothDevice_.bind(this); |
293 | 300 |
294 $('enable-bluetooth').onchange = function(event) { | 301 $('enable-bluetooth').onchange = function(event) { |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 BrowserOptions.getLoggedInUsername = function() { | 1360 BrowserOptions.getLoggedInUsername = function() { |
1354 return BrowserOptions.getInstance().username_; | 1361 return BrowserOptions.getInstance().username_; |
1355 }; | 1362 }; |
1356 } | 1363 } |
1357 | 1364 |
1358 // Export | 1365 // Export |
1359 return { | 1366 return { |
1360 BrowserOptions: BrowserOptions | 1367 BrowserOptions: BrowserOptions |
1361 }; | 1368 }; |
1362 }); | 1369 }); |
OLD | NEW |