| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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('accessibility', function() { | 5 cr.define('accessibility', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 // Note: keep these values in sync with the values in | 8 // Note: keep these values in sync with the values in |
| 9 // content/common/accessibility_mode_enums.h | 9 // content/common/accessibility_mode_enums.h |
| 10 const AccessibilityMode = { | 10 const AccessibilityMode = { |
| 11 kOff: 0, | |
| 12 kNativeAPIs: 1 << 0, | 11 kNativeAPIs: 1 << 0, |
| 13 kWebContents: 1 << 1, | 12 kWebContents: 1 << 1, |
| 14 kInlineTextBoxes: 1 << 2, | 13 kInlineTextBoxes: 1 << 2, |
| 15 kScreenReader: 1 << 3, | 14 kScreenReader: 1 << 3, |
| 16 kHTML: 1 << 4, | 15 kHTML: 1 << 4, |
| 17 | 16 |
| 18 get kComplete() { | 17 get kAccessibilityModeWebContentsOnly() { |
| 19 return AccessibilityMode.kNativeAPIs | AccessibilityMode.kWebContents | | 18 return AccessibilityMode.kWebContents | |
| 20 AccessibilityMode.kInlineTextBoxes | AccessibilityMode.kScreenReader | | 19 AccessibilityMode.kInlineTextBoxes | AccessibilityMode.kScreenReader | |
| 21 AccessibilityMode.kHTML; | 20 AccessibilityMode.kHTML; |
| 22 }, | 21 }, |
| 23 | 22 |
| 24 get kWebContentsOnly() { | 23 get kAccessibilityModeComplete() { |
| 25 return AccessibilityMode.kWebContents | | 24 return AccessibilityMode.kNativeAPIs | AccessibilityMode.kWebContents | |
| 26 AccessibilityMode.kInlineTextBoxes | AccessibilityMode.kScreenReader | | 25 AccessibilityMode.kInlineTextBoxes | AccessibilityMode.kScreenReader | |
| 27 AccessibilityMode.kHTML; | 26 AccessibilityMode.kHTML; |
| 28 } | 27 } |
| 29 }; | 28 }; |
| 30 | 29 |
| 31 function requestData() { | 30 function requestData() { |
| 32 var xhr = new XMLHttpRequest(); | 31 var xhr = new XMLHttpRequest(); |
| 33 xhr.open('GET', 'targets-data.json', false); | 32 xhr.open('GET', 'targets-data.json', false); |
| 34 xhr.send(null); | 33 xhr.send(null); |
| 35 if (xhr.status === 200) { | 34 if (xhr.status === 200) { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 return treeElement; | 245 return treeElement; |
| 247 } | 246 } |
| 248 | 247 |
| 249 return { | 248 return { |
| 250 initialize: initialize, | 249 initialize: initialize, |
| 251 showTree: showTree | 250 showTree: showTree |
| 252 }; | 251 }; |
| 253 }); | 252 }); |
| 254 | 253 |
| 255 document.addEventListener('DOMContentLoaded', accessibility.initialize); | 254 document.addEventListener('DOMContentLoaded', accessibility.initialize); |
| OLD | NEW |