| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This is the implementation layer of the chrome.automation API, and is | 5 // This is the implementation layer of the chrome.automation API, and is |
| 6 // essentially a translation of the internal accessibility tree update system | 6 // essentially a translation of the internal accessibility tree update system |
| 7 // into an extension API. | 7 // into an extension API. |
| 8 namespace automationInternal { | 8 namespace automationInternal { |
| 9 // Data for an accessibility event and/or an atomic change to an accessibility | 9 // Data for an accessibility event and/or an atomic change to an accessibility |
| 10 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of | 10 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // The mouse coordinates when this event fired. | 25 // The mouse coordinates when this event fired. |
| 26 double mouseX; | 26 double mouseX; |
| 27 double mouseY; | 27 double mouseY; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 // All possible actions that can be performed on automation nodes. | 30 // All possible actions that can be performed on automation nodes. |
| 31 enum ActionType { | 31 enum ActionType { |
| 32 focus, | 32 focus, |
| 33 doDefault, | 33 doDefault, |
| 34 getImageData, | 34 getImageData, |
| 35 hitTest, |
| 35 makeVisible, | 36 makeVisible, |
| 36 resumeMedia, | 37 resumeMedia, |
| 37 setAccessibilityFocus, | 38 setAccessibilityFocus, |
| 38 setSequentialFocusNavigationStartingPoint, | 39 setSequentialFocusNavigationStartingPoint, |
| 39 setSelection, | 40 setSelection, |
| 40 startDuckingMedia, | 41 startDuckingMedia, |
| 41 stopDuckingMedia, | 42 stopDuckingMedia, |
| 42 suspendMedia, | 43 suspendMedia, |
| 43 showContextMenu | 44 showContextMenu |
| 44 }; | 45 }; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 65 long automationNodeID; | 66 long automationNodeID; |
| 66 DOMString selector; | 67 DOMString selector; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 // Arguments for the enableTab function. | 70 // Arguments for the enableTab function. |
| 70 dictionary EnableTabParams { | 71 dictionary EnableTabParams { |
| 71 long routingID; | 72 long routingID; |
| 72 long? tabID; | 73 long? tabID; |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 // Arguments for the getImageData function. | 76 // Arguments for the getImageData action. |
| 76 dictionary GetImageDataParams { | 77 dictionary GetImageDataParams { |
| 77 long maxWidth; | 78 long maxWidth; |
| 78 long maxHeight; | 79 long maxHeight; |
| 79 }; | 80 }; |
| 80 | 81 |
| 82 // Arguments for the hitTest action. |
| 83 dictionary HitTestParams { |
| 84 long x; |
| 85 long y; |
| 86 DOMString eventToFire; |
| 87 }; |
| 88 |
| 81 // Returns the accessibility tree id of the web contents who's accessibility | 89 // Returns the accessibility tree id of the web contents who's accessibility |
| 82 // was enabled using enableTab(). | 90 // was enabled using enableTab(). |
| 83 callback EnableTabCallback = void(long tree_id); | 91 callback EnableTabCallback = void(long tree_id); |
| 84 | 92 |
| 85 // Callback called when enableDesktop() returns. | 93 // Callback called when enableDesktop() returns. |
| 86 callback EnableDesktopCallback = void(); | 94 callback EnableDesktopCallback = void(); |
| 87 | 95 |
| 88 // Callback called when querySelector() returns. | 96 // Callback called when querySelector() returns. |
| 89 callback QuerySelectorCallback = void(long resultAutomationNodeID); | 97 callback QuerySelectorCallback = void(long resultAutomationNodeID); |
| 90 | 98 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 long nodeID, | 130 long nodeID, |
| 123 DOMString changeType); | 131 DOMString changeType); |
| 124 | 132 |
| 125 static void onChildTreeID(long treeID, long nodeID); | 133 static void onChildTreeID(long treeID, long nodeID); |
| 126 | 134 |
| 127 static void onNodesRemoved(long treeID, long[] nodeIDs); | 135 static void onNodesRemoved(long treeID, long[] nodeIDs); |
| 128 | 136 |
| 129 static void onAccessibilityTreeSerializationError(long treeID); | 137 static void onAccessibilityTreeSerializationError(long treeID); |
| 130 }; | 138 }; |
| 131 }; | 139 }; |
| OLD | NEW |