ax_enum_util.cc 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ui/accessibility/ax_enum_util.h"
  5. #include "ui/accessibility/ax_enums.mojom.h"
  6. namespace ui {
  7. const char* ToString(ax::mojom::Event event) {
  8. switch (event) {
  9. case ax::mojom::Event::kNone:
  10. return "none";
  11. case ax::mojom::Event::kActiveDescendantChanged:
  12. return "activedescendantchanged";
  13. case ax::mojom::Event::kAlert:
  14. return "alert";
  15. case ax::mojom::Event::kAriaAttributeChanged:
  16. return "ariaAttributeChanged";
  17. case ax::mojom::Event::kAutocorrectionOccured:
  18. return "autocorrectionOccured";
  19. case ax::mojom::Event::kBlur:
  20. return "blur";
  21. case ax::mojom::Event::kCheckedStateChanged:
  22. return "checkedStateChanged";
  23. case ax::mojom::Event::kChildrenChanged:
  24. return "childrenChanged";
  25. case ax::mojom::Event::kClicked:
  26. return "clicked";
  27. case ax::mojom::Event::kControlsChanged:
  28. return "controlsChanged";
  29. case ax::mojom::Event::kDocumentSelectionChanged:
  30. return "documentSelectionChanged";
  31. case ax::mojom::Event::kDocumentTitleChanged:
  32. return "documentTitleChanged";
  33. case ax::mojom::Event::kEndOfTest:
  34. return "endOfTest";
  35. case ax::mojom::Event::kExpandedChanged:
  36. return "expandedChanged";
  37. case ax::mojom::Event::kFocus:
  38. return "focus";
  39. case ax::mojom::Event::kFocusAfterMenuClose:
  40. return "focusAfterMenuClose";
  41. case ax::mojom::Event::kFocusContext:
  42. return "focusContext";
  43. case ax::mojom::Event::kHide:
  44. return "hide";
  45. case ax::mojom::Event::kHitTestResult:
  46. return "hitTestResult";
  47. case ax::mojom::Event::kHover:
  48. return "hover";
  49. case ax::mojom::Event::kImageFrameUpdated:
  50. return "imageFrameUpdated";
  51. case ax::mojom::Event::kLayoutComplete:
  52. return "layoutComplete";
  53. case ax::mojom::Event::kLiveRegionCreated:
  54. return "liveRegionCreated";
  55. case ax::mojom::Event::kLiveRegionChanged:
  56. return "liveRegionChanged";
  57. case ax::mojom::Event::kLoadComplete:
  58. return "loadComplete";
  59. case ax::mojom::Event::kLoadStart:
  60. return "loadStart";
  61. case ax::mojom::Event::kLocationChanged:
  62. return "locationChanged";
  63. case ax::mojom::Event::kMediaStartedPlaying:
  64. return "mediaStartedPlaying";
  65. case ax::mojom::Event::kMediaStoppedPlaying:
  66. return "mediaStoppedPlaying";
  67. case ax::mojom::Event::kMenuEnd:
  68. return "menuEnd";
  69. case ax::mojom::Event::kMenuListValueChanged:
  70. return "menuListValueChanged";
  71. case ax::mojom::Event::kMenuPopupEnd:
  72. return "menuPopupEnd";
  73. case ax::mojom::Event::kMenuPopupStart:
  74. return "menuPopupStart";
  75. case ax::mojom::Event::kMenuStart:
  76. return "menuStart";
  77. case ax::mojom::Event::kMouseCanceled:
  78. return "mouseCanceled";
  79. case ax::mojom::Event::kMouseDragged:
  80. return "mouseDragged";
  81. case ax::mojom::Event::kMouseMoved:
  82. return "mouseMoved";
  83. case ax::mojom::Event::kMousePressed:
  84. return "mousePressed";
  85. case ax::mojom::Event::kMouseReleased:
  86. return "mouseReleased";
  87. case ax::mojom::Event::kRowCollapsed:
  88. return "rowCollapsed";
  89. case ax::mojom::Event::kRowCountChanged:
  90. return "rowCountChanged";
  91. case ax::mojom::Event::kRowExpanded:
  92. return "rowExpanded";
  93. case ax::mojom::Event::kScrollPositionChanged:
  94. return "scrollPositionChanged";
  95. case ax::mojom::Event::kScrolledToAnchor:
  96. return "scrolledToAnchor";
  97. case ax::mojom::Event::kSelectedChildrenChanged:
  98. return "selectedChildrenChanged";
  99. case ax::mojom::Event::kSelection:
  100. return "selection";
  101. case ax::mojom::Event::kSelectionAdd:
  102. return "selectionAdd";
  103. case ax::mojom::Event::kSelectionRemove:
  104. return "selectionRemove";
  105. case ax::mojom::Event::kShow:
  106. return "show";
  107. case ax::mojom::Event::kStateChanged:
  108. return "stateChanged";
  109. case ax::mojom::Event::kTextChanged:
  110. return "textChanged";
  111. case ax::mojom::Event::kTextSelectionChanged:
  112. return "textSelectionChanged";
  113. case ax::mojom::Event::kTooltipClosed:
  114. return "tooltipClosed";
  115. case ax::mojom::Event::kTooltipOpened:
  116. return "tooltipOpened";
  117. case ax::mojom::Event::kTreeChanged:
  118. return "treeChanged";
  119. case ax::mojom::Event::kValueChanged:
  120. return "valueChanged";
  121. case ax::mojom::Event::kWindowActivated:
  122. return "windowActivated";
  123. case ax::mojom::Event::kWindowDeactivated:
  124. return "windowDeactivated";
  125. case ax::mojom::Event::kWindowVisibilityChanged:
  126. return "windowVisibilityChanged";
  127. }
  128. return "";
  129. }
  130. const char* ToString(ax::mojom::Role role) {
  131. switch (role) {
  132. case ax::mojom::Role::kNone:
  133. return "none";
  134. case ax::mojom::Role::kAbbr:
  135. return "abbr";
  136. case ax::mojom::Role::kAlertDialog:
  137. return "alertDialog";
  138. case ax::mojom::Role::kAlert:
  139. return "alert";
  140. case ax::mojom::Role::kApplication:
  141. return "application";
  142. case ax::mojom::Role::kArticle:
  143. return "article";
  144. case ax::mojom::Role::kAudio:
  145. return "audio";
  146. case ax::mojom::Role::kBanner:
  147. return "banner";
  148. case ax::mojom::Role::kBlockquote:
  149. return "blockquote";
  150. case ax::mojom::Role::kButton:
  151. return "button";
  152. case ax::mojom::Role::kCanvas:
  153. return "canvas";
  154. case ax::mojom::Role::kCaption:
  155. return "caption";
  156. case ax::mojom::Role::kCaret:
  157. return "caret";
  158. case ax::mojom::Role::kCell:
  159. return "cell";
  160. case ax::mojom::Role::kCheckBox:
  161. return "checkBox";
  162. case ax::mojom::Role::kClient:
  163. return "client";
  164. case ax::mojom::Role::kCode:
  165. return "code";
  166. case ax::mojom::Role::kColorWell:
  167. return "colorWell";
  168. case ax::mojom::Role::kColumnHeader:
  169. return "columnHeader";
  170. case ax::mojom::Role::kColumn:
  171. return "column";
  172. case ax::mojom::Role::kComboBoxGrouping:
  173. return "comboBoxGrouping";
  174. case ax::mojom::Role::kComboBoxMenuButton:
  175. return "comboBoxMenuButton";
  176. case ax::mojom::Role::kComment:
  177. return "comment";
  178. case ax::mojom::Role::kComplementary:
  179. return "complementary";
  180. case ax::mojom::Role::kContentDeletion:
  181. return "contentDeletion";
  182. case ax::mojom::Role::kContentInsertion:
  183. return "contentInsertion";
  184. case ax::mojom::Role::kContentInfo:
  185. return "contentInfo";
  186. case ax::mojom::Role::kDate:
  187. return "date";
  188. case ax::mojom::Role::kDateTime:
  189. return "dateTime";
  190. case ax::mojom::Role::kDefinition:
  191. return "definition";
  192. case ax::mojom::Role::kDescriptionListDetail:
  193. return "descriptionListDetail";
  194. case ax::mojom::Role::kDescriptionList:
  195. return "descriptionList";
  196. case ax::mojom::Role::kDescriptionListTerm:
  197. return "descriptionListTerm";
  198. case ax::mojom::Role::kDesktop:
  199. return "desktop";
  200. case ax::mojom::Role::kDetails:
  201. return "details";
  202. case ax::mojom::Role::kDialog:
  203. return "dialog";
  204. case ax::mojom::Role::kDirectory:
  205. return "directory";
  206. case ax::mojom::Role::kDisclosureTriangle:
  207. return "disclosureTriangle";
  208. case ax::mojom::Role::kDocAbstract:
  209. return "docAbstract";
  210. case ax::mojom::Role::kDocAcknowledgments:
  211. return "docAcknowledgments";
  212. case ax::mojom::Role::kDocAfterword:
  213. return "docAfterword";
  214. case ax::mojom::Role::kDocAppendix:
  215. return "docAppendix";
  216. case ax::mojom::Role::kDocBackLink:
  217. return "docBackLink";
  218. case ax::mojom::Role::kDocBiblioEntry:
  219. return "docBiblioEntry";
  220. case ax::mojom::Role::kDocBibliography:
  221. return "docBibliography";
  222. case ax::mojom::Role::kDocBiblioRef:
  223. return "docBiblioRef";
  224. case ax::mojom::Role::kDocChapter:
  225. return "docChapter";
  226. case ax::mojom::Role::kDocColophon:
  227. return "docColophon";
  228. case ax::mojom::Role::kDocConclusion:
  229. return "docConclusion";
  230. case ax::mojom::Role::kDocCover:
  231. return "docCover";
  232. case ax::mojom::Role::kDocCredit:
  233. return "docCredit";
  234. case ax::mojom::Role::kDocCredits:
  235. return "docCredits";
  236. case ax::mojom::Role::kDocDedication:
  237. return "docDedication";
  238. case ax::mojom::Role::kDocEndnote:
  239. return "docEndnote";
  240. case ax::mojom::Role::kDocEndnotes:
  241. return "docEndnotes";
  242. case ax::mojom::Role::kDocEpigraph:
  243. return "docEpigraph";
  244. case ax::mojom::Role::kDocEpilogue:
  245. return "docEpilogue";
  246. case ax::mojom::Role::kDocErrata:
  247. return "docErrata";
  248. case ax::mojom::Role::kDocExample:
  249. return "docExample";
  250. case ax::mojom::Role::kDocFootnote:
  251. return "docFootnote";
  252. case ax::mojom::Role::kDocForeword:
  253. return "docForeword";
  254. case ax::mojom::Role::kDocGlossary:
  255. return "docGlossary";
  256. case ax::mojom::Role::kDocGlossRef:
  257. return "docGlossref";
  258. case ax::mojom::Role::kDocIndex:
  259. return "docIndex";
  260. case ax::mojom::Role::kDocIntroduction:
  261. return "docIntroduction";
  262. case ax::mojom::Role::kDocNoteRef:
  263. return "docNoteRef";
  264. case ax::mojom::Role::kDocNotice:
  265. return "docNotice";
  266. case ax::mojom::Role::kDocPageBreak:
  267. return "docPageBreak";
  268. case ax::mojom::Role::kDocPageFooter:
  269. return "docPageFooter";
  270. case ax::mojom::Role::kDocPageHeader:
  271. return "docPageHeader";
  272. case ax::mojom::Role::kDocPageList:
  273. return "docPageList";
  274. case ax::mojom::Role::kDocPart:
  275. return "docPart";
  276. case ax::mojom::Role::kDocPreface:
  277. return "docPreface";
  278. case ax::mojom::Role::kDocPrologue:
  279. return "docPrologue";
  280. case ax::mojom::Role::kDocPullquote:
  281. return "docPullquote";
  282. case ax::mojom::Role::kDocQna:
  283. return "docQna";
  284. case ax::mojom::Role::kDocSubtitle:
  285. return "docSubtitle";
  286. case ax::mojom::Role::kDocTip:
  287. return "docTip";
  288. case ax::mojom::Role::kDocToc:
  289. return "docToc";
  290. case ax::mojom::Role::kDocument:
  291. return "document";
  292. case ax::mojom::Role::kEmbeddedObject:
  293. return "embeddedObject";
  294. case ax::mojom::Role::kEmphasis:
  295. return "emphasis";
  296. case ax::mojom::Role::kFeed:
  297. return "feed";
  298. case ax::mojom::Role::kFigcaption:
  299. return "figcaption";
  300. case ax::mojom::Role::kFigure:
  301. return "figure";
  302. case ax::mojom::Role::kFooter:
  303. return "footer";
  304. case ax::mojom::Role::kFooterAsNonLandmark:
  305. return "footerAsNonLandmark";
  306. case ax::mojom::Role::kForm:
  307. return "form";
  308. case ax::mojom::Role::kGenericContainer:
  309. return "genericContainer";
  310. case ax::mojom::Role::kGraphicsDocument:
  311. return "graphicsDocument";
  312. case ax::mojom::Role::kGraphicsObject:
  313. return "graphicsObject";
  314. case ax::mojom::Role::kGraphicsSymbol:
  315. return "graphicsSymbol";
  316. case ax::mojom::Role::kGrid:
  317. return "grid";
  318. case ax::mojom::Role::kGroup:
  319. return "group";
  320. case ax::mojom::Role::kHeader:
  321. return "header";
  322. case ax::mojom::Role::kHeaderAsNonLandmark:
  323. return "headerAsNonLandmark";
  324. case ax::mojom::Role::kHeading:
  325. return "heading";
  326. case ax::mojom::Role::kIframe:
  327. return "iframe";
  328. case ax::mojom::Role::kIframePresentational:
  329. return "iframePresentational";
  330. case ax::mojom::Role::kImage:
  331. return "image";
  332. case ax::mojom::Role::kImeCandidate:
  333. return "imeCandidate";
  334. case ax::mojom::Role::kInlineTextBox:
  335. return "inlineTextBox";
  336. case ax::mojom::Role::kInputTime:
  337. return "inputTime";
  338. case ax::mojom::Role::kKeyboard:
  339. return "keyboard";
  340. case ax::mojom::Role::kLabelText:
  341. return "labelText";
  342. case ax::mojom::Role::kLayoutTable:
  343. return "layoutTable";
  344. case ax::mojom::Role::kLayoutTableCell:
  345. return "layoutTableCell";
  346. case ax::mojom::Role::kLayoutTableRow:
  347. return "layoutTableRow";
  348. case ax::mojom::Role::kLegend:
  349. return "legend";
  350. case ax::mojom::Role::kLineBreak:
  351. return "lineBreak";
  352. case ax::mojom::Role::kLink:
  353. return "link";
  354. case ax::mojom::Role::kList:
  355. return "list";
  356. case ax::mojom::Role::kListBoxOption:
  357. return "listBoxOption";
  358. case ax::mojom::Role::kListBox:
  359. return "listBox";
  360. case ax::mojom::Role::kListGrid:
  361. return "listGrid";
  362. case ax::mojom::Role::kListItem:
  363. return "listItem";
  364. case ax::mojom::Role::kListMarker:
  365. return "listMarker";
  366. case ax::mojom::Role::kLog:
  367. return "log";
  368. case ax::mojom::Role::kMain:
  369. return "main";
  370. case ax::mojom::Role::kMark:
  371. return "mark";
  372. case ax::mojom::Role::kMarquee:
  373. return "marquee";
  374. case ax::mojom::Role::kMath:
  375. return "math";
  376. case ax::mojom::Role::kMathMLFraction:
  377. return "mathMLFraction";
  378. case ax::mojom::Role::kMathMLIdentifier:
  379. return "mathMLIdentifier";
  380. case ax::mojom::Role::kMathMLMath:
  381. return "mathMLMath";
  382. case ax::mojom::Role::kMathMLMultiscripts:
  383. return "mathMLMultiscripts";
  384. case ax::mojom::Role::kMathMLNoneScript:
  385. return "mathMLNoneScript";
  386. case ax::mojom::Role::kMathMLNumber:
  387. return "mathMLNumber";
  388. case ax::mojom::Role::kMathMLOperator:
  389. return "mathMLOperator";
  390. case ax::mojom::Role::kMathMLOver:
  391. return "mathMLOver";
  392. case ax::mojom::Role::kMathMLPrescriptDelimiter:
  393. return "mathMLPrescriptDelimiter";
  394. case ax::mojom::Role::kMathMLRoot:
  395. return "mathMLRoot";
  396. case ax::mojom::Role::kMathMLRow:
  397. return "mathMLRow";
  398. case ax::mojom::Role::kMathMLSquareRoot:
  399. return "mathMLSquareRoot";
  400. case ax::mojom::Role::kMathMLStringLiteral:
  401. return "mathMLStringLiteral";
  402. case ax::mojom::Role::kMathMLSub:
  403. return "mathMLSub";
  404. case ax::mojom::Role::kMathMLSubSup:
  405. return "mathMLSubSup";
  406. case ax::mojom::Role::kMathMLSup:
  407. return "mathMLSup";
  408. case ax::mojom::Role::kMathMLTable:
  409. return "mathMLTable";
  410. case ax::mojom::Role::kMathMLTableCell:
  411. return "mathMLTableCell";
  412. case ax::mojom::Role::kMathMLTableRow:
  413. return "mathMLTableRow";
  414. case ax::mojom::Role::kMathMLText:
  415. return "mathMLText";
  416. case ax::mojom::Role::kMathMLUnder:
  417. return "mathMLUnder";
  418. case ax::mojom::Role::kMathMLUnderOver:
  419. return "mathMLUnderOver";
  420. case ax::mojom::Role::kMenu:
  421. return "menu";
  422. case ax::mojom::Role::kMenuBar:
  423. return "menuBar";
  424. case ax::mojom::Role::kMenuItem:
  425. return "menuItem";
  426. case ax::mojom::Role::kMenuItemCheckBox:
  427. return "menuItemCheckBox";
  428. case ax::mojom::Role::kMenuItemRadio:
  429. return "menuItemRadio";
  430. case ax::mojom::Role::kMenuListOption:
  431. return "menuListOption";
  432. case ax::mojom::Role::kMenuListPopup:
  433. return "menuListPopup";
  434. case ax::mojom::Role::kMeter:
  435. return "meter";
  436. case ax::mojom::Role::kNavigation:
  437. return "navigation";
  438. case ax::mojom::Role::kNote:
  439. return "note";
  440. case ax::mojom::Role::kPane:
  441. return "pane";
  442. case ax::mojom::Role::kParagraph:
  443. return "paragraph";
  444. case ax::mojom::Role::kPdfActionableHighlight:
  445. return "pdfActionableHighlight";
  446. case ax::mojom::Role::kPdfRoot:
  447. return "pdfRoot";
  448. case ax::mojom::Role::kPluginObject:
  449. return "pluginObject";
  450. case ax::mojom::Role::kPopUpButton:
  451. return "popUpButton";
  452. case ax::mojom::Role::kPortal:
  453. return "portal";
  454. case ax::mojom::Role::kPre:
  455. return "pre";
  456. case ax::mojom::Role::kProgressIndicator:
  457. return "progressIndicator";
  458. case ax::mojom::Role::kRadioButton:
  459. return "radioButton";
  460. case ax::mojom::Role::kRadioGroup:
  461. return "radioGroup";
  462. case ax::mojom::Role::kRegion:
  463. return "region";
  464. case ax::mojom::Role::kRootWebArea:
  465. return "rootWebArea";
  466. case ax::mojom::Role::kRow:
  467. return "row";
  468. case ax::mojom::Role::kRowGroup:
  469. return "rowGroup";
  470. case ax::mojom::Role::kRowHeader:
  471. return "rowHeader";
  472. case ax::mojom::Role::kRuby:
  473. return "ruby";
  474. case ax::mojom::Role::kRubyAnnotation:
  475. return "rubyAnnotation";
  476. case ax::mojom::Role::kSection:
  477. return "section";
  478. case ax::mojom::Role::kStrong:
  479. return "strong";
  480. case ax::mojom::Role::kSubscript:
  481. return "subscript";
  482. case ax::mojom::Role::kSuggestion:
  483. return "suggestion";
  484. case ax::mojom::Role::kSuperscript:
  485. return "superscript";
  486. case ax::mojom::Role::kSvgRoot:
  487. return "svgRoot";
  488. case ax::mojom::Role::kScrollBar:
  489. return "scrollBar";
  490. case ax::mojom::Role::kScrollView:
  491. return "scrollView";
  492. case ax::mojom::Role::kSearch:
  493. return "search";
  494. case ax::mojom::Role::kSearchBox:
  495. return "searchBox";
  496. case ax::mojom::Role::kSlider:
  497. return "slider";
  498. case ax::mojom::Role::kSpinButton:
  499. return "spinButton";
  500. case ax::mojom::Role::kSplitter:
  501. return "splitter";
  502. case ax::mojom::Role::kStaticText:
  503. return "staticText";
  504. case ax::mojom::Role::kStatus:
  505. return "status";
  506. case ax::mojom::Role::kSwitch:
  507. return "switch";
  508. case ax::mojom::Role::kTabList:
  509. return "tabList";
  510. case ax::mojom::Role::kTabPanel:
  511. return "tabPanel";
  512. case ax::mojom::Role::kTab:
  513. return "tab";
  514. case ax::mojom::Role::kTable:
  515. return "table";
  516. case ax::mojom::Role::kTableHeaderContainer:
  517. return "tableHeaderContainer";
  518. case ax::mojom::Role::kTerm:
  519. return "term";
  520. case ax::mojom::Role::kTextField:
  521. return "textField";
  522. case ax::mojom::Role::kTextFieldWithComboBox:
  523. return "textFieldWithComboBox";
  524. case ax::mojom::Role::kTime:
  525. return "time";
  526. case ax::mojom::Role::kTimer:
  527. return "timer";
  528. case ax::mojom::Role::kTitleBar:
  529. return "titleBar";
  530. case ax::mojom::Role::kToggleButton:
  531. return "toggleButton";
  532. case ax::mojom::Role::kToolbar:
  533. return "toolbar";
  534. case ax::mojom::Role::kTreeGrid:
  535. return "treeGrid";
  536. case ax::mojom::Role::kTreeItem:
  537. return "treeItem";
  538. case ax::mojom::Role::kTree:
  539. return "tree";
  540. case ax::mojom::Role::kUnknown:
  541. return "unknown";
  542. case ax::mojom::Role::kTooltip:
  543. return "tooltip";
  544. case ax::mojom::Role::kVideo:
  545. return "video";
  546. case ax::mojom::Role::kWebView:
  547. return "webView";
  548. case ax::mojom::Role::kWindow:
  549. return "window";
  550. }
  551. return "";
  552. }
  553. const char* ToString(ax::mojom::State state) {
  554. switch (state) {
  555. case ax::mojom::State::kNone:
  556. return "none";
  557. case ax::mojom::State::kAutofillAvailable:
  558. return "autofillAvailable";
  559. case ax::mojom::State::kCollapsed:
  560. return "collapsed";
  561. case ax::mojom::State::kDefault:
  562. return "default";
  563. case ax::mojom::State::kEditable:
  564. return "editable";
  565. case ax::mojom::State::kExpanded:
  566. return "expanded";
  567. case ax::mojom::State::kFocusable:
  568. return "focusable";
  569. case ax::mojom::State::kHorizontal:
  570. return "horizontal";
  571. case ax::mojom::State::kHovered:
  572. return "hovered";
  573. case ax::mojom::State::kIgnored:
  574. return "ignored";
  575. case ax::mojom::State::kInvisible:
  576. return "invisible";
  577. case ax::mojom::State::kLinked:
  578. return "linked";
  579. case ax::mojom::State::kMultiline:
  580. return "multiline";
  581. case ax::mojom::State::kMultiselectable:
  582. return "multiselectable";
  583. case ax::mojom::State::kProtected:
  584. return "protected";
  585. case ax::mojom::State::kRequired:
  586. return "required";
  587. case ax::mojom::State::kRichlyEditable:
  588. return "richlyEditable";
  589. case ax::mojom::State::kVertical:
  590. return "vertical";
  591. case ax::mojom::State::kVisited:
  592. return "visited";
  593. }
  594. return "";
  595. }
  596. const char* ToString(ax::mojom::Action action) {
  597. switch (action) {
  598. case ax::mojom::Action::kNone:
  599. return "none";
  600. case ax::mojom::Action::kBlur:
  601. return "blur";
  602. case ax::mojom::Action::kClearAccessibilityFocus:
  603. return "clearAccessibilityFocus";
  604. case ax::mojom::Action::kCollapse:
  605. return "collapse";
  606. case ax::mojom::Action::kCustomAction:
  607. return "customAction";
  608. case ax::mojom::Action::kDecrement:
  609. return "decrement";
  610. case ax::mojom::Action::kDoDefault:
  611. return "doDefault";
  612. case ax::mojom::Action::kExpand:
  613. return "expand";
  614. case ax::mojom::Action::kFocus:
  615. return "focus";
  616. case ax::mojom::Action::kGetImageData:
  617. return "getImageData";
  618. case ax::mojom::Action::kHitTest:
  619. return "hitTest";
  620. case ax::mojom::Action::kIncrement:
  621. return "increment";
  622. case ax::mojom::Action::kLoadInlineTextBoxes:
  623. return "loadInlineTextBoxes";
  624. case ax::mojom::Action::kReplaceSelectedText:
  625. return "replaceSelectedText";
  626. case ax::mojom::Action::kResumeMedia:
  627. return "resumeMedia";
  628. case ax::mojom::Action::kScrollBackward:
  629. return "scrollBackward";
  630. case ax::mojom::Action::kScrollForward:
  631. return "scrollForward";
  632. case ax::mojom::Action::kScrollUp:
  633. return "scrollUp";
  634. case ax::mojom::Action::kScrollDown:
  635. return "scrollDown";
  636. case ax::mojom::Action::kScrollLeft:
  637. return "scrollLeft";
  638. case ax::mojom::Action::kScrollRight:
  639. return "scrollRight";
  640. case ax::mojom::Action::kScrollToMakeVisible:
  641. return "scrollToMakeVisible";
  642. case ax::mojom::Action::kScrollToPoint:
  643. return "scrollToPoint";
  644. case ax::mojom::Action::kSetAccessibilityFocus:
  645. return "setAccessibilityFocus";
  646. case ax::mojom::Action::kSetScrollOffset:
  647. return "setScrollOffset";
  648. case ax::mojom::Action::kSetSelection:
  649. return "setSelection";
  650. case ax::mojom::Action::kSetSequentialFocusNavigationStartingPoint:
  651. return "setSequentialFocusNavigationStartingPoint";
  652. case ax::mojom::Action::kSetValue:
  653. return "setValue";
  654. case ax::mojom::Action::kShowContextMenu:
  655. return "showContextMenu";
  656. case ax::mojom::Action::kGetTextLocation:
  657. return "getTextLocation";
  658. case ax::mojom::Action::kAnnotatePageImages:
  659. return "annotatePageImages";
  660. case ax::mojom::Action::kSignalEndOfTest:
  661. return "signalEndOfTest";
  662. case ax::mojom::Action::kShowTooltip:
  663. return "showTooltip";
  664. case ax::mojom::Action::kHideTooltip:
  665. return "hideTooltip";
  666. case ax::mojom::Action::kInternalInvalidateTree:
  667. return "internalInvalidateTree";
  668. case ax::mojom::Action::kStartDuckingMedia:
  669. return "startDuckingMedia";
  670. case ax::mojom::Action::kStopDuckingMedia:
  671. return "stopDuckingMedia";
  672. case ax::mojom::Action::kSuspendMedia:
  673. return "suspendMedia";
  674. }
  675. return "";
  676. }
  677. const char* ToString(ax::mojom::ActionFlags action_flags) {
  678. switch (action_flags) {
  679. case ax::mojom::ActionFlags::kNone:
  680. return "none";
  681. case ax::mojom::ActionFlags::kRequestImages:
  682. return "requestImages";
  683. case ax::mojom::ActionFlags::kRequestInlineTextBoxes:
  684. return "requestInlineTextBoxes";
  685. }
  686. return "";
  687. }
  688. const char* ToString(ax::mojom::ScrollAlignment scroll_alignment) {
  689. switch (scroll_alignment) {
  690. case ax::mojom::ScrollAlignment::kNone:
  691. return "none";
  692. case ax::mojom::ScrollAlignment::kScrollAlignmentCenter:
  693. return "scrollAlignmentCenter";
  694. case ax::mojom::ScrollAlignment::kScrollAlignmentTop:
  695. return "scrollAlignmentTop";
  696. case ax::mojom::ScrollAlignment::kScrollAlignmentBottom:
  697. return "scrollAlignmentBottom";
  698. case ax::mojom::ScrollAlignment::kScrollAlignmentLeft:
  699. return "scrollAlignmentLeft";
  700. case ax::mojom::ScrollAlignment::kScrollAlignmentRight:
  701. return "scrollAlignmentRight";
  702. case ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge:
  703. return "scrollAlignmentClosestEdge";
  704. }
  705. }
  706. const char* ToString(ax::mojom::DefaultActionVerb default_action_verb) {
  707. switch (default_action_verb) {
  708. case ax::mojom::DefaultActionVerb::kNone:
  709. return "none";
  710. case ax::mojom::DefaultActionVerb::kActivate:
  711. return "activate";
  712. case ax::mojom::DefaultActionVerb::kCheck:
  713. return "check";
  714. case ax::mojom::DefaultActionVerb::kClick:
  715. return "click";
  716. case ax::mojom::DefaultActionVerb::kClickAncestor:
  717. // Some screen readers, such as Jaws, expect the following spelling of
  718. // this verb.
  719. return "clickAncestor";
  720. case ax::mojom::DefaultActionVerb::kJump:
  721. return "jump";
  722. case ax::mojom::DefaultActionVerb::kOpen:
  723. return "open";
  724. case ax::mojom::DefaultActionVerb::kPress:
  725. return "press";
  726. case ax::mojom::DefaultActionVerb::kSelect:
  727. return "select";
  728. case ax::mojom::DefaultActionVerb::kUncheck:
  729. return "uncheck";
  730. }
  731. return "";
  732. }
  733. const char* ToString(ax::mojom::Mutation mutation) {
  734. switch (mutation) {
  735. case ax::mojom::Mutation::kNone:
  736. return "none";
  737. case ax::mojom::Mutation::kNodeCreated:
  738. return "nodeCreated";
  739. case ax::mojom::Mutation::kSubtreeCreated:
  740. return "subtreeCreated";
  741. case ax::mojom::Mutation::kNodeChanged:
  742. return "nodeChanged";
  743. case ax::mojom::Mutation::kNodeRemoved:
  744. return "nodeRemoved";
  745. }
  746. return "";
  747. }
  748. const char* ToString(ax::mojom::StringAttribute string_attribute) {
  749. switch (string_attribute) {
  750. case ax::mojom::StringAttribute::kNone:
  751. return "none";
  752. case ax::mojom::StringAttribute::kAccessKey:
  753. return "accessKey";
  754. case ax::mojom::StringAttribute::kAriaInvalidValue:
  755. return "ariaInvalidValue";
  756. case ax::mojom::StringAttribute::kAutoComplete:
  757. return "autoComplete";
  758. case ax::mojom::StringAttribute::kCheckedStateDescription:
  759. return "checkedStateDescription";
  760. case ax::mojom::StringAttribute::kChildTreeId:
  761. return "childTreeId";
  762. case ax::mojom::StringAttribute::kChildTreeNodeAppId:
  763. return "childTreeNodeAppId";
  764. case ax::mojom::StringAttribute::kClassName:
  765. return "className";
  766. case ax::mojom::StringAttribute::kContainerLiveRelevant:
  767. return "containerLiveRelevant";
  768. case ax::mojom::StringAttribute::kContainerLiveStatus:
  769. return "containerLiveStatus";
  770. case ax::mojom::StringAttribute::kDescription:
  771. return "description";
  772. case ax::mojom::StringAttribute::kDisplay:
  773. return "display";
  774. case ax::mojom::StringAttribute::kFontFamily:
  775. return "fontFamily";
  776. case ax::mojom::StringAttribute::kHtmlTag:
  777. return "htmlTag";
  778. case ax::mojom::StringAttribute::kImageAnnotation:
  779. return "imageAnnotation";
  780. case ax::mojom::StringAttribute::kImageDataUrl:
  781. return "imageDataUrl";
  782. case ax::mojom::StringAttribute::kInnerHtml:
  783. return "innerHtml";
  784. case ax::mojom::StringAttribute::kInputType:
  785. return "inputType";
  786. case ax::mojom::StringAttribute::kKeyShortcuts:
  787. return "keyShortcuts";
  788. case ax::mojom::StringAttribute::kLanguage:
  789. return "language";
  790. case ax::mojom::StringAttribute::kName:
  791. return "name";
  792. case ax::mojom::StringAttribute::kLiveRelevant:
  793. return "liveRelevant";
  794. case ax::mojom::StringAttribute::kLiveStatus:
  795. return "liveStatus";
  796. case ax::mojom::StringAttribute::kAppId:
  797. return "appId";
  798. case ax::mojom::StringAttribute::kPlaceholder:
  799. return "placeholder";
  800. case ax::mojom::StringAttribute::kRole:
  801. return "role";
  802. case ax::mojom::StringAttribute::kRoleDescription:
  803. return "roleDescription";
  804. case ax::mojom::StringAttribute::kTooltip:
  805. return "tooltip";
  806. case ax::mojom::StringAttribute::kUrl:
  807. return "url";
  808. case ax::mojom::StringAttribute::kValue:
  809. return "value";
  810. case ax::mojom::StringAttribute::kVirtualContent:
  811. return "virtualContent";
  812. }
  813. return "";
  814. }
  815. const char* ToString(ax::mojom::IntAttribute int_attribute) {
  816. switch (int_attribute) {
  817. case ax::mojom::IntAttribute::kNone:
  818. return "none";
  819. case ax::mojom::IntAttribute::kDefaultActionVerb:
  820. return "defaultActionVerb";
  821. case ax::mojom::IntAttribute::kDropeffect:
  822. return "dropeffect";
  823. case ax::mojom::IntAttribute::kScrollX:
  824. return "scrollX";
  825. case ax::mojom::IntAttribute::kScrollXMin:
  826. return "scrollXMin";
  827. case ax::mojom::IntAttribute::kScrollXMax:
  828. return "scrollXMax";
  829. case ax::mojom::IntAttribute::kScrollY:
  830. return "scrollY";
  831. case ax::mojom::IntAttribute::kScrollYMin:
  832. return "scrollYMin";
  833. case ax::mojom::IntAttribute::kScrollYMax:
  834. return "scrollYMax";
  835. case ax::mojom::IntAttribute::kTextSelStart:
  836. return "textSelStart";
  837. case ax::mojom::IntAttribute::kTextSelEnd:
  838. return "textSelEnd";
  839. case ax::mojom::IntAttribute::kAriaColumnCount:
  840. return "ariaColumnCount";
  841. case ax::mojom::IntAttribute::kAriaCellColumnIndex:
  842. return "ariaCellColumnIndex";
  843. case ax::mojom::IntAttribute::kAriaCellColumnSpan:
  844. return "ariaCellColumnSpan";
  845. case ax::mojom::IntAttribute::kAriaRowCount:
  846. return "ariaRowCount";
  847. case ax::mojom::IntAttribute::kAriaCellRowIndex:
  848. return "ariaCellRowIndex";
  849. case ax::mojom::IntAttribute::kAriaCellRowSpan:
  850. return "ariaCellRowSpan";
  851. case ax::mojom::IntAttribute::kTableRowCount:
  852. return "tableRowCount";
  853. case ax::mojom::IntAttribute::kTableColumnCount:
  854. return "tableColumnCount";
  855. case ax::mojom::IntAttribute::kTableHeaderId:
  856. return "tableHeaderId";
  857. case ax::mojom::IntAttribute::kTableRowIndex:
  858. return "tableRowIndex";
  859. case ax::mojom::IntAttribute::kTableRowHeaderId:
  860. return "tableRowHeaderId";
  861. case ax::mojom::IntAttribute::kTableColumnIndex:
  862. return "tableColumnIndex";
  863. case ax::mojom::IntAttribute::kTableColumnHeaderId:
  864. return "tableColumnHeaderId";
  865. case ax::mojom::IntAttribute::kTableCellColumnIndex:
  866. return "tableCellColumnIndex";
  867. case ax::mojom::IntAttribute::kTableCellColumnSpan:
  868. return "tableCellColumnSpan";
  869. case ax::mojom::IntAttribute::kTableCellRowIndex:
  870. return "tableCellRowIndex";
  871. case ax::mojom::IntAttribute::kTableCellRowSpan:
  872. return "tableCellRowSpan";
  873. case ax::mojom::IntAttribute::kSortDirection:
  874. return "sortDirection";
  875. case ax::mojom::IntAttribute::kHierarchicalLevel:
  876. return "hierarchicalLevel";
  877. case ax::mojom::IntAttribute::kNameFrom:
  878. return "nameFrom";
  879. case ax::mojom::IntAttribute::kDescriptionFrom:
  880. return "descriptionFrom";
  881. case ax::mojom::IntAttribute::kActivedescendantId:
  882. return "activedescendantId";
  883. case ax::mojom::IntAttribute::kErrormessageId:
  884. return "errormessageId";
  885. case ax::mojom::IntAttribute::kInPageLinkTargetId:
  886. return "inPageLinkTargetId";
  887. case ax::mojom::IntAttribute::kMemberOfId:
  888. return "memberOfId";
  889. case ax::mojom::IntAttribute::kNextOnLineId:
  890. return "nextOnLineId";
  891. case ax::mojom::IntAttribute::kPopupForId:
  892. return "popupForId";
  893. case ax::mojom::IntAttribute::kPreviousOnLineId:
  894. return "previousOnLineId";
  895. case ax::mojom::IntAttribute::kRestriction:
  896. return "restriction";
  897. case ax::mojom::IntAttribute::kSetSize:
  898. return "setSize";
  899. case ax::mojom::IntAttribute::kPosInSet:
  900. return "posInSet";
  901. case ax::mojom::IntAttribute::kColorValue:
  902. return "colorValue";
  903. case ax::mojom::IntAttribute::kAriaCurrentState:
  904. return "ariaCurrentState";
  905. case ax::mojom::IntAttribute::kBackgroundColor:
  906. return "backgroundColor";
  907. case ax::mojom::IntAttribute::kColor:
  908. return "color";
  909. case ax::mojom::IntAttribute::kHasPopup:
  910. return "haspopup";
  911. case ax::mojom::IntAttribute::kInvalidState:
  912. return "invalidState";
  913. case ax::mojom::IntAttribute::kCheckedState:
  914. return "checkedState";
  915. case ax::mojom::IntAttribute::kListStyle:
  916. return "listStyle";
  917. case ax::mojom::IntAttribute::kTextAlign:
  918. return "text-align";
  919. case ax::mojom::IntAttribute::kTextDirection:
  920. return "textDirection";
  921. case ax::mojom::IntAttribute::kTextPosition:
  922. return "textPosition";
  923. case ax::mojom::IntAttribute::kTextStyle:
  924. return "textStyle";
  925. case ax::mojom::IntAttribute::kTextOverlineStyle:
  926. return "textOverlineStyle";
  927. case ax::mojom::IntAttribute::kTextStrikethroughStyle:
  928. return "textStrikethroughStyle";
  929. case ax::mojom::IntAttribute::kTextUnderlineStyle:
  930. return "textUnderlineStyle";
  931. case ax::mojom::IntAttribute::kPreviousFocusId:
  932. return "previousFocusId";
  933. case ax::mojom::IntAttribute::kNextFocusId:
  934. return "nextFocusId";
  935. case ax::mojom::IntAttribute::kImageAnnotationStatus:
  936. return "imageAnnotationStatus";
  937. case ax::mojom::IntAttribute::kDOMNodeId:
  938. return "domNodeId";
  939. }
  940. return "";
  941. }
  942. const char* ToString(ax::mojom::FloatAttribute float_attribute) {
  943. switch (float_attribute) {
  944. case ax::mojom::FloatAttribute::kNone:
  945. return "none";
  946. case ax::mojom::FloatAttribute::kValueForRange:
  947. return "valueForRange";
  948. case ax::mojom::FloatAttribute::kMinValueForRange:
  949. return "minValueForRange";
  950. case ax::mojom::FloatAttribute::kMaxValueForRange:
  951. return "maxValueForRange";
  952. case ax::mojom::FloatAttribute::kStepValueForRange:
  953. return "stepValueForRange";
  954. case ax::mojom::FloatAttribute::kFontSize:
  955. return "fontSize";
  956. case ax::mojom::FloatAttribute::kFontWeight:
  957. return "fontWeight";
  958. case ax::mojom::FloatAttribute::kTextIndent:
  959. return "textIndent";
  960. case ax::mojom::FloatAttribute::kChildTreeScale:
  961. return "childTreeScale";
  962. }
  963. return "";
  964. }
  965. const char* ToString(ax::mojom::BoolAttribute bool_attribute) {
  966. switch (bool_attribute) {
  967. case ax::mojom::BoolAttribute::kNone:
  968. return "none";
  969. case ax::mojom::BoolAttribute::kBusy:
  970. return "busy";
  971. case ax::mojom::BoolAttribute::kNonAtomicTextFieldRoot:
  972. return "nonAtomicTextFieldRoot";
  973. case ax::mojom::BoolAttribute::kContainerLiveAtomic:
  974. return "containerLiveAtomic";
  975. case ax::mojom::BoolAttribute::kContainerLiveBusy:
  976. return "containerLiveBusy";
  977. case ax::mojom::BoolAttribute::kGrabbed:
  978. return "grabbed";
  979. case ax::mojom::BoolAttribute::kLiveAtomic:
  980. return "liveAtomic";
  981. case ax::mojom::BoolAttribute::kModal:
  982. return "modal";
  983. case ax::mojom::BoolAttribute::kUpdateLocationOnly:
  984. return "updateLocationOnly";
  985. case ax::mojom::BoolAttribute::kCanvasHasFallback:
  986. return "canvasHasFallback";
  987. case ax::mojom::BoolAttribute::kScrollable:
  988. return "scrollable";
  989. case ax::mojom::BoolAttribute::kClickable:
  990. return "clickable";
  991. case ax::mojom::BoolAttribute::kClipsChildren:
  992. return "clipsChildren";
  993. case ax::mojom::BoolAttribute::kNotUserSelectableStyle:
  994. return "notUserSelectableStyle";
  995. case ax::mojom::BoolAttribute::kSelected:
  996. return "selected";
  997. case ax::mojom::BoolAttribute::kSelectedFromFocus:
  998. return "selectedFromFocus";
  999. case ax::mojom::BoolAttribute::kSupportsTextLocation:
  1000. return "supportsTextLocation";
  1001. case ax::mojom::BoolAttribute::kIsLineBreakingObject:
  1002. return "isLineBreakingObject";
  1003. case ax::mojom::BoolAttribute::kIsPageBreakingObject:
  1004. return "isPageBreakingObject";
  1005. case ax::mojom::BoolAttribute::kHasAriaAttribute:
  1006. return "hasAriaAttribute";
  1007. case ax::mojom::BoolAttribute::kTouchPassthrough:
  1008. return "touchPassthrough";
  1009. }
  1010. return "";
  1011. }
  1012. const char* ToString(ax::mojom::IntListAttribute int_list_attribute) {
  1013. switch (int_list_attribute) {
  1014. case ax::mojom::IntListAttribute::kNone:
  1015. return "none";
  1016. case ax::mojom::IntListAttribute::kIndirectChildIds:
  1017. return "indirectChildIds";
  1018. case ax::mojom::IntListAttribute::kControlsIds:
  1019. return "controlsIds";
  1020. case ax::mojom::IntListAttribute::kDetailsIds:
  1021. return "detailsIds";
  1022. case ax::mojom::IntListAttribute::kDescribedbyIds:
  1023. return "describedbyIds";
  1024. case ax::mojom::IntListAttribute::kFlowtoIds:
  1025. return "flowtoIds";
  1026. case ax::mojom::IntListAttribute::kLabelledbyIds:
  1027. return "labelledbyIds";
  1028. case ax::mojom::IntListAttribute::kRadioGroupIds:
  1029. return "radioGroupIds";
  1030. case ax::mojom::IntListAttribute::kMarkerTypes:
  1031. return "markerTypes";
  1032. case ax::mojom::IntListAttribute::kMarkerStarts:
  1033. return "markerStarts";
  1034. case ax::mojom::IntListAttribute::kMarkerEnds:
  1035. return "markerEnds";
  1036. case ax::mojom::IntListAttribute::kHighlightTypes:
  1037. return "highlightTypes";
  1038. case ax::mojom::IntListAttribute::kCaretBounds:
  1039. return "caretBounds";
  1040. case ax::mojom::IntListAttribute::kCharacterOffsets:
  1041. return "characterOffsets";
  1042. case ax::mojom::IntListAttribute::kLineStarts:
  1043. return "lineStarts";
  1044. case ax::mojom::IntListAttribute::kLineEnds:
  1045. return "lineEnds";
  1046. case ax::mojom::IntListAttribute::kSentenceStarts:
  1047. return "sentenceStarts";
  1048. case ax::mojom::IntListAttribute::kSentenceEnds:
  1049. return "sentenceEnds";
  1050. case ax::mojom::IntListAttribute::kWordStarts:
  1051. return "wordStarts";
  1052. case ax::mojom::IntListAttribute::kWordEnds:
  1053. return "wordEnds";
  1054. case ax::mojom::IntListAttribute::kCustomActionIds:
  1055. return "customActionIds";
  1056. }
  1057. return "";
  1058. }
  1059. const char* ToString(ax::mojom::StringListAttribute string_list_attribute) {
  1060. switch (string_list_attribute) {
  1061. case ax::mojom::StringListAttribute::kNone:
  1062. return "none";
  1063. case ax::mojom::StringListAttribute::kCustomActionDescriptions:
  1064. return "customActionDescriptions";
  1065. }
  1066. return "";
  1067. }
  1068. const char* ToString(ax::mojom::ListStyle list_style) {
  1069. switch (list_style) {
  1070. case ax::mojom::ListStyle::kNone:
  1071. return "none";
  1072. case ax::mojom::ListStyle::kCircle:
  1073. return "circle";
  1074. case ax::mojom::ListStyle::kDisc:
  1075. return "disc";
  1076. case ax::mojom::ListStyle::kImage:
  1077. return "image";
  1078. case ax::mojom::ListStyle::kNumeric:
  1079. return "numeric";
  1080. case ax::mojom::ListStyle::kOther:
  1081. return "other";
  1082. case ax::mojom::ListStyle::kSquare:
  1083. return "square";
  1084. }
  1085. return "";
  1086. }
  1087. const char* ToString(ax::mojom::MarkerType marker_type) {
  1088. switch (marker_type) {
  1089. case ax::mojom::MarkerType::kNone:
  1090. return "none";
  1091. case ax::mojom::MarkerType::kSpelling:
  1092. return "spelling";
  1093. case ax::mojom::MarkerType::kGrammar:
  1094. return "grammar";
  1095. case ax::mojom::MarkerType::kTextMatch:
  1096. return "textMatch";
  1097. case ax::mojom::MarkerType::kActiveSuggestion:
  1098. return "activeSuggestion";
  1099. case ax::mojom::MarkerType::kSuggestion:
  1100. return "suggestion";
  1101. case ax::mojom::MarkerType::kHighlight:
  1102. return "highlight";
  1103. }
  1104. return "";
  1105. }
  1106. const char* ToString(ax::mojom::HighlightType highlight_type) {
  1107. switch (highlight_type) {
  1108. case ax::mojom::HighlightType::kNone:
  1109. return "none";
  1110. case ax::mojom::HighlightType::kHighlight:
  1111. return "highlight";
  1112. case ax::mojom::HighlightType::kSpellingError:
  1113. return "spelling-error";
  1114. case ax::mojom::HighlightType::kGrammarError:
  1115. return "grammar-error";
  1116. }
  1117. }
  1118. const char* ToString(ax::mojom::MoveDirection move_direction) {
  1119. switch (move_direction) {
  1120. case ax::mojom::MoveDirection::kNone:
  1121. return "none";
  1122. case ax::mojom::MoveDirection::kBackward:
  1123. return "backward";
  1124. case ax::mojom::MoveDirection::kForward:
  1125. return "forward";
  1126. }
  1127. return "";
  1128. }
  1129. const char* ToString(ax::mojom::Command command) {
  1130. switch (command) {
  1131. case ax::mojom::Command::kNone:
  1132. return "none";
  1133. case ax::mojom::Command::kClearSelection:
  1134. return "clearSelection";
  1135. case ax::mojom::Command::kDelete:
  1136. return "delete";
  1137. case ax::mojom::Command::kDictate:
  1138. return "dictate";
  1139. case ax::mojom::Command::kExtendSelection:
  1140. return "extendSelection";
  1141. case ax::mojom::Command::kFormat:
  1142. return "format";
  1143. case ax::mojom::Command::kHistory:
  1144. return "history";
  1145. case ax::mojom::Command::kInsert:
  1146. return "insert";
  1147. case ax::mojom::Command::kMarker:
  1148. return "marker";
  1149. case ax::mojom::Command::kMoveSelection:
  1150. return "moveSelection";
  1151. case ax::mojom::Command::kSetSelection:
  1152. return "setSelection";
  1153. }
  1154. return "";
  1155. }
  1156. const char* ToString(ax::mojom::InputEventType input_event_type) {
  1157. switch (input_event_type) {
  1158. case ax::mojom::InputEventType::kNone:
  1159. return "none";
  1160. case ax::mojom::InputEventType::kInsertText:
  1161. return "insertText";
  1162. case ax::mojom::InputEventType::kInsertLineBreak:
  1163. return "insertLineBreak";
  1164. case ax::mojom::InputEventType::kInsertParagraph:
  1165. return "insertParagraph";
  1166. case ax::mojom::InputEventType::kInsertOrderedList:
  1167. return "insertOrderedList";
  1168. case ax::mojom::InputEventType::kInsertUnorderedList:
  1169. return "insertUnorderedList";
  1170. case ax::mojom::InputEventType::kInsertHorizontalRule:
  1171. return "insertHorizontalRule";
  1172. case ax::mojom::InputEventType::kInsertFromPaste:
  1173. return "insertFromPaste";
  1174. case ax::mojom::InputEventType::kInsertFromDrop:
  1175. return "insertFromDrop";
  1176. case ax::mojom::InputEventType::kInsertFromYank:
  1177. return "insertFromYank";
  1178. case ax::mojom::InputEventType::kInsertTranspose:
  1179. return "insertTranspose";
  1180. case ax::mojom::InputEventType::kInsertReplacementText:
  1181. return "insertReplacementText";
  1182. case ax::mojom::InputEventType::kInsertCompositionText:
  1183. return "insertCompositionText";
  1184. case ax::mojom::InputEventType::kDeleteWordBackward:
  1185. return "deleteWordBackward";
  1186. case ax::mojom::InputEventType::kDeleteWordForward:
  1187. return "deleteWordForward";
  1188. case ax::mojom::InputEventType::kDeleteSoftLineBackward:
  1189. return "deleteSoftLineBackward";
  1190. case ax::mojom::InputEventType::kDeleteSoftLineForward:
  1191. return "deleteSoftLineForward";
  1192. case ax::mojom::InputEventType::kDeleteHardLineBackward:
  1193. return "deleteHardLineBackward";
  1194. case ax::mojom::InputEventType::kDeleteHardLineForward:
  1195. return "deleteHardLineForward";
  1196. case ax::mojom::InputEventType::kDeleteContentBackward:
  1197. return "deleteContentBackward";
  1198. case ax::mojom::InputEventType::kDeleteContentForward:
  1199. return "deleteContentForward";
  1200. case ax::mojom::InputEventType::kDeleteByCut:
  1201. return "deleteByCut";
  1202. case ax::mojom::InputEventType::kDeleteByDrag:
  1203. return "deleteByDrag";
  1204. case ax::mojom::InputEventType::kHistoryUndo:
  1205. return "historyUndo";
  1206. case ax::mojom::InputEventType::kHistoryRedo:
  1207. return "historyRedo";
  1208. case ax::mojom::InputEventType::kFormatBold:
  1209. return "formatBold";
  1210. case ax::mojom::InputEventType::kFormatItalic:
  1211. return "formatItalic";
  1212. case ax::mojom::InputEventType::kFormatUnderline:
  1213. return "formatUnderline";
  1214. case ax::mojom::InputEventType::kFormatStrikeThrough:
  1215. return "formatStrikeThrough";
  1216. case ax::mojom::InputEventType::kFormatSuperscript:
  1217. return "formatSuperscript";
  1218. case ax::mojom::InputEventType::kFormatSubscript:
  1219. return "formatSubscript";
  1220. case ax::mojom::InputEventType::kFormatJustifyCenter:
  1221. return "formatJustifyCenter";
  1222. case ax::mojom::InputEventType::kFormatJustifyFull:
  1223. return "formatJustifyFull";
  1224. case ax::mojom::InputEventType::kFormatJustifyRight:
  1225. return "formatJustifyRight";
  1226. case ax::mojom::InputEventType::kFormatJustifyLeft:
  1227. return "formatJustifyLeft";
  1228. case ax::mojom::InputEventType::kFormatIndent:
  1229. return "formatIndent";
  1230. case ax::mojom::InputEventType::kFormatOutdent:
  1231. return "formatOutdent";
  1232. case ax::mojom::InputEventType::kFormatRemove:
  1233. return "formatRemove";
  1234. case ax::mojom::InputEventType::kFormatSetBlockTextDirection:
  1235. return "formatSetBlockTextDirection";
  1236. }
  1237. return "";
  1238. }
  1239. const char* ToString(ax::mojom::TextBoundary text_boundary) {
  1240. switch (text_boundary) {
  1241. case ax::mojom::TextBoundary::kNone:
  1242. return "none";
  1243. case ax::mojom::TextBoundary::kCharacter:
  1244. return "character";
  1245. case ax::mojom::TextBoundary::kFormatEnd:
  1246. return "formatEnd";
  1247. case ax::mojom::TextBoundary::kFormatStart:
  1248. return "formatStart";
  1249. case ax::mojom::TextBoundary::kFormatStartOrEnd:
  1250. return "formatStartOrEnd";
  1251. case ax::mojom::TextBoundary::kLineEnd:
  1252. return "lineEnd";
  1253. case ax::mojom::TextBoundary::kLineStart:
  1254. return "lineStart";
  1255. case ax::mojom::TextBoundary::kLineStartOrEnd:
  1256. return "lineStartOrEnd";
  1257. case ax::mojom::TextBoundary::kObject:
  1258. return "object";
  1259. case ax::mojom::TextBoundary::kPageEnd:
  1260. return "pageEnd";
  1261. case ax::mojom::TextBoundary::kPageStart:
  1262. return "pageStart";
  1263. case ax::mojom::TextBoundary::kPageStartOrEnd:
  1264. return "pageStartOrEnd";
  1265. case ax::mojom::TextBoundary::kParagraphEnd:
  1266. return "paragraphEnd";
  1267. case ax::mojom::TextBoundary::kParagraphStart:
  1268. return "paragraphStart";
  1269. case ax::mojom::TextBoundary::kParagraphStartSkippingEmptyParagraphs:
  1270. return "paragraphStartSkippingEmptyParagraphs";
  1271. case ax::mojom::TextBoundary::kParagraphStartOrEnd:
  1272. return "paragraphStartOrEnd";
  1273. case ax::mojom::TextBoundary::kSentenceEnd:
  1274. return "sentenceEnd";
  1275. case ax::mojom::TextBoundary::kSentenceStart:
  1276. return "sentenceStart";
  1277. case ax::mojom::TextBoundary::kSentenceStartOrEnd:
  1278. return "sentenceStartOrEnd";
  1279. case ax::mojom::TextBoundary::kWebPage:
  1280. return "webPage";
  1281. case ax::mojom::TextBoundary::kWordEnd:
  1282. return "wordEnd";
  1283. case ax::mojom::TextBoundary::kWordStart:
  1284. return "wordStart";
  1285. case ax::mojom::TextBoundary::kWordStartOrEnd:
  1286. return "wordStartOrEnd";
  1287. }
  1288. return "";
  1289. }
  1290. const char* ToString(ax::mojom::TextAlign text_align) {
  1291. switch (text_align) {
  1292. case ax::mojom::TextAlign::kNone:
  1293. return "none";
  1294. case ax::mojom::TextAlign::kLeft:
  1295. return "left";
  1296. case ax::mojom::TextAlign::kRight:
  1297. return "right";
  1298. case ax::mojom::TextAlign::kCenter:
  1299. return "center";
  1300. case ax::mojom::TextAlign::kJustify:
  1301. return "justify";
  1302. }
  1303. return "";
  1304. }
  1305. const char* ToString(ax::mojom::WritingDirection writing_direction) {
  1306. switch (writing_direction) {
  1307. case ax::mojom::WritingDirection::kNone:
  1308. return "none";
  1309. case ax::mojom::WritingDirection::kLtr:
  1310. return "ltr";
  1311. case ax::mojom::WritingDirection::kRtl:
  1312. return "rtl";
  1313. case ax::mojom::WritingDirection::kTtb:
  1314. return "ttb";
  1315. case ax::mojom::WritingDirection::kBtt:
  1316. return "btt";
  1317. }
  1318. return "";
  1319. }
  1320. const char* ToString(ax::mojom::TextPosition text_position) {
  1321. switch (text_position) {
  1322. case ax::mojom::TextPosition::kNone:
  1323. return "none";
  1324. case ax::mojom::TextPosition::kSubscript:
  1325. return "subscript";
  1326. case ax::mojom::TextPosition::kSuperscript:
  1327. return "superscript";
  1328. }
  1329. return "";
  1330. }
  1331. const char* ToString(ax::mojom::TextStyle text_style) {
  1332. switch (text_style) {
  1333. case ax::mojom::TextStyle::kNone:
  1334. return "none";
  1335. case ax::mojom::TextStyle::kBold:
  1336. return "bold";
  1337. case ax::mojom::TextStyle::kItalic:
  1338. return "italic";
  1339. case ax::mojom::TextStyle::kUnderline:
  1340. return "underline";
  1341. case ax::mojom::TextStyle::kLineThrough:
  1342. return "lineThrough";
  1343. case ax::mojom::TextStyle::kOverline:
  1344. return "overline";
  1345. }
  1346. return "";
  1347. }
  1348. const char* ToString(ax::mojom::TextDecorationStyle text_decoration_style) {
  1349. switch (text_decoration_style) {
  1350. case ax::mojom::TextDecorationStyle::kNone:
  1351. return "none";
  1352. case ax::mojom::TextDecorationStyle::kSolid:
  1353. return "solid";
  1354. case ax::mojom::TextDecorationStyle::kDashed:
  1355. return "dashed";
  1356. case ax::mojom::TextDecorationStyle::kDotted:
  1357. return "dotted";
  1358. case ax::mojom::TextDecorationStyle::kDouble:
  1359. return "double";
  1360. case ax::mojom::TextDecorationStyle::kWavy:
  1361. return "wavy";
  1362. }
  1363. return "";
  1364. }
  1365. const char* ToString(ax::mojom::AriaCurrentState aria_current_state) {
  1366. switch (aria_current_state) {
  1367. case ax::mojom::AriaCurrentState::kNone:
  1368. return "none";
  1369. case ax::mojom::AriaCurrentState::kFalse:
  1370. return "false";
  1371. case ax::mojom::AriaCurrentState::kTrue:
  1372. return "true";
  1373. case ax::mojom::AriaCurrentState::kPage:
  1374. return "page";
  1375. case ax::mojom::AriaCurrentState::kStep:
  1376. return "step";
  1377. case ax::mojom::AriaCurrentState::kLocation:
  1378. return "location";
  1379. case ax::mojom::AriaCurrentState::kDate:
  1380. return "date";
  1381. case ax::mojom::AriaCurrentState::kTime:
  1382. return "time";
  1383. }
  1384. return "";
  1385. }
  1386. const char* ToString(ax::mojom::HasPopup has_popup) {
  1387. switch (has_popup) {
  1388. case ax::mojom::HasPopup::kFalse:
  1389. return "";
  1390. case ax::mojom::HasPopup::kTrue:
  1391. return "true";
  1392. case ax::mojom::HasPopup::kMenu:
  1393. return "menu";
  1394. case ax::mojom::HasPopup::kListbox:
  1395. return "listbox";
  1396. case ax::mojom::HasPopup::kTree:
  1397. return "tree";
  1398. case ax::mojom::HasPopup::kGrid:
  1399. return "grid";
  1400. case ax::mojom::HasPopup::kDialog:
  1401. return "dialog";
  1402. }
  1403. return "";
  1404. }
  1405. const char* ToString(ax::mojom::InvalidState invalid_state) {
  1406. switch (invalid_state) {
  1407. case ax::mojom::InvalidState::kNone:
  1408. return "none";
  1409. case ax::mojom::InvalidState::kFalse:
  1410. return "false";
  1411. case ax::mojom::InvalidState::kTrue:
  1412. return "true";
  1413. }
  1414. return "";
  1415. }
  1416. const char* ToString(ax::mojom::Restriction restriction) {
  1417. switch (restriction) {
  1418. case ax::mojom::Restriction::kNone:
  1419. return "none";
  1420. case ax::mojom::Restriction::kReadOnly:
  1421. return "readOnly";
  1422. case ax::mojom::Restriction::kDisabled:
  1423. return "disabled";
  1424. }
  1425. return "";
  1426. }
  1427. const char* ToString(ax::mojom::CheckedState checked_state) {
  1428. switch (checked_state) {
  1429. case ax::mojom::CheckedState::kNone:
  1430. return "none";
  1431. case ax::mojom::CheckedState::kFalse:
  1432. return "false";
  1433. case ax::mojom::CheckedState::kTrue:
  1434. return "true";
  1435. case ax::mojom::CheckedState::kMixed:
  1436. return "mixed";
  1437. }
  1438. return "";
  1439. }
  1440. const char* ToString(ax::mojom::SortDirection sort_direction) {
  1441. switch (sort_direction) {
  1442. case ax::mojom::SortDirection::kNone:
  1443. return "none";
  1444. case ax::mojom::SortDirection::kUnsorted:
  1445. return "unsorted";
  1446. case ax::mojom::SortDirection::kAscending:
  1447. return "ascending";
  1448. case ax::mojom::SortDirection::kDescending:
  1449. return "descending";
  1450. case ax::mojom::SortDirection::kOther:
  1451. return "other";
  1452. }
  1453. return "";
  1454. }
  1455. const char* ToString(ax::mojom::NameFrom name_from) {
  1456. switch (name_from) {
  1457. case ax::mojom::NameFrom::kNone:
  1458. return "none";
  1459. case ax::mojom::NameFrom::kAttribute:
  1460. return "attribute";
  1461. case ax::mojom::NameFrom::kAttributeExplicitlyEmpty:
  1462. return "attributeExplicitlyEmpty";
  1463. case ax::mojom::NameFrom::kCaption:
  1464. return "caption";
  1465. case ax::mojom::NameFrom::kContents:
  1466. return "contents";
  1467. case ax::mojom::NameFrom::kPlaceholder:
  1468. return "placeholder";
  1469. case ax::mojom::NameFrom::kRelatedElement:
  1470. return "relatedElement";
  1471. case ax::mojom::NameFrom::kTitle:
  1472. return "title";
  1473. case ax::mojom::NameFrom::kValue:
  1474. return "value";
  1475. }
  1476. return "";
  1477. }
  1478. const char* ToString(ax::mojom::DescriptionFrom description_from) {
  1479. switch (description_from) {
  1480. case ax::mojom::DescriptionFrom::kNone:
  1481. return "none";
  1482. case ax::mojom::DescriptionFrom::kAriaDescription:
  1483. return "ariaDescription";
  1484. case ax::mojom::DescriptionFrom::kAttributeExplicitlyEmpty:
  1485. return "attributeExplicitlyEmpty";
  1486. case ax::mojom::DescriptionFrom::kButtonLabel:
  1487. return "buttonLabel";
  1488. case ax::mojom::DescriptionFrom::kPopupElement:
  1489. return "popupElement";
  1490. case ax::mojom::DescriptionFrom::kRelatedElement:
  1491. return "relatedElement";
  1492. case ax::mojom::DescriptionFrom::kRubyAnnotation:
  1493. return "rubyAnnotation";
  1494. case ax::mojom::DescriptionFrom::kSvgDescElement:
  1495. return "svgDescElement";
  1496. case ax::mojom::DescriptionFrom::kSummary:
  1497. return "summary";
  1498. case ax::mojom::DescriptionFrom::kTableCaption:
  1499. return "tableCaption";
  1500. case ax::mojom::DescriptionFrom::kTitle:
  1501. return "title";
  1502. }
  1503. return "";
  1504. }
  1505. const char* ToString(ax::mojom::EventFrom event_from) {
  1506. switch (event_from) {
  1507. case ax::mojom::EventFrom::kNone:
  1508. return "none";
  1509. case ax::mojom::EventFrom::kUser:
  1510. return "user";
  1511. case ax::mojom::EventFrom::kPage:
  1512. return "page";
  1513. case ax::mojom::EventFrom::kAction:
  1514. return "action";
  1515. }
  1516. return "";
  1517. }
  1518. const char* ToString(ax::mojom::Gesture gesture) {
  1519. switch (gesture) {
  1520. case ax::mojom::Gesture::kNone:
  1521. return "none";
  1522. case ax::mojom::Gesture::kClick:
  1523. return "click";
  1524. case ax::mojom::Gesture::kSwipeLeft1:
  1525. return "swipeLeft1";
  1526. case ax::mojom::Gesture::kSwipeUp1:
  1527. return "swipeUp1";
  1528. case ax::mojom::Gesture::kSwipeRight1:
  1529. return "swipeRight1";
  1530. case ax::mojom::Gesture::kSwipeDown1:
  1531. return "swipeDown1";
  1532. case ax::mojom::Gesture::kSwipeLeft2:
  1533. return "swipeLeft2";
  1534. case ax::mojom::Gesture::kSwipeUp2:
  1535. return "swipeUp2";
  1536. case ax::mojom::Gesture::kSwipeRight2:
  1537. return "swipeRight2";
  1538. case ax::mojom::Gesture::kSwipeDown2:
  1539. return "swipeDown2";
  1540. case ax::mojom::Gesture::kSwipeLeft3:
  1541. return "swipeLeft3";
  1542. case ax::mojom::Gesture::kSwipeUp3:
  1543. return "swipeUp3";
  1544. case ax::mojom::Gesture::kSwipeRight3:
  1545. return "swipeRight3";
  1546. case ax::mojom::Gesture::kSwipeDown3:
  1547. return "swipeDown3";
  1548. case ax::mojom::Gesture::kSwipeLeft4:
  1549. return "swipeLeft4";
  1550. case ax::mojom::Gesture::kSwipeUp4:
  1551. return "swipeUp4";
  1552. case ax::mojom::Gesture::kSwipeRight4:
  1553. return "swipeRight4";
  1554. case ax::mojom::Gesture::kSwipeDown4:
  1555. return "swipeDown4";
  1556. case ax::mojom::Gesture::kTap2:
  1557. return "tap2";
  1558. case ax::mojom::Gesture::kTap3:
  1559. return "tap3";
  1560. case ax::mojom::Gesture::kTap4:
  1561. return "tap4";
  1562. case ax::mojom::Gesture::kTouchExplore:
  1563. return "touchExplore";
  1564. }
  1565. return "";
  1566. }
  1567. const char* ToString(ax::mojom::TextAffinity text_affinity) {
  1568. switch (text_affinity) {
  1569. case ax::mojom::TextAffinity::kNone:
  1570. return "none";
  1571. case ax::mojom::TextAffinity::kDownstream:
  1572. return "downstream";
  1573. case ax::mojom::TextAffinity::kUpstream:
  1574. return "upstream";
  1575. }
  1576. return "";
  1577. }
  1578. const char* ToString(ax::mojom::TreeOrder tree_order) {
  1579. switch (tree_order) {
  1580. case ax::mojom::TreeOrder::kNone:
  1581. return "none";
  1582. case ax::mojom::TreeOrder::kUndefined:
  1583. return "undefined";
  1584. case ax::mojom::TreeOrder::kBefore:
  1585. return "before";
  1586. case ax::mojom::TreeOrder::kEqual:
  1587. return "equal";
  1588. case ax::mojom::TreeOrder::kAfter:
  1589. return "after";
  1590. }
  1591. return "";
  1592. }
  1593. const char* ToString(ax::mojom::ImageAnnotationStatus status) {
  1594. switch (status) {
  1595. case ax::mojom::ImageAnnotationStatus::kNone:
  1596. return "none";
  1597. case ax::mojom::ImageAnnotationStatus::kWillNotAnnotateDueToScheme:
  1598. return "kWillNotAnnotateDueToScheme";
  1599. case ax::mojom::ImageAnnotationStatus::kIneligibleForAnnotation:
  1600. return "ineligibleForAnnotation";
  1601. case ax::mojom::ImageAnnotationStatus::kEligibleForAnnotation:
  1602. return "eligibleForAnnotation";
  1603. case ax::mojom::ImageAnnotationStatus::kSilentlyEligibleForAnnotation:
  1604. return "silentlyEligibleForAnnotation";
  1605. case ax::mojom::ImageAnnotationStatus::kAnnotationPending:
  1606. return "annotationPending";
  1607. case ax::mojom::ImageAnnotationStatus::kAnnotationSucceeded:
  1608. return "annotationSucceeded";
  1609. case ax::mojom::ImageAnnotationStatus::kAnnotationEmpty:
  1610. return "annotationEmpty";
  1611. case ax::mojom::ImageAnnotationStatus::kAnnotationAdult:
  1612. return "annotationAdult";
  1613. case ax::mojom::ImageAnnotationStatus::kAnnotationProcessFailed:
  1614. return "annotationProcessFailed";
  1615. }
  1616. return "";
  1617. }
  1618. const char* ToString(ax::mojom::Dropeffect dropeffect) {
  1619. switch (dropeffect) {
  1620. case ax::mojom::Dropeffect::kCopy:
  1621. return "copy";
  1622. case ax::mojom::Dropeffect::kExecute:
  1623. return "execute";
  1624. case ax::mojom::Dropeffect::kLink:
  1625. return "link";
  1626. case ax::mojom::Dropeffect::kMove:
  1627. return "move";
  1628. case ax::mojom::Dropeffect::kPopup:
  1629. return "popup";
  1630. case ax::mojom::Dropeffect::kNone:
  1631. return "none";
  1632. }
  1633. return "";
  1634. }
  1635. } // namespace ui