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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 }; | 457 }; |
458 } | 458 } |
459 $('cloudPrintManageButton').onclick = function(event) { | 459 $('cloudPrintManageButton').onclick = function(event) { |
460 chrome.send('showCloudPrintManagePage'); | 460 chrome.send('showCloudPrintManagePage'); |
461 }; | 461 }; |
462 | 462 |
463 // Accessibility section (CrOS only). | 463 // Accessibility section (CrOS only). |
464 if (cr.isChromeOS) { | 464 if (cr.isChromeOS) { |
465 $('accessibility-spoken-feedback-check').onchange = function(event) { | 465 $('accessibility-spoken-feedback-check').onchange = function(event) { |
466 chrome.send('spokenFeedbackChange', | 466 chrome.send('spokenFeedbackChange', |
467 [$('accessibility-spoken-feedback-check').checked]); | 467 [$('accessibility-spoken-feedback-check').checked]); |
| 468 }; |
| 469 |
| 470 $('accessibility-high-contrast-check').onchange = function(event) { |
| 471 chrome.send('highContrastChange', |
| 472 [$('accessibility-high-contrast-check').checked]); |
468 }; | 473 }; |
469 } | 474 } |
470 | 475 |
471 // Background mode section. | 476 // Background mode section. |
472 if ($('backgroundModeCheckbox')) { | 477 if ($('backgroundModeCheckbox')) { |
473 cr.defineProperty($('backgroundModeCheckbox'), | 478 cr.defineProperty($('backgroundModeCheckbox'), |
474 'controlledBy', | 479 'controlledBy', |
475 cr.PropertyKind.ATTR); | 480 cr.PropertyKind.ATTR); |
476 $('backgroundModeCheckbox').onclick = function(event) { | 481 $('backgroundModeCheckbox').onclick = function(event) { |
477 chrome.send('backgroundModeAction', | 482 chrome.send('backgroundModeAction', |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 */ | 1210 */ |
1206 setSpokenFeedbackCheckboxState_: function(checked) { | 1211 setSpokenFeedbackCheckboxState_: function(checked) { |
1207 $('accessibility-spoken-feedback-check').checked = checked; | 1212 $('accessibility-spoken-feedback-check').checked = checked; |
1208 }, | 1213 }, |
1209 | 1214 |
1210 /** | 1215 /** |
1211 * Set the initial state of the high contrast checkbox. | 1216 * Set the initial state of the high contrast checkbox. |
1212 * @private | 1217 * @private |
1213 */ | 1218 */ |
1214 setHighContrastCheckboxState_: function(checked) { | 1219 setHighContrastCheckboxState_: function(checked) { |
1215 // TODO(zork): Update UI | 1220 $('accessibility-high-contrast-check').checked = checked; |
1216 }, | 1221 }, |
1217 | 1222 |
1218 /** | 1223 /** |
1219 * Set the initial state of the screen magnifier checkbox. | 1224 * Set the initial state of the screen magnifier checkbox. |
1220 * @private | 1225 * @private |
1221 */ | 1226 */ |
1222 setScreenMagnifierCheckboxState_: function(checked) { | 1227 setScreenMagnifierCheckboxState_: function(checked) { |
1223 // TODO(zork): Update UI | 1228 // TODO(zork): Update UI |
1224 }, | 1229 }, |
1225 | 1230 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 BrowserOptions.getLoggedInUsername = function() { | 1400 BrowserOptions.getLoggedInUsername = function() { |
1396 return BrowserOptions.getInstance().username_; | 1401 return BrowserOptions.getInstance().username_; |
1397 }; | 1402 }; |
1398 } | 1403 } |
1399 | 1404 |
1400 // Export | 1405 // Export |
1401 return { | 1406 return { |
1402 BrowserOptions: BrowserOptions | 1407 BrowserOptions: BrowserOptions |
1403 }; | 1408 }; |
1404 }); | 1409 }); |
OLD | NEW |