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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 $('cloudPrintManageButton').onclick = function(event) { | 450 $('cloudPrintManageButton').onclick = function(event) { |
451 chrome.send('showCloudPrintManagePage'); | 451 chrome.send('showCloudPrintManagePage'); |
452 }; | 452 }; |
453 | 453 |
454 // Accessibility section (CrOS only). | 454 // Accessibility section (CrOS only). |
455 if (cr.isChromeOS) { | 455 if (cr.isChromeOS) { |
456 $('accessibility-spoken-feedback-check').onchange = function(event) { | 456 $('accessibility-spoken-feedback-check').onchange = function(event) { |
457 chrome.send('spokenFeedbackChange', | 457 chrome.send('spokenFeedbackChange', |
458 [$('accessibility-spoken-feedback-check').checked]); | 458 [$('accessibility-spoken-feedback-check').checked]); |
459 }; | 459 }; |
| 460 |
| 461 $('accessibility-high-contrast-check').onchange = function(event) { |
| 462 chrome.send('highContrastChange', |
| 463 [$('accessibility-high-contrast-check').checked]); |
| 464 }; |
460 } | 465 } |
461 | 466 |
462 // Background mode section. | 467 // Background mode section. |
463 if ($('backgroundModeCheckbox')) { | 468 if ($('backgroundModeCheckbox')) { |
464 cr.defineProperty($('backgroundModeCheckbox'), | 469 cr.defineProperty($('backgroundModeCheckbox'), |
465 'controlledBy', | 470 'controlledBy', |
466 cr.PropertyKind.ATTR); | 471 cr.PropertyKind.ATTR); |
467 $('backgroundModeCheckbox').onclick = function(event) { | 472 $('backgroundModeCheckbox').onclick = function(event) { |
468 chrome.send('backgroundModeAction', | 473 chrome.send('backgroundModeAction', |
469 [String($('backgroundModeCheckbox').checked)]); | 474 [String($('backgroundModeCheckbox').checked)]); |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 */ | 1190 */ |
1186 setSpokenFeedbackCheckboxState_: function(checked) { | 1191 setSpokenFeedbackCheckboxState_: function(checked) { |
1187 $('accessibility-spoken-feedback-check').checked = checked; | 1192 $('accessibility-spoken-feedback-check').checked = checked; |
1188 }, | 1193 }, |
1189 | 1194 |
1190 /** | 1195 /** |
1191 * Set the initial state of the high contrast checkbox. | 1196 * Set the initial state of the high contrast checkbox. |
1192 * @private | 1197 * @private |
1193 */ | 1198 */ |
1194 setHighContrastCheckboxState_: function(checked) { | 1199 setHighContrastCheckboxState_: function(checked) { |
1195 // TODO(zork): Update UI | 1200 $('accessibility-high-contrast-check').checked = checked; |
1196 }, | 1201 }, |
1197 | 1202 |
1198 /** | 1203 /** |
1199 * Set the initial state of the screen magnifier checkbox. | 1204 * Set the initial state of the screen magnifier checkbox. |
1200 * @private | 1205 * @private |
1201 */ | 1206 */ |
1202 setScreenMagnifierCheckboxState_: function(checked) { | 1207 setScreenMagnifierCheckboxState_: function(checked) { |
1203 // TODO(zork): Update UI | 1208 // TODO(zork): Update UI |
1204 }, | 1209 }, |
1205 | 1210 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 BrowserOptions.getLoggedInUsername = function() { | 1409 BrowserOptions.getLoggedInUsername = function() { |
1405 return BrowserOptions.getInstance().username_; | 1410 return BrowserOptions.getInstance().username_; |
1406 }; | 1411 }; |
1407 } | 1412 } |
1408 | 1413 |
1409 // Export | 1414 // Export |
1410 return { | 1415 return { |
1411 BrowserOptions: BrowserOptions | 1416 BrowserOptions: BrowserOptions |
1412 }; | 1417 }; |
1413 }); | 1418 }); |
OLD | NEW |