Chromium Code Reviews| 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 22 matching lines...) Expand all Loading... | |
| 33 doDefault, | 33 doDefault, |
| 34 getImageData, | 34 getImageData, |
| 35 makeVisible, | 35 makeVisible, |
| 36 resumeMedia, | 36 resumeMedia, |
| 37 setAccessibilityFocus, | 37 setAccessibilityFocus, |
| 38 setSequentialFocusNavigationStartingPoint, | 38 setSequentialFocusNavigationStartingPoint, |
| 39 setSelection, | 39 setSelection, |
| 40 startDuckingMedia, | 40 startDuckingMedia, |
| 41 stopDuckingMedia, | 41 stopDuckingMedia, |
| 42 suspendMedia, | 42 suspendMedia, |
| 43 showContextMenu | 43 showContextMenu, |
| 44 toggleDarkenScreen | |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 // Arguments required for all actions supplied to performAction. | 47 // Arguments required for all actions supplied to performAction. |
| 47 dictionary PerformActionRequiredParams { | 48 dictionary PerformActionRequiredParams { |
| 48 long treeID; | 49 long treeID; |
| 49 long automationNodeID; | 50 long automationNodeID; |
| 50 ActionType actionType; | 51 ActionType actionType; |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 // Arguments for the setSelection action supplied to performAction. | 54 // Arguments for the setSelection action supplied to performAction. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 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 function. |
| 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 toggleDarkenScreen action supplied to performAction. | |
| 83 dictionary ToggleDarkenScreenParams { | |
| 84 // Whether to darken or undarken screen. | |
| 85 boolean darkenScreen; | |
|
dmazzoni
2017/03/22 21:40:48
Passing a bool doesn't really match "toggle". How
| |
| 86 }; | |
| 87 | |
| 81 // Returns the accessibility tree id of the web contents who's accessibility | 88 // Returns the accessibility tree id of the web contents who's accessibility |
| 82 // was enabled using enableTab(). | 89 // was enabled using enableTab(). |
| 83 callback EnableTabCallback = void(long tree_id); | 90 callback EnableTabCallback = void(long tree_id); |
| 84 | 91 |
| 85 // Callback called when enableDesktop() returns. | 92 // Callback called when enableDesktop() returns. |
| 86 callback EnableDesktopCallback = void(); | 93 callback EnableDesktopCallback = void(); |
| 87 | 94 |
| 88 // Callback called when querySelector() returns. | 95 // Callback called when querySelector() returns. |
| 89 callback QuerySelectorCallback = void(long resultAutomationNodeID); | 96 callback QuerySelectorCallback = void(long resultAutomationNodeID); |
| 90 | 97 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 long nodeID, | 129 long nodeID, |
| 123 DOMString changeType); | 130 DOMString changeType); |
| 124 | 131 |
| 125 static void onChildTreeID(long treeID, long nodeID); | 132 static void onChildTreeID(long treeID, long nodeID); |
| 126 | 133 |
| 127 static void onNodesRemoved(long treeID, long[] nodeIDs); | 134 static void onNodesRemoved(long treeID, long[] nodeIDs); |
| 128 | 135 |
| 129 static void onAccessibilityTreeSerializationError(long treeID); | 136 static void onAccessibilityTreeSerializationError(long treeID); |
| 130 }; | 137 }; |
| 131 }; | 138 }; |
| OLD | NEW |