File: autotest_private.idl

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (1677 lines) | stat: -rw-r--r-- 57,756 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// API for integration testing. To be used on test images with a test component
// extension.
[platforms=("chromeos"),
 implemented_in="chrome/browser/ash/extensions/autotest_private/autotest_private_api.h"]
namespace autotestPrivate {

  enum ShelfAlignmentType {
    // BottomLocked not supported by shelf_prefs.
    Bottom, Left, Right
  };

  // A mapping of ash::ShelfItemType.
  enum ShelfItemType {
    PinnedApp,
    BrowserShortcut,
    App,
    UnpinnedBrowserShortcut,
    Dialog
  };

  // A mapping of ash::ShelfItemStatus.
  enum ShelfItemStatus {
    Closed,
    Running,
    Attention
  };

  // A mapping of apps::mojom::Type
  enum AppType {
    Arc,
    Crostini,
    Extension,
    Web,
    MacOS,
    PluginVm,
    StandaloneBrowser,
    Remote,
    Borealis,
    Bruschetta
  };

  // A mapping of apps::mojom::InstallSource
  enum AppInstallSource {
    Unknown,
    System,
    Policy,
    Oem,
    Default,
    Sync,
    User,
    SubApp,
    Kiosk,
    CommandLine
  };

  // A mapping of apps::mojom::Readiness
  enum AppReadiness {
    Ready,
    DisabledByBlacklist,
    DisabledByPolicy,
    DisabledByUser,
    Terminated,
    UninstalledByUser,
    Removed,
    UninstalledByMigration,
    DisabledByLocalSettings
  };

  // A mapping of arc::mojom::WakefulnessMode
  enum WakefulnessMode {
    Unknown,
    Asleep,
    Awake,
    Dreaming,
    Dozing
  };
  callback WakefulnessModeCallback = void (WakefulnessMode mode);

  // A subset of Window State types in ash::WindowStateType. We may add more
  // into the set in the future.
  enum WindowStateType {
    Normal,
    Minimized,
    Maximized,
    Fullscreen,
    PrimarySnapped,
    SecondarySnapped,
    Pinned,
    TrustedPinned,
    PIP,
    Floated
  };

  // A subset of WM event types in ash::WMEventType. We may add more in the
  // set in the future.
  enum WMEventType {
    WMEventNormal,
    WMEventMaximize,
    WMEventMinimize,
    WMEventFullscreen,
    WMEventSnapPrimary,
    WMEventSnapSecondary,
    WMEventFloat
  };

  // Display orientation type.
  enum RotationType {
    // RotateAny is the auto-rotation status (not locked to a rotation) for
    // tablet mode. Not working in clamshell mode.
    RotateAny,
    Rotate0,
    Rotate90,
    Rotate180,
    Rotate270
  };

  enum LauncherStateType {
    Closed,
    FullscreenAllApps,
    FullscreenSearch
  };

  enum OverviewStateType {
    Shown,
    Hidden
  };

  enum MouseButton {
    Left,
    Middle,
    Right,
    Back,
    Forward
  };

  // A paramter used in setArcAppWindowState() function.
  dictionary WindowStateChangeDict {
    // The WM event to change the ARC window state.
    WMEventType eventType;

    // If the initial state is already same as the expected state, should we
    // treat this case as a failure? Default value is false.
    boolean? failIfNoChange;
  };

  dictionary LoginStatusDict {
    // Are we logged in?
    boolean isLoggedIn;
    // Is the logged-in user the owner?
    boolean isOwner;
    // Is the screen locked?
    boolean isScreenLocked;
    // Is the wallpaper blur layer still animating in?
    boolean isLockscreenWallpaperAnimating;
    // Is the screen ready for password?
    boolean isReadyForPassword;
    // Are the avatar images loaded for all users?
    boolean areAllUserImagesLoaded;

    // Is the logged-in user a regular user? Set only if `isLoggedIn`.
    boolean? isRegularUser;
    // Are we logged into the guest account? Set only if `isLoggedIn`.
    boolean? isGuest;
    // Are we logged into kiosk-app mode? Set only if `isLoggedIn`.
    boolean? isKiosk;

    // User email. Set only if `isLoggedIn`.
    DOMString? email;
    // User display email. Set only if `isLoggedIn`.
    DOMString? displayEmail;
    // User display name. Set only if `isLoggedIn`.
    DOMString? displayName;
    // User image: 'file', 'profile' or a number. Set only if `isLoggedIn`.
    DOMString? userImage;
    // Whether the user has a valid oauth2 token. Only set for gaia user.
    boolean? hasValidOauth2Token;
  };
  callback LoginStatusCallback = void (LoginStatusDict status);

  // |all_policies| will be the full list of policies as returned by the
  // DictionaryPolicyConversions.ToValue function.
  callback AllEnterprisePoliciesCallback = void (any all_policies);

  dictionary ExtensionInfoDict {
    DOMString id;
    DOMString version;
    DOMString name;
    DOMString publicKey;
    DOMString description;
    DOMString backgroundUrl;
    DOMString optionsUrl;

    DOMString[] hostPermissions;
    DOMString[] effectiveHostPermissions;
    DOMString[] apiPermissions;

    boolean isComponent;
    boolean isInternal;
    boolean isUserInstalled;
    boolean isEnabled;
    boolean allowedInIncognito;
    boolean hasPageAction;
  };
  dictionary ExtensionsInfoArray {
    ExtensionInfoDict[] extensions;
  };
  callback ExtensionsInfoCallback = void (ExtensionsInfoArray info);

  dictionary Notification {
    DOMString id;
    DOMString type;
    DOMString title;
    DOMString message;
    long priority;
    long progress;
  };
  callback NotificationArrayCallback = void (Notification[] notifications);

  dictionary Printer {
    DOMString printerName;
    DOMString? printerId;
    DOMString? printerType;
    DOMString? printerDesc;
    DOMString? printerMakeAndModel;
    DOMString? printerUri;
    DOMString? printerPpd;
  };
  callback PrinterArrayCallback = void (Printer[] printers);

  callback ArcStartTimeCallback = void (double startTicks);

  dictionary ArcState {
    // Whether the ARC is provisioned.
    boolean provisioned;
    // Whether ARC Terms of Service needs to be shown.
    boolean tosNeeded;
    // ARC pre-start time (mini-ARC) or 0 if not pre-started.
    double preStartTime;
    // ARC start time or 0 if not started.
    double startTime;
  };
  callback ArcStateCallback = void (ArcState result);

  dictionary PlayStoreState {
    // Whether the Play Store allowed for the current user.
    boolean allowed;
    // Whether the Play Store currently enabled.
    boolean? enabled;
    // Whether the Play Store managed by policy.
    boolean? managed;
  };
  callback PlayStoreStateCallback = void (PlayStoreState result);

  dictionary AssistantQueryResponse {
    // Text response returned from server.
    DOMString? text;
    // HTML response returned from server.
    DOMString? htmlResponse;
    // Open URL response returned from server.
    DOMString? openUrl;
    // Open Android app response returned from server.
    DOMString? openAppResponse;
  };
  dictionary AssistantQueryStatus {
    // Indicates whether this might be a voice interaction.
    boolean isMicOpen;
    // Query text sent to Assistant. In the event of a voice interaction,
    // this field will be same as the speech recognition final result.
    DOMString queryText;
    // Response for the current query.
    AssistantQueryResponse queryResponse;
  };
  callback AssistantQueryStatusCallback = void (AssistantQueryStatus status);

  callback IsAppShownCallback = void (boolean appShown);

  callback IsArcProvisionedCallback = void (boolean arcProvisioned);

  callback IsArcPackageListInitialRefreshedCallback = void (boolean refreshed);

  dictionary ArcAppDict {
    DOMString name;
    DOMString packageName;
    DOMString activity;
    DOMString intentUri;
    DOMString iconResourceId;
    double lastLaunchTime;
    double installTime;
    boolean sticky;
    boolean notificationsEnabled;
    boolean ready;
    boolean suspended;
    boolean showInLauncher;
    boolean shortcut;
    boolean launchable;
  };
  callback GetArcAppCallback = void (ArcAppDict package);

  dictionary ArcAppKillsDict {
    double oom;
    double lmkdForeground;
    double lmkdPerceptible;
    double lmkdCached;
    double pressureForeground;
    double pressurePerceptible;
    double pressureCached;
  };
  callback GetArcAppKillsCallback = void (ArcAppKillsDict counts);

  dictionary ArcPackageDict {
    DOMString packageName;
    long packageVersion;
    DOMString lastBackupAndroidId;
    double lastBackupTime;
    boolean shouldSync;
    boolean vpnProvider;
  };
  callback GetArcPackageCallback = void (ArcPackageDict package);

  dictionary Location {
    double x;
    double y;
  };

  dictionary Bounds {
    double left;
    double top;
    double width;
    double height;
  };

  dictionary ArcAppTracingInfo {
    boolean success;
    double fps;
    double perceivedFps;
    double commitDeviation;
    double presentDeviation;
    double renderQuality;
    double janksPerMinute;
    double janksPercentage;
  };

  callback TakeScreenshotCallback = void (DOMString base64Png);

  callback GetPrimaryDisplayScaleFactorCallback = void (double scaleFactor);

  callback IsTabletModeEnabledCallback = void (boolean enabled);

  callback SetTabletModeEnabledCallback = void(boolean enabled);

  callback SetShelfIconPinCallback = void(DOMString[] results);

  callback SetOverviewModeStateCallback = void(boolean finished);

  enum ThemeStyle {
    TonalSpot,
    Vibrant,
    Expressive,
    Spritz,
    Rainbow,
    FruitSalad
  };

  callback SendArcOverlayColorCallback = void (boolean result);

  callback ArcAppTracingCallback = void(ArcAppTracingInfo info);

  callback WaitForDisplayRotationCallback = void (boolean success);

  callback InstallPWAForCurrentURLCallback = void (DOMString appId);

  dictionary App {
    DOMString appId;
    DOMString name;
    DOMString shortName;
    DOMString publisherId;
    AppType? type;
    AppInstallSource? installSource;
    AppReadiness? readiness;
    DOMString[] additionalSearchTerms;
    boolean? showInLauncher;
    boolean? showInSearch;
  };

  dictionary SystemWebApp {
    // App's internal name. This isn't user-visible and should only be used
    // for logging.
    DOMString internalName;

    // App's install URL. This is a placeholder for installation pipeline,
    // not used for anything else.
    DOMString url;

    // App's visible name. This is defined in the Web App manifest, and shown
    // in Shelf and Launcher. This matches App's name attribute (see above).
    DOMString name;

    // App's default start_url. This is the default URL that the App will be
    // launched to.
    DOMString startUrl;
  };

  callback GetAllInstalledAppsCallback = void (App[] apps);

  dictionary ShelfItem {
    DOMString appId;
    DOMString launchId;
    DOMString title;
    ShelfItemType? type;
    ShelfItemStatus status;
    boolean showsTooltip;
    boolean pinnedByPolicy;
    boolean pinStateForcedByType;
    boolean hasNotification;
  };

  // A mapping of ash::AppType.
  enum AppWindowType {
    Browser,
    ChromeApp,
    ArcApp,
    CrostiniApp,
    SystemApp,
    ExtensionApp,
    Lacros
  };

  // A mapping of HotseatState in ash/public/cpp/shelf_types.h.
  enum HotseatState {
    Hidden,
    ShownClamShell,
    ShownHomeLauncher,
    Extended
  };

  // The frame mode of a window. None if the window is framesless.
  enum FrameMode {
    Normal,
    Immersive
  };

  dictionary OverviewInfo {
    // Bounds in screen of an OverviewItem.
    Bounds bounds;
    // Whether an OverviewItem is being dragged in overview.
    boolean isDragged;
  };

  // Used to update an app's shelf pin state.
  dictionary ShelfIconPinUpdateParam {
    // The identifier of the target app.
    DOMString appId;

    // The target pin state for the app.
    boolean pinned;
  };

  dictionary AppWindowInfo {
    // The identifier of the window. This shouldn't change across the time.
    long id;

    // The name of the window object -- typically internal class name of the
    // window (like 'BrowserFrame').
    DOMString name;

    AppWindowType windowType;
    WindowStateType stateType;

    // The bounds of the window, in the coordinate of the root window (i.e.
    // relative to the display where this window resides).
    Bounds boundsInRoot;

    // The identifier of the display where this window resides.
    DOMString displayId;

    boolean isVisible;
    boolean canFocus;

    // The title of the window; this can be seen in the window caption, or in
    // the overview mode. Typically, this provides the title of the webpage or
    // the title supplied by the application.
    DOMString title;

    // Whether some animation is ongoing on the window or not.
    boolean isAnimating;

    // The final bounds of the window when the animation completes. This should
    // be same as |boundsInRoot| when |isAnimating| is false.
    Bounds targetBounds;

    // Whether or not the window is going to be visible after the animation
    // completes. This should be same as |isVisible| when |isAnimating| is
    // false.
    boolean targetVisibility;

    // WM Releated states
    boolean isActive;
    boolean hasFocus;
    boolean onActiveDesk;
    boolean hasCapture;
    boolean canResize;

    // Stacking order of the window in relation to its siblings. 0 indicates
    // that the window is topmost. -1 if stacking info is not available
    long stackingOrder;

    // Window frame info
    FrameMode frameMode;
    boolean isFrameVisible;
    long captionHeight;
    // The bitset of the enabled caption buttons. See
    // ui/views/window/caption_button_types.h.
    long captionButtonEnabledStatus;
    // The bitset of the caption buttons which are visible on the frame.
    long captionButtonVisibleStatus;

    DOMString? arcPackageName;

    OverviewInfo? overviewInfo;

    // The identifier of the app associated with the window that was launched
    // from full restore. This should be same as |appId| when the window was
    // restored from full restore, otherwise null.
    DOMString? fullRestoreWindowAppId;

    // The identifier of the app associated with the window.
    DOMString? appId;
  };

  dictionary Accelerator {
    DOMString keyCode;
    boolean shift;
    boolean control;
    boolean alt;
    boolean search;
    boolean pressed;
  };

  // Mapped to ScrollableShelfState in ash/public/cpp/shelf_ui_info.h.
  // [deprecated="Use ShelfState"]
  dictionary ScrollableShelfState {
    double? scrollDistance;
  };

  // Mapped to ShelfState in ash/public/cpp/shelf_ui_info.h.
  dictionary ShelfState {
    double? scrollDistance;
  };

  // Mapped to ScrollableShelfInfo in ash/public/cpp/shelf_ui_info.h.
  // |targetMainAxisOffset| is set when ShelfState used in query
  // specifies the scroll distance.
  dictionary ScrollableShelfInfo {
    double mainAxisOffset;
    double pageOffset;
    double? targetMainAxisOffset;
    Bounds leftArrowBounds;
    Bounds rightArrowBounds;
    boolean isAnimating;
    boolean iconsUnderAnimation;
    boolean isOverflow;
    Bounds[] iconsBoundsInScreen;
    boolean isShelfWidgetAnimating;
  };

  // Mapped to HotseatSwipeDescriptor in ash/public/cpp/shelf_ui_info.h.
  dictionary HotseatSwipeDescriptor {
    Location swipeStartLocation;
    Location swipeEndLocation;
  };

  // Mapped to HotseatInfo in ash/public/cpp/shelf_ui_info.h.
  dictionary HotseatInfo {
    HotseatSwipeDescriptor swipeUp;
    HotseatState state;
    boolean isAnimating;
    // Whether the shelf is hidden with auto-hide enabled.
    boolean isAutoHidden;
  };

  // The ui information of shelf components, including hotseat and
  // scrollable shelf.
  dictionary ShelfUIInfo {
    HotseatInfo hotseatInfo;
    ScrollableShelfInfo scrollableShelfInfo;
  };

  // Information about all desks.
  dictionary DesksInfo {
    long activeDeskIndex;
    long numDesks;
    boolean isAnimating;
    DOMString[] deskContainers;
  };

  // Information about launcher's search box.
  dictionary LauncherSearchBoxState {
    DOMString ghostText;
  };

  callback GetShelfItemsCallback = void (ShelfItem[] items);

  callback GetDefaultPinnedAppIdsCallback = void (DOMString[] items);

  callback GetShelfAutoHideBehaviorCallback = void (DOMString behavior);

  callback GetLauncherSearchBoxStateCallback = void (
      LauncherSearchBoxState state);

  callback GetShelfAlignmentCallback = void (ShelfAlignmentType alignment);

  callback WindowStateCallback = void (WindowStateType currentType);

  callback VoidCallback = void ();

  callback DOMStringCallback = void (DOMString data);

  callback GetAppWindowListCallback = void (AppWindowInfo[] window_list);

  callback AcceleratorCallback = void (boolean success);

  callback DesksCallback = void (boolean success);

  callback GetDeskCountCallback = void (long count);

  callback GetDesksInfoCallback = void (DesksInfo desks);

  callback GetScrollableShelfInfoForStateCallback = void (
      ScrollableShelfInfo info);

  callback GetShelfUIInfoForStateCallback = void (ShelfUIInfo info);

  // Frame counting record for one frame sink/compositor.
  dictionary FrameCountingPerSinkData {
    // Type of the frame sink. This corresponds to CompositorFrameSinkType.
    DOMString sinkType;
    // Whether the frame sink is the root.
    boolean isRoot;
    // Debug label of the frame sink.
    DOMString debugLabel;

    // Number of presented frames grouped using `bucketSizeInSeconds` arg in
    // startFrameCounting call. It would be fps if the `bucketSizeInSeconds` is
    // 1s.
    long[] presentedFrames;
  };

  callback StopFrameCountingCallback = void (FrameCountingPerSinkData[] data);

  dictionary OverdrawData {
    // Average overdraw as percentage of the display size grouped by
    // `bucketSizeInSeconds` arg of `startOverdrawTracking` call.
    double[] averageOverdraws;
  };

  callback StopOverdrawTrackingCallback = void (OverdrawData data);

  // Result of calling setWindowBounds, which returns the actual bounds and
  // display the window was set to. This may be different than the requested
  // bounds and display, for example if the window is showing an ARC app and
  // Android modifies the bounds request. Further, this result may never be
  // returned in some situations (e.g. Android ignoring a bounds request),
  // causing a timeout.
  dictionary SetWindowBoundsResult {
    // Bounds of the window.
    Bounds bounds;
    // Display ID of the display the window is on.
    DOMString displayId;
  };
  callback WindowBoundsCallback = void (SetWindowBoundsResult result);

  // Collected DisplaySmoothness data between startSmoothnessTracking and
  // stopSmoothnessTracking calls.
  dictionary DisplaySmoothnessData {
    // Number of frames expected to be shown for this animation.
    long framesExpected;
    // Number of frames actually shown for this animation.
    long framesProduced;
    // Number of janks during this animation. A jank is counted when the current
    // frame latency is larger than previous ones.
    long jankCount;
    // Display throughput percentage at fixed intervals.
    long[] throughput;
    // The timestamps of the janks during this animation in milllisecond.
    long[] jankTimestamps;
    // The durations of the janks during this animation in millisecond.
    long[] jankDurations;
  };

  // Callback invoked to report the smoothness after StopSmoothnessTracking is
  // called.
  callback StopSmoothnessTrackingCallback = void
      (DisplaySmoothnessData data);

  // Collected ui::ThroughputTracker data for one animation. It is based on
  // cc::FrameSequenceMetrics::ThroughputData.
  dictionary ThroughputTrackerAnimationData {
    // Animation start time in milliseconds, relative to when
    // `startThroughputTrackerDataCollection` is called.
    long startOffsetMs;
    // Animation stop time in milliseconds, relative to when
    // `startThroughputTrackerDataCollection` is called.
    long stopOffsetMs;
    // Number of frames expected to be shown for this animation.
    long framesExpected;
    // Number of frames actually shown for this animation.
    long framesProduced;
    // Number of janks during this animation. A jank is counted when the current
    // frame latency is larger than previous ones.
    long jankCount;
  };

  // Callback invoked to report the collection ui::ThroughputTracker data
  // after stopThroughputTrackerDataCollection is called.
  callback StopThroughputTrackerDataCollectionCallback = void
      (ThroughputTrackerAnimationData[] data);

  // Callback invoked to report the currently collected ui::ThroughputTracker
  // animation data. Note that the data reported is removed to avoid reporting
  // duplicated data.
  callback GetThroughtputTrackerDataCallback = void
      (ThroughputTrackerAnimationData[] data);

  // Callback invoked to report the number of system web apps that should be
  // installed.
  callback GetRegisteredSystemWebAppsCallback = void
      (SystemWebApp[] systemWebApps);

  callback IsSystemWebAppOpenCallback = void (boolean isOpen);

  // Callback invoked to return the smoothness percentage after
  // getDisplaySmoothness is called.
  callback GetDisplaySmoothnessCallback = void (long smoothness);

  // Options for resetting the holding space.
  dictionary ResetHoldingSpaceOptions {
    // Whether to call `ash::holding_space_prefs::MarkTimeOfFirstAdd()` after
    // reset. Used to show the holding space tray in tests, since it's otherwise
    // hidden after OOBE.
    boolean markTimeOfFirstAdd;
  };

  callback CouldAllowCrostiniCallback = void (boolean canBeAllowed);

  // Collected ash::LoginEventRecorder data.
  dictionary LoginEventRecorderData {
    // Event name
    DOMString name;
    // Number of frames actually shown for this animation.
    double microsecnods_since_unix_epoch;
  };

  // Callback invoked to report the collection ui::LoginEventRecorder data
  // after getLoginEventRecorderLoginEvents is called.
  callback GetLoginEventRecorderLoginEventsCallback = void
      (LoginEventRecorderData[] data);

  // Request parameters for <code>getAccessToken</code>.
  dictionary GetAccessTokenParams {
     // An email associated with the account to get a token for.
     DOMString email;
     // A list of OAuth scopes to request.
     DOMString[] scopes;
     // An optional timeout in milliseconds for the request.
     // Default: 90 seconds
     long? timeoutMs;
  };

  // Response data for <code>getAccessToken</code>.
  dictionary GetAccessTokenData {
    // The access token
    DOMString accessToken;
    // The time the access token will expire as a unix timestamp in
    // milliseconds.
    DOMString expirationTimeUnixMs;
  };

  // Reponse callback for <code>getAccessToken</code>.
  callback GetAccessTokenCallback = void(GetAccessTokenData data);

  // Callback invoked to report whether the current input method is ready to
  // accept key events from the test.
  callback IsInputMethodReadyForTestingCallback = void
      (boolean isReady);

  // Response data for <code>makeFuseboxTempDir</code>.
  dictionary MakeFuseboxTempDirData {
    DOMString fuseboxFilePath;
    DOMString underlyingFilePath;
  };

  // Callback invoked when the temporary directory was made.
  callback MakeFuseboxTempDirCallback = void(MakeFuseboxTempDirData data);

  // Callback invoked when the temporary directory was removed.
  callback RemoveFuseboxTempDirCallback = void();

  callback IsFeatureEnabledCallback = void(boolean enabled);

  // Response data for <code>getCurrentInputMethodDescriptor</code>.
  // Add more fields from ash/input_method/InputMethodDescriptor as needed.
  dictionary GetCurrentInputMethodDescriptorData {
    DOMString keyboardLayout;
  };

  // Response callback for current input method keyboard layout.
  callback GetCurrentInputMethodDescriptorCallback = void
      (GetCurrentInputMethodDescriptorData data);

  // Response callback to report if a field trial exists and has been activated.
  callback IsFieldTrialActiveCallback = void(boolean active);

  callback OverrideLobsterResponseForTestingCallback = void(boolean success);

  // Request data containing the mock responses from
  // overrideOrcaResponseForTesting.
  dictionary OrcaResponseArray {
    DOMString[] responses;
  };

  callback OverrideOrcaResponseForTestingCallback = void(boolean success);

  // Request data containing the mock responses from
  // overrideScannerResponsesForTesting.
  dictionary ScannerResponseArray {
    DOMString[] responses;
  };

  callback OverrideScannerResponsesForTestingCallback = void(boolean success);

  interface Functions {
    // Must be called to allow autotestPrivateAPI events to be fired.
    static void initializeEvents();

    // Logout of a user session.
    static void logout();

    // Restart the browser.
    static void restart();

    // Shutdown the browser.
    // |force|: if set, ignore ongoing downloads and onunbeforeunload handlers.
    static void shutdown(boolean force);

    // Get login status.
    static void loginStatus(LoginStatusCallback callback);

    // Waits for the post login animation to be complete and then triggers the
    // callback.
    static void waitForLoginAnimationEnd(VoidCallback callback);

    // Locks the screen.
    static void lockScreen();

    // Get info about installed extensions.
    static void getExtensionsInfo(
        ExtensionsInfoCallback callback);

    // Get state of the policies.
    // Will contain device policies and policies from the active profile.
    // The policy values are formatted as they would be for exporting in
    // chrome://policy.
    static void getAllEnterprisePolicies(
        AllEnterprisePoliciesCallback callback);

    // Refreshes the Enterprise Policies.
    static void refreshEnterprisePolicies(
        VoidCallback callback);

    // Refreshes the remote commands.
    static void refreshRemoteCommands(VoidCallback callback);

    // Simulates a memory access bug for asan testing.
    static void simulateAsanMemoryBug();

    // Set the touchpad pointer sensitivity setting.
    // |value|: the pointer sensitivity setting index.
    static void setTouchpadSensitivity(long value);

    // Turn on/off tap-to-click for the touchpad.
    // |enabled|: if set, enable tap-to-click.
    static void setTapToClick(boolean enabled);

    // Turn on/off three finger click for the touchpad.
    // |enabled|: if set, enable three finger click.
    static void setThreeFingerClick(boolean enabled);

    // Turn on/off tap dragging for the touchpad.
    // |enabled|: if set, enable tap dragging.
    static void setTapDragging(boolean enabled);

    // Turn on/off Australian scrolling for devices other than wheel mouse.
    // |enabled|: if set, enable Australian scrolling.
    static void setNaturalScroll(boolean enabled);

    // Set the mouse pointer sensitivity setting.
    // |value|: the pointer sensitivity setting index.
    static void setMouseSensitivity(long value);

    // Swap the primary mouse button for left click.
    // |right|: if set, swap the primary mouse button.
    static void setPrimaryButtonRight(boolean right);

    // Turn on/off reverse scrolling for mice.
    // |enabled|: if set, enable reverse scrolling.
    static void setMouseReverseScroll(boolean enabled);

    // Get visible notifications on the system.
    static void getVisibleNotifications(
        NotificationArrayCallback callback);

    // Remove all notifications.
    static void removeAllNotifications(
        VoidCallback callback);

    // Get ARC start time in ticks.
    static void getArcStartTime(
        ArcStartTimeCallback callback);

    // Get state of the ARC session.
    static void getArcState(
        ArcStateCallback callback);

    // Get state of the Play Store.
    static void getPlayStoreState(
        PlayStoreStateCallback callback);

    // Get list of available printers
    static void getPrinterList(
        PrinterArrayCallback callback);

    // Returns true if requested app is shown in Chrome.
    static void isAppShown(
        DOMString appId,
        IsAppShownCallback callback);

    // Returns true if ARC is provisioned.
    // [deprecated="Use getArcState()"]
    static void isArcProvisioned(
        IsArcProvisionedCallback callback);

    // Gets information about the requested ARC app.
    static void getArcApp(
        DOMString appId,
        GetArcAppCallback callback);

    // Gets counts of how many ARC apps have been killed, by priority.
    static void getArcAppKills(
        GetArcAppKillsCallback callback);

    // Gets information about requested ARC package.
    static void getArcPackage(
        DOMString packageName,
        GetArcPackageCallback callback);

    // Waits for system web apps to complete the installation.
    static void waitForSystemWebAppsInstall(
        VoidCallback callback);

    // Gets all the default pinned shelf app IDs, these may not be installed.
    static void getDefaultPinnedAppIds(
        GetDefaultPinnedAppIdsCallback callback);

    // Returns the number of system web apps that should be installed.
    static void getRegisteredSystemWebApps(
        GetRegisteredSystemWebAppsCallback callback);

    // Returns whether the system web app is currently open or not.
    static void isSystemWebAppOpen(
        DOMString appId,
        IsSystemWebAppOpenCallback callback);

    // Launches an application from the launcher with the given appId.
    static void launchApp(
        DOMString appId,
        VoidCallback callback);

    // Launches an system web app from the launcher with the given app name and
    // url.
    static void launchSystemWebApp(
        DOMString appName,
        DOMString url,
        VoidCallback callback);

    // Launches Files app directly to absolutePath, if the path does not
    // exist, it will launch to the default opening location (i.e. MyFiles).
    // If the supplied path is a file (and it exists) it will open Files app
    // to the parent folder instead.
    static void launchFilesAppToPath(
        DOMString absolutePath,
        VoidCallback callback);

    // Closes an application the given appId in case it was running.
    static void closeApp(
        DOMString appId,
        VoidCallback callback);

    // Update printer. Printer with empty ID is considered new.
    static void updatePrinter(Printer printer);

    // Remove printer.
    static void removePrinter(DOMString printerId);

    // Enable/disable the Play Store.
    // |enabled|: if set, enable the Play Store.
    // |callback|: Called when the operation has completed.
    static void setPlayStoreEnabled(
        boolean enabled,
        VoidCallback callback);

    // Get text from ui::Clipboard.
    // |callback|: Called with result.
    static void getClipboardTextData(
        DOMStringCallback callback);

    // Set text in ui::Clipbaord.
    // |callback|: Called when operation is complete.
    static void setClipboardTextData(
        DOMString data,
        VoidCallback callback);

    // Run the crostini installer GUI to install the default crostini
    // vm / container and create sshfs mount.  The installer launches the
    // crostini terminal app on completion.  The installer expects that
    // crostini is not already installed.
    // |callback|: Called when the operation has completed.
    static void runCrostiniInstaller(VoidCallback callback);

    // Run the crostini uninstaller GUI to remove the default crostini
    // vm / container. The callback is invoked upon completion.
    static void runCrostiniUninstaller(
        VoidCallback callback);

    // Enable/disable Crostini in preferences.
    // |enabled|: Enable Crostini.
    // |callback|: Called when the operation has completed.
    static void setCrostiniEnabled(
        boolean enabled,
        VoidCallback callback);

    // Export the crostini container.
    // |path|: The path in Downloads to save the export.
    // |callback|: Called when the operation has completed.
    static void exportCrostini(
        DOMString path,
        VoidCallback callback);

    // Import the crostini container.
    // |path|: The path in Downloads to read the import.
    // |callback|: Called when the operation has completed.
    static void importCrostini(
        DOMString path,
        VoidCallback callback);

    // Returns whether crostini could ever be allowed.
    // |callback|: Called with a boolean indicating if crostini can ever be
    // allowed in the current profile.
    static void couldAllowCrostini(
        CouldAllowCrostiniCallback callback);

    // Sets mock Plugin VM policy.
    // |imageUrl|: URL to the image to install.
    // |imageHash|: Hash for the provided image.
    // |licenseKey|: License key for Plugin VM.
    static void setPluginVMPolicy(DOMString imageUrl,
                                  DOMString imageHash,
                                  DOMString licenseKey);

    // Shows the Plugin VM installer. Does not start installation.
    static void showPluginVMInstaller();

    // Installs Borealis without showing the normal installer UI.
    // |callback|: Called when the operation has completed.
    static void installBorealis(VoidCallback callback);

    // Register a component with ComponentManagerAsh.
    // |name|: The name of the component.
    // |path|: Path to the component.
    static void registerComponent(DOMString name, DOMString path);

    // Takes a screenshot and returns the data in base64 encoded PNG format.
    static void takeScreenshot(
        TakeScreenshotCallback callback);

    // Tasks a screenshot for a display.
    // |display_id|: the display id of the display.
    // |callback|: called when the operation has completed.
    static void takeScreenshotForDisplay(
        DOMString display_id,
        TakeScreenshotCallback callback);

    // Triggers an on-demand update of smart dim component and checks whether
    // it's successfully loaded by smart dim ml_agent.
    // |callback|: Called when the operation has completed.
    static void loadSmartDimComponent(VoidCallback callback);

    // Enables/disables the Google Assistant.
    // |callback|: Called when the operation has completed.
    static void setAssistantEnabled(
        boolean enabled,
        long timeout_ms,
        VoidCallback callback);

    // Bring up the Assistant service, and wait for the ready signal.
    // |callback|: Called when the operation has completed.
    static void enableAssistantAndWaitForReady(
        VoidCallback callback);

    // Sends a text query via Google Assistant.
    // |callback|: Called when response has been received.
    static void sendAssistantTextQuery(
        DOMString query,
        long timeout_ms,
        AssistantQueryStatusCallback callback);

    // Invokes |callback| once the current text/voice interaction is completed.
    // Responds with the the query status if any valid response was caught
    // before the timeout. This API should be called before sending the query.
    // To use it for testing a voice query via OKG in Autotest, for example,
    // you can do:
    //
    //    // Enable hotword setting for Assistant.
    //    assistant_util.enable_hotword();
    //
    //    // Call this API with your callback function.
    //    chrome.autotestPrivate.waitForAssistantQueryStatus(timeout_s,
    //        function(status) {...});
    //
    // then start Assistant via OKG and send voice query before timeout.
    //
    // TODO(meilinw@): disable warmer welcome to avoid an unintended early
    // return of this API when launching Assistant via hotkey.
    // TODO(meilinw@): update the comment above to use Tast instead after
    // adding API to enable hotword in Tast.
    static void waitForAssistantQueryStatus(
        long timeout_s,
        AssistantQueryStatusCallback callback);

    // Whether the local list of installed ARC packages has been refreshed for
    // the first time after user login.
    static void isArcPackageListInitialRefreshed(
        IsArcPackageListInitialRefreshedCallback callback);

    // Set value for the specified user pref in the pref tree.
    static void setAllowedPref(
        DOMString pref_name,
        any value,
        VoidCallback callback);

    // Clears value for the specified user pref in the pref tree.
    static void clearAllowedPref(
        DOMString pref_name,
        VoidCallback callback);

    // DEPRECATED: use SetAllowedPref instead, see crbug/1262034
    // Set value for the specified user pref in the pref tree.
    static void setWhitelistedPref(
        DOMString pref_name,
        any value,
        VoidCallback callback);

    // Enable/disable a Crostini app's "scaled" property.
    // |appId|: The Crostini application ID.
    // |scaled|: The app is "scaled" when shown, which means it uses low display
    //           density.
    // |callback|: Called when the operation has completed.
    static void setCrostiniAppScaled(
        DOMString appId,
        boolean scaled,
        VoidCallback callback);

    // Get the primary display scale factor.
    // |callback| is invoked with the scale factor.
    static void getPrimaryDisplayScaleFactor(
        GetPrimaryDisplayScaleFactorCallback callback);

    // Get the tablet mode enabled status.
    // |callback| is invoked with the tablet mode enablement status.
    static void isTabletModeEnabled(
        IsTabletModeEnabledCallback callback);

    // Enable/disable tablet mode. After calling this function, it won't be
    // possible to physically switch to/from tablet mode since that
    // functionality will be disabled.
    // |enabled|: if set, enable tablet mode.
    // |callback|: Called when the operation has completed.
    static void setTabletModeEnabled(
        boolean enabled,
        SetTabletModeEnabledCallback callback);

    // Get the list of all installed applications
    static void getAllInstalledApps(
        GetAllInstalledAppsCallback callback);

    // Get the list of all shelf items
    static void getShelfItems(
        GetShelfItemsCallback callback);

    // Get the launcher search box search state.
    static void getLauncherSearchBoxState(
        GetLauncherSearchBoxStateCallback callback);

    // Get the shelf auto hide behavior.
    // |displayId|: display that contains the shelf.
    // |callback| is invoked with the shelf auto hide behavior. Possible
    // behavior values are: "always", "never" or "hidden".
    static void getShelfAutoHideBehavior(
        DOMString displayId,
        GetShelfAutoHideBehaviorCallback callback);

    // Set the shelf auto hide behavior.
    // |displayId|: display that contains the shelf.
    // |behavior|: an enum of "always", "never" or "hidden".
    // |callback|: Called when the operation has completed.
    static void setShelfAutoHideBehavior(
        DOMString displayId,
        DOMString behavior,
        VoidCallback callback);

    // Get the shelf alignment.
    // |displayId|: display that contains the shelf.
    // |callback| is invoked with the shelf alignment type.
    static void getShelfAlignment(
        DOMString displayId,
        GetShelfAlignmentCallback callback);

    // Set the shelf alignment.
    // |displayId|: display that contains the shelf.
    // |alignment|: the type of alignment to set.
    // |callback|: Called when the operation has completed.
    static void setShelfAlignment(
        DOMString displayId,
        ShelfAlignmentType alignment,
        VoidCallback callback);

    // Create a pin on shelf for the app specified by |appId|.
    // Deprecated. Use setShelfIconPin() instead.
    static void pinShelfIcon(
        DOMString appId,
        VoidCallback callback);

    // Update pin states of the shelf apps based on |updateParams|. Return a
    // list of app ids whose pin state changed. Pin states will not be changed
    // if the method fails.
    static void setShelfIconPin(
        ShelfIconPinUpdateParam[] updateParams,
        optional SetShelfIconPinCallback callback);

    // Enter or exit the overview mode.
    // |start|: whether entering to or exiting from the overview mode.
    // |callback|: called after the overview mode switch finishes.
    static void setOverviewModeState(
        boolean start,
        SetOverviewModeStateCallback callback);

    // Show virtual keyboard of the current input method if it's available.
    static void showVirtualKeyboardIfEnabled();

    // Sends the overlay color and theme to Android and changes the Android system color and theme to these values.
    // |color|: the int color of the system ui.
    // |theme|: the theme of the system ui.
    // |callback|: callback to deliver sendArcOverlayColor result.
    static void sendArcOverlayColor(
      long color, ThemeStyle theme, SendArcOverlayColorCallback callback);

    // Start ARC performance tracing for the active ARC app window.
    // |callback|: Called when the operation has completed.
    static void arcAppTracingStart(VoidCallback callback);

    // Stop ARC performance tracing if it was started and analyze results.
    // |callback|: callback to deliver tracing results.
    static void arcAppTracingStopAndAnalyze(
        ArcAppTracingCallback callback);

    // Swap the windows in the split view.
    // |callback|: Called when the operation has completed.
    static void swapWindowsInSplitView(
        VoidCallback callback);

    // Set ARC app window focused.
    // |packageName|: the package name of the ARC app window.
    // |callback|: called when the operation has completed.
    static void setArcAppWindowFocus(
        DOMString packageName,
        VoidCallback callback);

    // Invokes the callback when the display rotation animation is finished, or
    // invokes it immediately if it is not animating. The callback argument
    // is true if the display's rotation is same as |rotation|, or false otherwise.
    // |displayId|: display that contains the shelf.
    // |rotation|: the target rotation.
    // |callback|: called when the operation has completed.
    static void waitForDisplayRotation(
        DOMString displayId,
        RotationType rotation,
        WaitForDisplayRotationCallback callback);

    // Get information on all application windows. Callback will be called
    // with the list of |AppWindowInfo| dictionary.
    // |callback|: called with window list.
    static void getAppWindowList(
        GetAppWindowListCallback callback);

    // Send WM event to change the app window's window state.
    // |id|: the id of the window
    // |change|: WM event type to send to the app window.
    // |wait|: whether the method should wait for the window state to change before returning.
    // |callback|: called when the window state is changed if |wait| is true.
    //             Otherwise, called right after the WM event is sent.
    static void setAppWindowState(
        long id,
        WindowStateChangeDict change,
        optional boolean wait,
        WindowStateCallback callback);

    // Activate app window given by "id".
    // |id|: the id of the window
    // |callback|: called when the window is requested to activate.
    static void activateAppWindow(
        long id,
        VoidCallback callback);

    // Closes an app window given by "id".
    // |id|: the id of the window
    // |callback|: called when the window is requested to close.
    static void closeAppWindow(
        long id,
        VoidCallback callback);

    // Installs the Progressive Web App (PWA) that is in the current URL.
    // |timeout_ms|: Timeout in milliseconds for the operation to complete.
    // |callback|: called when the operation has completed. Passes the app Id
    //             of the recently installed PWA as argument.
    static void installPWAForCurrentURL(
        long timeout_ms,
        InstallPWAForCurrentURLCallback callback);

    // Activates shortcut.
    // |accelerator|: the accelerator to activate.
    // |callback|: called when the operation has completed.
    static void activateAccelerator(
        Accelerator accelerator,
        AcceleratorCallback callback);

    // Wwait until the launcher is transitionto the |launcherState|, if it's not
    // in that state.
    // |launcherState|: the target launcher state.
    // |callback|: called when the operation has completed.
    static void waitForLauncherState(
        LauncherStateType launcherState,
        VoidCallback callback);

    // Wait until overview has transitioned to |overviewState|, if it is not in
    // that state.
    // |overviewState|: the target overview state.
    // |callback|: called when overview has reached |overviewState|.
    static void waitForOverviewState(
        OverviewStateType overviewState,
        VoidCallback callback);

    // Creates a new desk if the maximum number of desks has not been reached.
    // |callback|: called to indicate success or failure.
    static void createNewDesk(DesksCallback callback);

    // Activates the desk at the given |index| triggering the activate-desk
    // animation.
    // |index|: the zero-based index of the desk desired to be activated.
    // |callback|: called indicating success when the animation completes, or
    // failure when the desk at |index| is already the active desk.
    static void activateDeskAtIndex(
        long index,
        DesksCallback callback);

    // Removes the currently active desk and triggers the remove-desk animation.
    // |callback|: called indicating success when the animation completes, or
    // failure if the currently active desk is the last available desk which
    // cannot be removed.
    static void removeActiveDesk(DesksCallback callback);

    // Activates the desk at the given |index| by chaining multiple
    // activate-desk animations.
    // |index|: the zero-based index of the desk desired to be activated.
    // |callback|: called indicating success when the animation completes, or
    // failure when the desk at |index| is already the active desk.
    static void activateAdjacentDesksToTargetIndex(
        long index,
        DesksCallback callback);

    // Fetches the number of open desks in the `DesksController` at the time of
    // call.
    // `callback`: callback that is passed the number of open desks.
    static void getDeskCount(
        GetDeskCountCallback callback);

    // Fetches info about the open desks at the time of the call.
    // `callback`: callback that is passed desks information.
    static void getDesksInfo(
        GetDesksInfoCallback callback);

    // Create mouse events to cause a mouse click.
    // |button|: the mouse button for the click event.
    // |callback|: called after the mouse click finishes.
    static void mouseClick(
        MouseButton button,
        VoidCallback callback);

    // Create a mouse event to cause mouse pressing. The mouse button stays
    // in the pressed state.
    // |button|: the mouse button to be pressed.
    // |callback|: called after the mouse pressed event is handled.
    static void mousePress(
        MouseButton button,
        VoidCallback callback);

    // Create a mouse event to release a mouse button. This does nothing and
    // returns immediately if the specified button is not pressed.
    // |button|: the mouse button to be released.
    // |callback|: called after the mouse is released.
    static void mouseRelease(
        MouseButton button,
        VoidCallback callback);

    // Create mouse events to move a mouse cursor to the location. This can
    // cause a dragging if a button is pressed. It starts from the last mouse
    // location.
    // |location|: the target location (in screen coordinate).
    // |duration_in_ms|: the duration (in milliseconds) for the mouse movement.
    //    The mouse will move linearly. 0 means moving immediately.
    // |callback|: called after the mouse move finishes.
    static void mouseMove(
        Location location,
        double duration_in_ms,
        VoidCallback callback);

    // Enable/disable metrics reporting in preferences.
    // |enabled|: Enable metrics reporting.
    // |callback|: Called when the operation has completed.
    static void setMetricsEnabled(
        boolean enabled,
        VoidCallback callback);

    // Sends ARC touch mode enabled or disabled.
    // |enable|: whether enabled touch mode.
    // |callback|: called when action performed.
    static void setArcTouchMode(
        boolean enabled,
        VoidCallback callback);

    // Fetches ui information of scrollable shelf view for the given shelf
    // state. This function does not change scrollable shelf.
    // [deprecated="Use getShelfUIInfoForState()"]
    static void getScrollableShelfInfoForState(
        ScrollableShelfState state,
        GetScrollableShelfInfoForStateCallback callback);

    // Fetches UI information of shelf (including scrollable shelf and hotseat)
    // for the given shelf state. This function does not change any shelf
    // component.
    static void getShelfUIInfoForState(
        ShelfState state,
        GetShelfUIInfoForStateCallback callback);

    // Sends a WM event to change a window's bounds and/or the display it is on.
    // |id|: the id of the window.
    // |bounds|: bounds the window should be set to.
    // |displayId|: id of display to move the window to.
    // |callback|: called when the window bounds are changed.
    static void setWindowBounds(
        long id,
        Bounds bounds,
        DOMString displayId,
        WindowBoundsCallback callback);

    // Starts smoothness tracking for a display. If the display id is not
    // specified, the primary display is used. Otherwise, the display specified
    // by the display id is used. If `throughputIntervalMs` is not specified,
    // default 5 seconds interval is used to collect throughput data.
    static void startSmoothnessTracking(
        optional DOMString displayId,
        optional long throughputIntervalMs,
        VoidCallback callback);

    // Stops smoothness tracking for a display and report the smoothness. If
    // the display id is not specified, the primary display is used. Otherwise,
    // the display specified by the display id is used.
    static void stopSmoothnessTracking(
        optional DOMString displayId,
        StopSmoothnessTrackingCallback callback);

    // When neccesary, disables showing the dialog when Switch Access is disabled.
    static void disableSwitchAccessDialog();

    // Waits for the completion of photo transition animation in ambient mode.
    // |numCompletions|: number of completions of the animation.
    // |timeout|: the timeout in seconds.
    // |callback|: Called when the operation has completed.
    static void waitForAmbientPhotoAnimation(
        long numCompletions,
        long timeout,
        VoidCallback callback);

    // Waits for ambient video to successfully start playback.
    // |timeout|: the timeout in seconds.
    // |callback|: Called when the operation has completed.
    static void waitForAmbientVideo(
        long timeout,
        VoidCallback callback);

    // Disables the automation feature. Note that the event handlers and caches
    // of automation nodes still remain in the test extension and so the next
    // automation.getDesktop will miss initialization. The caller should ensure
    // invalidation of those information (i.e. reloading the entire background
    // page).
    static void disableAutomation(VoidCallback callback);

    // Starts to ui::ThroughputTracker data collection for tracked animations.
    static void startThroughputTrackerDataCollection(
        VoidCallback callback);

    // Stops ui::ThroughputTracker data collection and reports the collected
    // data since the start or the last GetThroughtputTrackerData call.
    static void stopThroughputTrackerDataCollection(
        StopThroughputTrackerDataCollectionCallback callback);

    // Reports the currently collected animation data.
    static void getThroughputTrackerData(
        GetThroughtputTrackerDataCallback callback);

    // Gets the smoothness of a display. If the display id is not specified,
    // the primary display is used.
    static void getDisplaySmoothness(
        optional DOMString displayId,
        GetDisplaySmoothnessCallback callback);

    // Resets the holding space by removing all items and clearing the prefs.
    static void resetHoldingSpace(
        optional ResetHoldingSpaceOptions options,
        VoidCallback callback);

    // Starts collection of ui::LoginEventRecorder data.
    static void startLoginEventRecorderDataCollection(
        VoidCallback callback);

    // Stops ui::LoginEventRecorder data collection and reports all the
    // collected data.
    static void getLoginEventRecorderLoginEvents(
        GetLoginEventRecorderLoginEventsCallback callback);

    // Adds login event to test LoginEventRecorderDataCollection API.
    static void addLoginEventForTesting(
        VoidCallback callback);

    // Force auto theme mode in dark mode or light mode for testing.
    static void forceAutoThemeMode(boolean darkModeEnabled, VoidCallback callback);

    // Fetches an access token from Chrome.
    static void getAccessToken(
        GetAccessTokenParams accessTokenParams,
        GetAccessTokenCallback callback);

    // Returns whether the current input method is ready to accept key events.
    static void isInputMethodReadyForTesting(
        IsInputMethodReadyForTestingCallback callback);

    // Creates a temporary directory visible under the Fusebox mount point.
    static void makeFuseboxTempDir(
        MakeFuseboxTempDirCallback callback);

    // Removes a temporary directory visible under the Fusebox mount point. The
    // fuseboxFilePath argument was returned by the MakeFuseboxTempDirCallback.
    static void removeFuseboxTempDir(
        DOMString fuseboxFilePath,
        RemoveFuseboxTempDirCallback callback);

    // Remove the specified component extension.
    static void removeComponentExtension(
        DOMString extensionId, VoidCallback callback);

    // Starts frame counting in viz. `bucketSizeInSeconds` decides the bucket
    // size of the frame count records. If it is X seconds, each record is
    // the number of presented frames in X seconds.
    static void startFrameCounting(
        long bucketSizeInSeconds,
        VoidCallback callback);

    // Ends frame counting in viz and return the collected data.
    static void stopFrameCounting(
        StopFrameCountingCallback  callback);

    // Starts overdraw tracking for the display associated with
    // `displayId` in viz. `bucketSizeInSeconds` decides the bucket size
    // of the overdraw records.
    // If it is X seconds, each record is the average overdraw of the
    // frames presented on the display in X seconds.
    static void startOverdrawTracking(
      long bucketSizeInSeconds,
      optional DOMString displayId,
      VoidCallback callback
    );

    // Ends overdraw tracking in viz and return the collected data.
    static void stopOverdrawTracking(
      optional DOMString displayId,
      StopOverdrawTrackingCallback callback
    );

    // Install a bruschetta VM.
    static void installBruschetta(
      DOMString vm_name, VoidCallback callback);

    // Delete a bruschetta VM.
    static void removeBruschetta(
      DOMString vm_name, VoidCallback callback);

    // Returns whether a base::Feature is enabled. The state may change because
    // a Chrome uprev into ChromeOS changed the default feature state.
    static void isFeatureEnabled(
      DOMString feature_name, IsFeatureEnabledCallback callback);

    // Returns keyboard layout used for current input method.
    static void getCurrentInputMethodDescriptor(
        GetCurrentInputMethodDescriptorCallback callback);

    // Overrides the response from Lobster Fetcher and returns the boolean value
    // that indicates if the overriding is successful or not.
    static void overrideLobsterResponseForTesting(
        OverrideLobsterResponseForTestingCallback callback);

    // Overrides the response from Orca Provider and returns the boolean value
    // that indicates if the overriding is successful or not.
    static void overrideOrcaResponseForTesting(
        OrcaResponseArray array,
        OverrideOrcaResponseForTestingCallback callback);

    // Overrides the response from Scanner Provider and returns the boolean
    // value that indicates if the overriding is successful or not.
    static void overrideScannerResponsesForTesting(
        ScannerResponseArray array,
        OverrideScannerResponsesForTestingCallback callback);

    // ARC set interactive enable/disable state.
    // |enabled|: Enable ARC interactive.
    // |callback|: Called when the operation sent to ARC by mojo.
    static void setArcInteractiveState(
      boolean enabled, VoidCallback callback);

    // Returns whether a field trial exists and has been activated.
    static void isFieldTrialActive(
        DOMString trial_name,
        DOMString group_name,
        IsFieldTrialActiveCallback callback);

    // ARC get wakefulness mode.
    static void getArcWakefulnessMode(
      WakefulnessModeCallback callback);

    // Sets the default device language.
    // A restart is required for this change to take effect.
    // |value|: the locale of the language.
    static void setDeviceLanguage(DOMString locale, VoidCallback callback);

    // Gets the chrome://device-log entries for a given type or all types.
    // |type|: A string like "printer" to fetch a specific type, or an empty
    // string to fetch all entries.
    // |callback|: Called with the logs as a single string.
    static void getDeviceEventLog(DOMString type, DOMStringCallback callback);
  };

  interface Events {
    // Fired when the data in ui::Clipboard is changed.
    static void onClipboardDataChanged();
  };
};