File: chrome_track_event.proto

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (2694 lines) | stat: -rw-r--r-- 95,695 bytes parent folder | download | duplicates (4)
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
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

import public "protos/perfetto/trace/track_event/track_event.proto";
import public "protos/perfetto/trace/track_event/debug_annotation.proto";
import public "protos/perfetto/trace/track_event/source_location.proto";

package perfetto.protos;

enum ChromeAppState {
  APP_STATE_FOREGROUND = 1;
  APP_STATE_BACKGROUND = 2;
}

enum MemoryPressureLevel {
  MEMORY_PRESSURE_LEVEL_NONE = 0;
  MEMORY_PRESSURE_LEVEL_MODERATE = 1;
  MEMORY_PRESSURE_LEVEL_CRITICAL = 2;
}

message ChromeMemoryPressureNotification {
  optional MemoryPressureLevel level = 1;

  // ID of interned source location where MemoryPressureListener was created
  optional uint64 creation_location_iid = 2;
}

message BlinkTaskScope {
  enum TaskScopeType {
    TASK_SCOPE_UNKNOWN = 0;
    TASK_SCOPE_CALLBACK = 1;
    TASK_SCOPE_SCHEDULED_ACTION = 2;
    TASK_SCOPE_SCRIPT_EXECUTION = 3;
    TASK_SCOPE_POST_MESSAGE = 4;
    TASK_SCOPE_POP_STATE = 5;
    TASK_SCOPE_SCHEDULER_POST_TASK = 6;
    TASK_SCOPE_REQUEST_IDLE_CALLBACK = 7;
    TASK_SCOPE_XML_HTTP_REQUEST = 8;
    TASK_SCOPE_SOFT_NAVIGATION = 9;
  }
  optional TaskScopeType type = 1;
  optional int64 scope_task_id = 2;
  optional int64 running_task_id_to_be_restored = 3;

  reserved 4, 5;
  reserved "continuation_task_id_to_be_restored", "parent_task_id";
}

message ChromeTaskAnnotator {
  enum DelayPolicy {
    FLEXIBLE_NO_SOONER = 0;
    FLEXIBLE_PREFER_EARLY = 1;
    PRECISE = 2;
  }
  optional uint32 ipc_hash = 1;
  // The delay in microseconds that was specified, if any, when this task was
  // posted. This is only valid for delayed tasks.
  optional uint64 task_delay_us = 2;
  optional DelayPolicy delay_policy = 3;
}

message ChromeBrowserContext {
  reserved 1;
  optional string id = 2;
}

message ChromeProfileDestroyer {
  optional fixed64 profile_ptr = 1;
  optional bool is_off_the_record = 2;
  optional string otr_profile_id = 3;
  optional uint32 host_count_at_creation = 4;
  optional uint32 host_count_at_destruction = 5;
  optional fixed64 render_process_host_ptr = 6;
}

message ChromeTaskPostedToDisabledQueue {
  optional string task_queue_name = 1;
  optional uint64 time_since_disabled_ms = 2;
  optional uint32 ipc_hash = 3;
  optional uint64 source_location_iid = 4;
}

message ChromeRasterTask {
  optional int64 source_frame_number = 1;
}

message ChromeMessagePumpForUI {
  // The MSG defined in winuser.h.
  optional uint32 message_id = 1;
  // The result of the Win32 API call WaitForMultipleObjectsEx().
  optional uint32 wait_for_object_result = 2;
}

// An enumeration specifying the reason of the RenderFrame deletion.
// This is copied from content/common/frame.mojom.
enum FrameDeleteIntention {
  // The frame being deleted isn't a (speculative) main frame.
  FRAME_DELETE_INTENTION_NOT_MAIN_FRAME = 0;

  // The frame being deleted is a speculative main frame, and it is being
  // deleted as part of the shutdown for that WebContents. The entire RenderView
  // etc will be destroyed by a separate IPC sent later.
  FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_SHUTDOWN = 1;

  // The frame being deleted is a speculative main frame, and it is being
  // deleted because the speculative navigation was cancelled. This is not part
  // of shutdown.
  FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_NAVIGATION_CANCELLED = 2;
}

message RenderFrameImplDeletion {
  // The intent for the deletion.
  optional FrameDeleteIntention intent = 1;

  // Whether the frame that's about to be deleted has a pending navigation
  // commit.
  optional bool has_pending_commit = 2;

  // Whether the frame that's about to be deleted has a pending cross-document
  // navigation commit.
  optional bool has_pending_cross_document_commit = 3;

  // The FrameTreeNode ID of the frame that's about to be deleted.
  optional uint64 frame_tree_node_id = 4;
}

// Corresponds to `content::ShouldSwapBrowsingInstance`.
// Note that the enum values here are not equivalent to the content enum and
// must be converted explicitly. See `ShouldSwapBrowsingInstanceToProto`.
enum ShouldSwapBrowsingInstance {
  // Was used for all "no BrowsingInstance swap" scenarios, now broken down in
  // separate reasons.
  SHOULD_SWAP_BROWSING_INSTANCE_NO = 0;

  // Forced BrowsingInstance swap.
  SHOULD_SWAP_BROWSING_INSTANCE_YES_FORCE_SWAP = 1;

  // Proactive BrowsingInstance swap for cross-site navigation.
  SHOULD_SWAP_BROWSING_INSTANCE_YES_CROSS_SITE_PROACTIVE_SWAP = 2;

  // Proactive BrowsingInstance swap for same-site navigation.
  SHOULD_SWAP_BROWSING_INSTANCE_YES_SAME_SITE_PROACTIVE_SWAP = 3;

  SHOULD_SWAP_BROWSING_INSTANCE_NO_PROACTIVE_SWAP_DISABLED = 4;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_MAIN_FRAME = 5;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_HAS_RELATED_ACTIVE_CONTENTS = 6;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_DOES_NOT_HAVE_SITE = 7;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_SOURCE_URL_SCHEME_NOT_HTTP_OR_HTTPS = 8;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_DESTINATION_URL_SCHEME_NOT_HTTP_OR_HTTPS = 9;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_SITE_NAVIGATION = 10;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_RELOADING_ERROR_PAGE = 11;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_ALREADY_HAS_MATCHING_BROWSING_INSTANCE = 12;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_RENDERER_DEBUG_URL = 13;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_NEEDED_FOR_BACK_FORWARD_CACHE = 14;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_DOCUMENT_NAVIGATION = 15;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_URL_NAVIGATION = 16;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_WILL_REPLACE_ENTRY = 17;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_RELOAD = 18;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_GUEST = 19;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_HAS_NOT_COMMITTED_ANY_NAVIGATION = 20;
  // The following reason was deprecated from https://crrev.com/c/3858766
  SHOULD_SWAP_BROWSING_INSTANCE_NO_UNLOAD_HANDLER_EXISTS_ON_SAME_SITE_NAVIGATION =
      21;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_PRIMARY_MAIN_FRAME = 22;
  SHOULD_SWAP_BROWSING_INSTANCE_NO_INITIATOR_REQUESTED_NO_PROACTIVE_SWAP = 23;
}

message ShouldSwapBrowsingInstancesResult {
  // The FrameTreeNode ID.
  optional uint64 frame_tree_node_id = 1;

  // Whether a navigation will do a BrowsingInstance swap or not.
  optional ShouldSwapBrowsingInstance result = 2;
}

message FrameTreeNodeInfo {
  // The FrameTreeNode ID.
  optional uint64 frame_tree_node_id = 1;

  // Whether the frame is a main frame or not.
  optional bool is_main_frame = 2;

  // Whether there's a speculative RenderFrameHost or not.
  optional bool has_speculative_render_frame_host = 3;

  optional RenderFrameHost current_frame_host = 4;
  optional RenderFrameHost speculative_frame_host = 5;

  // NOTE: this proto must be kept consistent with
  // content::FrameType.
  enum FrameType {
    UNSPECIFIED_FRAME_TYPE = 0;
    SUBFRAME = 1;
    PRIMARY_MAIN_FRAME = 2;
    PRERENDER_MAIN_FRAME = 3;
    FENCED_FRAME_ROOT = 4;
  }

  optional FrameType frame_type = 6;

  // Additional untyped debug information associated with this
  // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message ChromeHashedPerformanceMark {
  optional uint32 site_hash = 1;
  optional string site = 2;
  optional uint32 mark_hash = 3;
  optional string mark = 4;

  // A randomly generated unique identifier for a given ExecutionContext
  // (document, worker, etc). Used to be able to correlate events in a process
  // where there are multiple execution contexts from the same site.
  optional uint32 execution_context_id = 5;

  // Indicates the sequence number of this particular mark being emitted from
  // a particular site in the scope of a single ExecutionContext. Typical
  // sites emit batches of events that are correlated in time (a thing started,
  // a thing reached a given milestone, a thing completed). When these events
  // are intermixed it is useful to know which ones are semantically related.
  // The value is generated by the content itself, but shifted by a fixed
  // random offset at runtime so as to limit usage as a side channel.
  optional uint32 sequence_number = 6;
}

// Sent on SQL errors where we need string diagnostics. Corresponds to
// `Database::DatabaseDiagnostics` in the Chrome SQL code. Does not contain any
// PII, because the bound values are not included in the SQL statement.
message ChromeSqlDiagnostics {
  optional int32 reported_sqlite_error_code = 1;
  optional int32 error_code = 2;
  optional int32 last_errno = 3;
  optional string sql_statement = 4;
  optional int32 version = 5;

  // Most rows in 'sql_schema' have a non-NULL 'sql' column. Those rows' 'sql'
  // contents are logged here, one element per row.
  repeated string schema_sql_rows = 6;

  // Some rows of 'sql_schema' have a NULL 'sql' column. They are typically
  // autogenerated indices, like "sqlite_autoindex_downloads_slices_1". These
  // are also logged here by their 'name' column, one element per row.
  repeated string schema_other_row_names = 7;

  optional bool has_valid_header = 8;
  optional bool has_valid_schema = 9;
  optional string error_message = 10;
}

message ChromeWebAppBadNavigate {
  optional bool is_kiosk = 1;
  optional bool has_hosted_app_controller = 2;
  optional string app_name = 3;
  optional uint32 system_app_type = 4;
  optional bool web_app_provider_registry_ready = 5;
  optional bool system_web_app_manager_synchronized = 6;
}

// These IDs are generated at compile time and differ for each chrome version.
// IDs are stable on for a given chrome version but are changing when resources
// are added or removed to chrome.
message ResourceBundle {
  optional uint32 resource_id = 1;
}

// Information about RenderProcessHost.
message RenderProcessHost {
  // Unique Id to identify the RenderProcessHost. This is the browser-side,
  // persistent id for this RenderProcessHost that stays constant even across OS
  // layer processes managed by this RenderProcessHost.
  optional uint32 id = 1;
  // See ProcessLock::ToString().
  optional string process_lock = 2;
  // The PID of the child process.
  optional int32 child_process_id = 3;

  // Details about the associated browser context.
  optional ChromeBrowserContext browser_context = 4;

  // Additional untyped debug information associated with this
  // RenderProcessHost, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message RenderProcessHostListener {
  // Routing ID of the listener to the RenderProcessHost, recorded when a new ID
  // is added or when an ID is removed.
  optional uint32 routing_id = 1;
}

message RenderProcessHostCleanup {
  // Number of IPC listeners registered to the host when Cleanup() was called.
  optional uint32 listener_count = 1;
  // Number of "keep alive" references active in the RenderProcessHost, recorded
  // when Cleanup() was called.
  optional uint32 keep_alive_ref_count = 2;
  // Number of "shutdown delay" references active in the RenderProcessHost,
  // recorded when Cleanup() was called.
  optional uint32 shutdown_delay_ref_count = 3;
  // Number of "worker delay" references active in the RenderProcessHost,
  // recorded when Cleanup() was called.
  optional uint32 worker_ref_count = 4;
  // Number of "pending reuse" references active in the RenderProcessHost,
  // recorded when Cleanup() was called.
  optional uint32 pending_reuse_ref_count = 5;
  // Number of NavigationStateKeepAlive references active in the
  // RenderProcessHost, recorded when Cleanup() was called.
  optional uint32 navigation_state_keepalive_count = 6;
}

message ChildProcessLauncherPriority {
  // True if the new priority set to background.
  optional bool is_backgrounded = 1;
  // True if the renderer proecss has pending views.
  optional bool has_pending_views = 2;

  // Importance of the child process in Android.
  enum Importance {
    IMPORTANCE_NORMAL = 1;
    IMPORTANCE_MODERATE = 2;
    IMPORTANCE_IMPORTANT = 3;
    IMPORTANCE_PERCEPTIBLE = 4;
  }
  optional Importance importance = 3;
}

// Information that identifies a Chrome Extension.
message ChromeExtensionId {
  // Unique id that identifies a Chrome Extension.
  optional string extension_id = 1;

  // Pseudonymized `extension_id` field (see also
  // content::PseudonymizationUtil::PseudonymizeString method).
  optional uint32 pseudonymized_extension_id = 2;
}

message SiteInstance {
  // The ID of the SiteInstance.
  optional int32 site_instance_id = 1;

  // The ID of the BrowsingInstance that the SiteInstance belongs to.
  optional int32 browsing_instance_id = 2;

  // Whether the SiteInstance is the "default SiteInstance" or not. Non-isolated
  // sites on Android are not assigned to their own specific per-site process,
  // and shares SiteInstances with each other (the default SiteInstance).
  optional bool is_default = 3;

  // Whether this SiteInstance has a running process associated with it.
  optional bool has_process = 4;

  // Returns the total active WebContents count for this SiteInstance and all
  // related SiteInstances in the same BrowsingInstance.
  optional int32 related_active_contents_count = 5;

  // The number of active RenderFrameHosts this SiteInstance's SiteInstanceGroup
  // has.
  optional int32 active_rfh_count = 6;

  // The SiteInstanceGroup this SiteInstance belongs to.
  optional SiteInstanceGroup site_instance_group = 7;

  // Additional untyped debug information associated with this
  // SiteInstance, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message SiteInstanceGroup {
  // The ID of the SiteInstanceGroup.
  optional int32 site_instance_group_id = 1;

  // The number of active frames in this SiteInstanceGroup.
  optional int32 active_frame_count = 2;

  // The process ID of the SiteInstanceGroup.
  optional RenderProcessHost process = 3;

  // Additional untyped debug information associated with this
  // SiteInstanceGroup, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

// Describes the CrossOriginIsolated state of a page. See the definition of
// WebExposedIsolationInfo for more information.
message WebExposedIsolationInfo {
  optional bool is_isolated = 1;
  optional string origin = 2;
  optional bool is_isolated_application = 3;
}

// Contains the URL and some additional information necessary to pick a
// SiteInstance and process during a navigation. See the definition of UrlInfo
// for more information about individual fields.
message UrlInfo {
  optional string url = 1;
  optional string origin = 2;
  optional bool is_sandboxed = 3;
  optional bool is_pdf = 4;
  optional bool is_coop_isolation_requested = 5;
  optional int32 origin_isolation_request = 6;
  optional bool is_prefetch_with_cross_site_contamination = 7;
  optional WebExposedIsolationInfo web_exposed_isolation_info = 8;
  optional string storage_partition_config = 9;
}

// Next ID: 7
message RenderViewHost {
  // The RenderViewHostMapId for the RenderViewHost.
  optional int32 rvh_map_id = 1;

  // The routing ID for the RenderViewHost.
  optional int32 routing_id = 2;

  // The process ID of the RenderViewHost. Deprecated in favour of |process|.
  optional int32 process_id = 3;

  // Process this RenderViewHost is associated with.
  optional RenderProcessHost process = 6;

  // Whether the RenderViewHost is in back/forward cache or not.
  optional bool is_in_back_forward_cache = 4;

  // Whether the renderer-side RenderView is created.
  optional bool renderer_view_created = 5;

  // Additional untyped debug information associated with this
  // RenderViewHost, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message RenderFrameProxyHost {
  // The routing ID for the RenderFrameProxyHost.
  optional int32 routing_id = 1;

  // The process ID of the RenderFrameProxyHost.
  optional int32 process_id = 2;

  // The RenderViewHostMapId of the RenderViewHost associated with the
  // RenderFrameProxyHost.
  optional int32 rvh_map_id = 3;

  // The SiteInstanceId of the SiteInstance associated with the
  // RenderFrameProxyHost.
  optional int32 site_instance_id = 4;

  // Whether the renderer-side RenderFrameProxy is live or not.
  optional bool is_render_frame_proxy_live = 5;

  // The SiteInstanceGroupId of the SiteInstanceGroup associated with the
  // RenderFrameProxyHost.
  optional int32 site_instance_group_id = 6;

  // Additional untyped debug information associated with this
  // RenderFrameProxyHost, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message AndroidView {
  optional int32 id = 1;
  optional int32 parent_id = 2;
  optional bool is_shown = 3;
  optional bool is_dirty = 4;
  optional string class_name = 5;
  optional string resource_name = 6;
}

message AndroidActivity {
  optional string name = 1;
  repeated AndroidView view = 2;
}

message AndroidViewDump {
  repeated AndroidActivity activity = 1;
}

message ParkableStringCompressInBackground {
  // The size of the string that is being compressed, in bytes.
  optional int32 size_bytes = 1;
}

message ParkableStringUnpark {
  // The size of the string that is being unparked, in bytes.
  optional int32 size_bytes = 1;

  // The elapsed time since the string was written to disk (in seconds), or -1
  // if it hadn't yet been written to disk.
  optional int32 time_since_last_disk_write_sec = 2;
}

message ChromeSamplingProfilerSampleCollected {
  optional int32 frame_count = 1;

  enum WriteStatus {
    WRITE_STATUS_NONE = 0;
    WRITE_STATUS_BUFFERING_SAMPLE = 1;
    WRITE_STATUS_WRITING_BUFFERED = 2;
    WRITE_STATUS_WRITING_TO_TRACE = 3;
  }
  optional WriteStatus write_status = 2;

  optional int32 sampled_thread_id = 3;
}

// Reports the latency caused by each breakdown in the
// SendBeginMainFrameToCommit stage of the PipelineReporter.
message SendBeginMainFrameToCommitBreakdown {
  // Handle input events breakdown
  optional uint64 handle_input_events_us = 1;

  // Animate breakdown
  optional uint64 animate_us = 2;

  // Style update breakdown
  optional uint64 style_update_us = 3;

  // Layout update breakdown
  optional uint64 layout_update_us = 4;

  // Accessibility update breakdown
  optional uint64 accessibility_update_us = 12;

  // Prepaint breakdown
  optional uint64 prepaint_us = 5;

  // Compositing inputs breakdown
  optional uint64 compositing_inputs_us = 6;

  // Compositing assignments breakdown
  optional uint64 compositing_assignments_us = 7;

  // Paint breakdown
  optional uint64 paint_us = 8;

  // Composite commit breakdown
  optional uint64 composite_commit_us = 9;

  // Update layers breakdown
  optional uint64 update_layers_us = 10;

  // Beginmainsenttostarted breakdown
  optional uint64 begin_main_sent_to_started_us = 11;
}

message GlobalRenderFrameHostId {
  optional int32 routing_id = 1;
  optional int32 process_id = 2;
}

message BrowsingContextState {
  // The ID of the BrowsingInstance that the BrowsingContextState belongs to.
  optional int32 browsing_instance_id = 1;

  // The ID of the CoopRelatedGroup that the BrowsingContextState belongs to.
  optional int32 coop_related_group_id = 2 [deprecated = true];

  // The token of the CoopRelatedGroup that the BrowsingContextState belongs to.
  optional string coop_related_group_token = 3;

  // Additional untyped debug information associated with this
  // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message RenderFrameHost {
  optional RenderProcessHost process = 1;
  optional GlobalRenderFrameHostId render_frame_host_id = 2;

  // NOTE: this proto must be kept consistent with
  // RenderFrameHostImpl::LifecycleStateImpl.
  enum LifecycleState {
    UNSPECIFIED = 0;
    SPECULATIVE = 1;
    PENDING_COMMIT = 2;
    PRERENDERING = 3;
    ACTIVE = 4;
    IN_BACK_FORWARD_CACHE = 5;
    RUNNING_UNLOAD_HANDLERS = 6;
    READY_TO_BE_DELETED = 7;
  }

  optional LifecycleState lifecycle_state = 3;
  optional string origin = 4;
  optional string url = 5;
  optional uint64 frame_tree_node_id = 6;
  optional SiteInstance site_instance = 7;
  optional RenderFrameHost parent = 8;
  optional RenderFrameHost outer_document = 9;
  optional RenderFrameHost embedder = 10;
  optional BrowsingContextState browsing_context_state = 11;
  optional FrameTreeNodeInfo.FrameType frame_type = 12;

  // Additional untyped debug information associated with this
  // RenderViewHost, populated via TracedProto::AddDebugAnnotations API.
  repeated DebugAnnotation debug_annotations = 99;
}

message ChromeThreadPoolTask {
  enum Priority {
    PRIORITY_UNSPECIFIED = 0;
    PRIORITY_BEST_EFFORT = 1;
    PRIORITY_USER_VISIBLE = 2;
    PRIORITY_USER_BLOCKING = 3;
  }

  enum ExecutionMode {
    EXECTUION_MODE_UNSPECIFIED = 0;
    EXECUTION_MODE_PARALLEL = 1;
    EXECUTION_MODE_SEQUENCED = 2;
    EXECUTION_MODE_SINGLE_THREAD = 3;
    EXECUTION_MODE_JOB = 4;
  }

  enum ShutdownBehavior {
    SHUTDOWN_BEHAVIOR_UNSPECIFIED = 0;
    SHUTDOWN_BEHAVIOR_CONTINUE_ON_SHUTDOWN = 1;
    SHUTDOWN_BEHAVIOR_SKIP_ON_SHUTDOWN = 2;
    SHUTDOWN_BEHAVIOR_BLOCK_SHUTDOWN = 3;
  }

  optional Priority task_priority = 1;
  optional ExecutionMode execution_mode = 2;
  optional int64 sequence_token = 3;
  optional ShutdownBehavior shutdown_behavior = 4;
}

// TODO(crbug.com/40797026): Add more information.
message BackForwardCacheCanStoreDocumentResult {
  enum BackForwardCacheNotRestoredReason {
    NOT_MAIN_FRAME = 1;
    // BackForwardCache is disabled due to low memory device, base::Feature or
    // command line. Note that the more specific NotRestoredReasons
    // BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY and
    // BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE will also be set as other
    // reasons along with this when appropriate.
    BACK_FORWARD_CACHE_DISABLED = 2;
    RELATED_ACTIVE_CONTENTS_EXIST = 3;
    HTTP_STATUS_NOT_OK = 4;
    SCHEME_NOT_HTTP_OR_HTTPS = 5;
    LOADING = 6;
    WAS_GRANTED_MEDIA_ACCESS = 7;
    BLOCKLISTED_FEATURES = 8;
    DISABLE_FOR_RENDER_FRAME_HOST_CALLED = 9;
    DOMAIN_NOT_ALLOWED = 10;
    HTTP_METHOD_NOT_GET = 11;
    SUBFRAME_IS_NAVIGATING = 12;
    TIMEOUT = 13;
    CACHE_LIMIT = 14;
    JAVASCRIPT_EXECUTION = 15;
    RENDERER_PROCESS_KILLED = 16;
    RENDERER_PROCESS_CRASHED = 17;
    GRANTED_MEDIA_STREAM_ACCESS = 19;
    SCHEDULER_TRACKED_FEATURE_USED = 20;
    CONFLICTING_BROWSING_INSTANCE = 21;
    CACHE_FLUSHED = 22;
    SERVICE_WORKER_VERSION_ACTIVATION = 23;
    SESSION_RESTORED = 24;
    UNKNOWN = 25;
    SERVICE_WORKER_POST_MESSAGE = 26;
    ENTERED_BACK_FORWARD_CACHE_BEFORE_SERVICE_WORKER_HOST_ADDED = 27;
    NOT_MOST_RECENT_NAVIGATION_ENTRY = 28;
    SERVICE_WORKER_CLAIM = 29;
    IGNORE_EVENT_AND_EVICT = 30;
    HAVE_INNER_CONTENTS = 31;
    TIMEOUT_PUTTING_IN_CACHE = 32;
    // BackForwardCache is disabled due to low memory device.
    BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY = 33;
    // BackForwardCache is disabled due to command-line switch (may include
    // cases where the embedder disabled it due to, e.g., enterprise policy).
    BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE = 34;
    NETWORK_REQUEST_REDIRECTED = 35;
    NETWORK_REQUEST_TIMEOUT = 36;
    NETWORK_EXCEEDS_BUFFER_LIMIT = 37;
    NAVIGATION_CANCELLED_WHILE_RESTORING = 38;
    BACK_FORWARD_CACHE_DISABLED_FOR_PRERENDER = 39;
    USER_AGENT_OVERRIDE_DIFFERS = 40;
    NETWORK_REQUEST_DATAPIPE_DRAINED_AS_BYTES_CONSUMER = 41;
    FOREGROUND_CACHE_LIMIT = 42;
    BROWSING_INSTANCE_NOT_SWAPPED = 43;
    BACK_FORWARD_CACHE_DISABLED_FOR_DELEGATE = 44;
    OPT_IN_UNLOAD_HEADER_NOT_PRESENT = 45;
    UNLOAD_HANDLER_EXISTS_IN_MAIN_FRAME = 46;
    UNLOAD_HANDLER_EXISTS_IN_SUBFRAME = 47;
    SERVICE_WORKER_UNREGISTRATION = 48;
    CACHE_CONTROL_NO_STORE = 49;
    CACHE_CONTROL_NO_STORE_COOKIE_MODIFIED = 50;
    CACHE_CONTROL_NO_STORE_HTTP_ONLY_COOKIE_MODIFIED = 51;
    NO_RESPONSE_HEAD = 52;
    ACTIVATION_NAVIGATION_DISALLOWED_FOR_BUG_1234857 = 53;
    ERROR_DOCUMENT = 54;
    FENCED_FRAMES_EMBEDDER = 55;
    COOKIE_DISABLED = 56;
    HTTP_AUTH_REQUIRED = 57;
    COOKIE_FLUSHED = 58;
    BROADCAST_CHANNEL_ON_MESSAGE = 59;
    WEBVIEW_SETTINGS_CHANGED = 60;
    WEBVIEW_JAVASCRIPT_OBJECT_CHANGED = 61;
    WEBVIEW_MESSAGE_LISTENER_INJECTED = 62;
    WEBVIEW_SAFE_BROWSING_ALLOWLIST_CHANGED = 63;
    WEBVIEW_DOCUMENT_START_JAVASCRIPT_CHANGED = 64;
    CACHE_CONTROL_NO_STORE_DEVICE_BOUND_SESSION_TERMINATED = 65;
    CACHE_LIMIT_PRUNED_ON_MODERATE_MEMORY_PRESSURE = 66;
    CACHE_LIMIT_PRUNED_ON_CRITICAL_MEMORY_PRESSURE = 67;
  }

  optional BackForwardCacheNotRestoredReason
      back_forward_cache_not_restored_reason = 1;
}

message RendererMainThreadTaskExecution {
  enum TaskType {
    TASK_TYPE_UNKNOWN = 0;
    TASK_TYPE_DOM_MANIPULATION = 1;
    TASK_TYPE_USER_INTERACTION = 2;
    TASK_TYPE_NETWORKING = 3;
    TASK_TYPE_NETWORKING_CONTROL = 4;
    TASK_TYPE_HISTORY_TRAVERSAL = 5;
    TASK_TYPE_EMBED = 6;
    TASK_TYPE_MEDIA_ELEMENT_EVENT = 7;
    TASK_TYPE_CANVAS_BLOB_SERIALIZATION = 8;
    TASK_TYPE_MICROTASK = 9;
    TASK_TYPE_JAVASCRIPT_TIMER_DELAYED_HIGH_NESTING = 10;
    TASK_TYPE_REMOTE_EVENT = 11;
    TASK_TYPE_WEB_SOCKET = 12;
    TASK_TYPE_POSTED_MESSAGE = 13;
    TASK_TYPE_UNSHIPPED_PORT_MESSAGE = 14;
    TASK_TYPE_FILE_READING = 15;
    TASK_TYPE_DATABASE_ACCESS = 16;
    TASK_TYPE_PRESENTATION = 17;
    TASK_TYPE_SENSOR = 18;
    TASK_TYPE_PERFORMANCE_TIMELINE = 19;
    TASK_TYPE_WEB_GL = 20;
    TASK_TYPE_IDLE_TASK = 21;
    TASK_TYPE_MISC_PLATFORM_API = 22;
    TASK_TYPE_INTERNAL_DEFAULT = 23;
    TASK_TYPE_INTERNAL_LOADING = 24;

    TASK_TYPE_INTERNAL_TEST = 26;
    TASK_TYPE_INTERNAL_WEB_CRYPTO = 27;

    TASK_TYPE_INTERNAL_MEDIA = 29;
    TASK_TYPE_INTERNAL_MEDIA_REALTIME = 30;

    TASK_TYPE_INTERNAL_USER_INTERACTION = 32;
    TASK_TYPE_INTERNAL_INSPECTOR = 33;

    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8 = 37;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_COMPOSITOR = 38;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_DEFAULT = 39;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_INPUT = 40;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_IDLE = 41;

    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_CONTROL = 43;
    TASK_TYPE_INTERNAL_INTERSECTION_OBSERVER = 44;
    TASK_TYPE_COMPOSITOR_THREAD_TASK_QUEUE_DEFAULT = 45;
    TASK_TYPE_WORKER_THREAD_TASK_QUEUE_DEFAULT = 46;
    TASK_TYPE_WORKER_THREAD_TASK_QUEUE_V8 = 47;
    TASK_TYPE_WORKER_THREAD_TASK_QUEUE_COMPOSITOR = 48;
    TASK_TYPE_COMPOSITOR_THREAD_TASK_QUEUE_INPUT = 49;

    // TODO(crbug.com/40583778): Obsolete. Remove.
    TASK_TYPE_NETWORKING_WITH_URL_LOADER_ANNOTATION = 50;

    TASK_TYPE_WORKER_ANIMATION = 51;

    TASK_TYPE_INTERNAL_TRANSLATION = 55;
    TASK_TYPE_FONT_LOADING = 56;
    TASK_TYPE_APPLICATION_LIFECYCLE = 57;
    TASK_TYPE_BACKGROUND_FETCH = 58;
    TASK_TYPE_PERMISSION = 59;
    TASK_TYPE_SERVICE_WORKER_CLIENT_MESSAGE = 60;
    TASK_TYPE_INTERNAL_CONTENT_CAPTURE = 61;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_MEMORY_PURGE = 62;
    TASK_TYPE_INTERNAL_NAVIGATION_ASSOCIATED = 63;
    TASK_TYPE_INTERNAL_NAVIGATION_ASSOCIATED_UNFREEZABLE = 64;
    TASK_TYPE_INTERNAL_CONTINUE_SCRIPT_LOADING = 65;
    TASK_TYPE_WEB_LOCKS = 66;
    TASK_TYPE_WEB_SCHEDULING_POSTED_TASK = 67;
    TASK_TYPE_INTERNAL_FRAME_LIFE_CYCLE_CONTROL = 68;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_NON_WAKING = 69;
    TASK_TYPE_INTERNAL_FIND_IN_PAGE = 70;
    TASK_TYPE_INTERNAL_HIGH_PRIORITY_LOCAL_FRAME = 71;
    TASK_TYPE_JAVASCRIPT_TIMER_IMMEDIATE = 72;
    TASK_TYPE_JAVASCRIPT_TIMER_DELAYED_LOW_NESTING = 73;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_IPC_TRACKING = 74;
    TASK_TYPE_NETWORKING_UNFREEZABLE = 75;
    TASK_TYPE_WAKE_LOCK = 76;
    TASK_TYPE_INTERNAL_INPUT_BLOCKING = 77;
    TASK_TYPE_WEB_GPU = 78;
    TASK_TYPE_INTERNAL_POST_MESSAGE_FORWARDING = 79;
    TASK_TYPE_INTERNAL_NAVIGATION_CANCELLATION = 80;
    TASK_TYPE_LOW_PRIORITY_SCRIPT_EXECUTION = 81;
    TASK_TYPE_STORAGE = 82;
    TASK_TYPE_NETWORKING_UNFREEZABLE_RENDER_BLOCKING_LOADING = 83;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8_USER_VISIBLE = 84;
    TASK_TYPE_CLIPBOARD = 85;
    TASK_TYPE_MACHINE_LEARNING = 86;
    TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8_BEST_EFFORT = 87;
    TASK_TYPE_INTERNAL_AUTOFILL = 88;
  }

  enum FrameType {
    FRAME_TYPE_UNSPECIFIED = 0;
    FRAME_TYPE_MAIN_FRAME = 1;
    FRAME_TYPE_SAME_ORIGIN_SUBFRAME = 2;
    FRAME_TYPE_CROSS_ORIGIN_SUBFRAME = 3;
  }

  optional TaskType task_type = 1;

  // FrameScheduler related data
  optional bool frame_visible = 2;
  optional bool page_visible = 3;
  optional FrameType frame_type = 4;
  optional bool is_ad_frame = 5;
}

message EventLatency {
  enum EventType {
    EVENT_TYPE_UNSPECIFIED = 0;
    MOUSE_PRESSED = 1;
    MOUSE_RELEASED = 2;
    MOUSE_WHEEL = 3;
    KEY_PRESSED = 4;
    KEY_RELEASED = 5;
    TOUCH_PRESSED = 6;
    TOUCH_RELEASED = 7;
    TOUCH_MOVED = 8;
    GESTURE_SCROLL_BEGIN = 9;
    GESTURE_SCROLL_UPDATE = 10;
    GESTURE_SCROLL_END = 11;
    GESTURE_DOUBLE_TAP = 12;
    GESTURE_LONG_PRESS = 13;
    GESTURE_LONG_TAP = 14;
    GESTURE_SHOW_PRESS = 15;
    GESTURE_TAP = 16;
    GESTURE_TAP_CANCEL = 17;
    GESTURE_TAP_DOWN = 18;
    GESTURE_TAP_UNCONFIRMED = 19;
    GESTURE_TWO_FINGER_TAP = 20;
    FIRST_GESTURE_SCROLL_UPDATE = 21;
    MOUSE_DRAGGED = 22;
    GESTURE_PINCH_BEGIN = 23;
    GESTURE_PINCH_END = 24;
    GESTURE_PINCH_UPDATE = 25;
    INERTIAL_GESTURE_SCROLL_UPDATE = 26;
    MOUSE_MOVED_EVENT = 27;
  }

  optional EventType event_type = 1;
  optional bool has_high_latency = 2;
  repeated string high_latency_stage = 3;
  // This is same as LatencyInfo's trace_id, using the name event_latency_id to
  // move away from the generic trace_id name used at other places as well.
  optional int64 event_latency_id = 4;
  // This is set only for scroll updates and is based on the
  // Event.ScrollJank.DelayedFramesPercentage.FixedWindow metric.
  optional bool is_janky_scrolled_frame = 5;
  // The interval that this frame was produced for according to the
  // BeginFrameArgs.
  optional double vsync_interval_ms = 6;
  // viz::BeginFrameArgs.trace_id of the frame (before surface aggregation) in
  // which the input was first presented. See also
  // ChromeGraphicsPipeline.surface_frame_trace_id.
  optional int64 surface_frame_trace_id = 7;
  // gfx::PresentationFeedback.display_trace_id of the frame (after surface
  // aggregation) in which the input was first presented. See also
  // ChromeGraphicsPipeline.display_trace_id.
  optional int64 display_trace_id = 8;
  // This is set only for scroll updates and is based on the
  // Event.ScrollJank.DelayedFramesPercentage.FixedWindow3 metric.
  // NOTE: This field is a new experimental version of is_janky_scrolled_frame.
  // This field aims to address the old field's shortcomings and eventually
  // replace it. For now, we recommend you still use the old field
  // (is_janky_scrolled_frame). See the
  // Event.ScrollJank.DelayedFramesPercentage.FixedWindow3 histogram's
  // documentation for more details.
  optional bool is_janky_scrolled_frame_v3 = 9;
}

message ProcessSingleton {
  enum RemoteProcessInteractionResult {
    INTERACTION_RESULT_UNSPECIFIED = 0;
    TERMINATE_FAILED = 1;
    REMOTE_PROCESS_NOT_FOUND = 2;
    TERMINATE_WAIT_TIMEOUT = 3;
    RUNNING_PROCESS_NOTIFY_ERROR = 4;
    TERMINATE_NOT_ENOUGH_PERMISSIONS = 5;
    REMOTE_PROCESS_SHUTTING_DOWN = 6;
    PROFILE_UNLOCKED = 7;
    PROFILE_UNLOCKED_BEFORE_KILL = 8;
    SAME_BROWSER_INSTANCE = 9;
    SAME_BROWSER_INSTANCE_BEFORE_KILL = 10;
    FAILED_TO_EXTRACT_PID = 11;
    INVALID_LOCK_FILE = 12;
    ORPHANED_LOCK_FILE = 13;
    USER_REFUSED_TERMINATION = 14;
    TERMINATE_SUCCEEDED = 100;
  }

  enum RemoteHungProcessTerminateReason {
    TERMINATE_REASON_UNSPECIFIED = 0;
    USER_ACCEPTED_TERMINATION = 1;
    NO_VISIBLE_WINDOW_FOUND = 2;
    NOTIFY_ATTEMPTS_EXCEEDED = 3;
    SOCKET_WRITE_FAILED = 4;
    SOCKET_READ_FAILED = 5;
  }

  optional RemoteProcessInteractionResult remote_process_interaction_result = 1;
  optional RemoteHungProcessTerminateReason remote_process_terminate_reason = 2;
}

message NavigationHandle {
  optional int64 navigation_id = 1;
  optional bool has_committed = 2;
  optional bool is_error_page = 3;
  optional FrameTreeNodeInfo frame_tree_node = 4;
  optional RenderFrameHost render_frame_host = 5;

  // Additional untyped debug information associated with this
  // NavigationHandle/Request, populated via TracedProto::AddDebugAnnotations
  // API.
  repeated DebugAnnotation debug_annotations = 99;
}

enum DeviceThermalState {
  DEVICE_THERMAL_STATE_UNKNOWN = 0;
  DEVICE_THERMAL_STATE_NOMINAL = 1;
  DEVICE_THERMAL_STATE_FAIR = 2;
  DEVICE_THERMAL_STATE_SERIOUS = 3;
  DEVICE_THERMAL_STATE_CRITICAL = 4;
}

// Used to log which Android IPC was called and how long it took.
message AndroidIPC {
  optional string name = 1;
  optional int64 dur_ms = 2;
}

message SequenceManagerTask {
  enum Priority {
    UNKNOWN = 0;
    CONTROL_PRIORITY = 1;
    HIGHEST_PRIORITY = 2;
    VERY_HIGH_PRIORITY = 3;
    HIGH_PRIORITY = 4;
    NORMAL_PRIORITY = 5;
    LOW_PRIORITY = 6;
    BEST_EFFORT_PRIORITY = 7;

    // Renderer-specific priorities.
    HIGH_PRIORITY_CONTINUATION = 8;
    NORMAL_PRIORITY_CONTINUATION = 9;
    LOW_PRIORITY_CONTINUATION = 10;
    EXTREMELY_HIGH_PRIORITY = 11;
  }

  enum QueueName {
    UNKNOWN_TQ = 0;
    DEFAULT_TQ = 1;
    TASK_ENVIRONMENT_DEFAULT_TQ = 2;
    TEST2_TQ = 3;
    TEST_TQ = 4;
    CONTROL_TQ = 5;

    SUBTHREAD_CONTROL_TQ = 6;
    SUBTHREAD_DEFAULT_TQ = 7;
    SUBTHREAD_INPUT_TQ = 8;

    UI_BEST_EFFORT_TQ = 9;
    UI_BOOTSTRAP_TQ = 10;
    UI_CONTROL_TQ = 11;
    UI_DEFAULT_TQ = 12;
    UI_NAVIGATION_NETWORK_RESPONSE_TQ = 13;
    UI_RUN_ALL_PENDING_TQ = 14;
    UI_SERVICE_WORKER_STORAGE_CONTROL_RESPONSE_TQ = 15;
    UI_THREAD_TQ = 16;
    UI_USER_BLOCKING_TQ = 17;
    UI_USER_INPUT_TQ = 18;
    UI_USER_VISIBLE_TQ = 19;

    IO_BEST_EFFORT_TQ = 20;
    IO_BOOTSTRAP_TQ = 21;
    IO_CONTROL_TQ = 22;
    IO_DEFAULT_TQ = 23;
    IO_NAVIGATION_NETWORK_RESPONSE_TQ = 24;
    IO_RUN_ALL_PENDING_TQ = 25;
    IO_SERVICE_WORKER_STORAGE_CONTROL_RESPONSE_TQ = 26;
    IO_THREAD_TQ = 27;
    IO_USER_BLOCKING_TQ = 28;
    IO_USER_INPUT_TQ = 29;
    IO_USER_VISIBLE_TQ = 30;

    COMPOSITOR_TQ = 31;
    DETACHED_TQ = 32;
    FRAME_DEFERRABLE_TQ = 33;
    FRAME_LOADING_CONTROL_TQ = 34;
    FRAME_LOADING_TQ = 35;
    FRAME_PAUSABLE_TQ = 36;
    FRAME_THROTTLEABLE_TQ = 37;
    FRAME_UNPAUSABLE_TQ = 38;
    IDLE_TQ = 39;
    INPUT_TQ = 40;
    IPC_TRACKING_FOR_CACHED_PAGES_TQ = 41;
    NON_WAKING_TQ = 42;
    OTHER_TQ = 43;
    V8_TQ = 44;
    WEB_SCHEDULING_TQ = 45;

    WORKER_IDLE_TQ = 46;
    WORKER_PAUSABLE_TQ = 47;
    WORKER_THREAD_INTERNAL_TQ = 48;
    WORKER_THROTTLEABLE_TQ = 49;
    WORKER_UNPAUSABLE_TQ = 50;
    WORKER_WEB_SCHEDULING_TQ = 51;

    UI_USER_BLOCKING_DEFERRABLE_TQ = 52 [deprecated = true];
    IO_USER_BLOCKING_DEFERRABLE_TQ = 53 [deprecated = true];

    UI_BEFORE_UNLOAD_BROWSER_RESPONSE_TQ = 54;
    IO_BEFORE_UNLOAD_BROWSER_RESPONSE_TQ = 55;

    V8_USER_VISIBLE_TQ = 56;
    V8_BEST_EFFORT_TQ = 57;
  }

  optional Priority priority = 1;
  optional QueueName queue_name = 2;
}

message AndroidToolbar {
  enum BlockCaptureReason {
    BLOCKED_UNKNOWN = 0;
    BLOCKED_TOOLBAR_OR_RESULT_NULL = 1;
    BLOCKED_VIEW_NOT_DIRTY = 2;
    BLOCKED_SNAPSHOT_SAME = 3;
    BLOCKED_URL_BAR_HAS_FOCUS = 4;
    BLOCKED_URL_BAR_FOCUS_IN_PROGRESS = 5;
    BLOCKED_OPTIONAL_BUTTON_ANIMATION_IN_PROGRESS = 6;
    BLOCKED_STATUS_ICON_ANIMATION_IN_PROGRESS = 7;
    BLOCKED_SCROLL_ABLATION = 8;
    BLOCKED_BROWSER_CONTROLS_LOCKED = 9;
    BLOCKED_TAB_SWITCHER_MODE = 10;
    BLOCKED_COMPOSITOR_IN_MOTION = 11;
    BLOCKED_NTP_Y_TRANSLATION = 12;
    BLOCKED_FULLSCREEN = 13;
  }
  enum AllowCaptureReason {
    ALLOWED_UNKNOWN = 0;
    ALLOWED_FORCE_CAPTURE = 1;
    ALLOWED_SNAPSHOT_DIFFERENCE = 2;
  }
  enum SnapshotDifference {
    DIFF_NONE = 0;
    DIFF_NULL = 1;
    DIFF_TINT = 2;
    DIFF_TAB_COUNT = 3;
    DIFF_OPTIONAL_BUTTON = 4;
    DIFF_VISUAL_STATE = 5;
    DIFF_SECURITY_ICON = 6;
    DIFF_SHOWING_UPDATE_BADGE = 7;
    DIFF_PAINT_PREVIEW = 8;
    DIFF_PROGRESS = 9;
    DIFF_LOCATION_BAR_WIDTH = 10;
    DIFF_URL_TEXT = 11;
    DIFF_HOME_BUTTON = 12;
    DIFF_TITLE_TEXT = 13;
    DIFF_CCT_ANIMATION = 14;
    DIFF_BOOKMARK_BUTTON = 15;
    DIFF_BACK_BUTTON = 16;
    DIFF_FORWARD_BUTTON = 17;
    DIFF_RELOAD_BUTTON = 18;
  }

  optional BlockCaptureReason block_capture_reason = 1;
  optional AllowCaptureReason allow_capture_reason = 2;
  optional SnapshotDifference snapshot_difference = 3;
}

message ActiveProcesses {
  repeated int32 pid = 1;
}

message UkmPageLoadTimingUpdate {
  // This can be used to uniquely identify a navigation from the point of view
  // of UKM.
  optional int64 ukm_source_id = 1;

  // The URL of a page can change throughout its lifetime. This is the current
  // url when this timing update was dispatched.
  optional string latest_url = 2;

  // Latest fully aggregated value of Cumulative Layout Shift.
  optional float latest_cumulative_layout_shift = 3;

  // Latest fully aggregated value of Largest Contentful Paint.
  optional double latest_largest_contentful_paint_ms = 4;

  optional double first_contentful_paint_ms = 5;
}

// A serialisation of v8StackFrame class.
message V8StackFrame {
  // Code location (path to the script and line/column number)
  message ScriptLocation {
    optional string source_url = 1;
    optional int64 line_number = 2;
    optional int64 column_number = 3;
  }

  // The name of the function that was called
  optional string function_name = 1;

  // If the function was defined in a script, contains the location within the
  // script.
  optional ScriptLocation script_location = 2;
}

// Serializes the blink::ExecutionContext object.
message BlinkExecutionContext {
  // Definition of different context types.
  enum ContextType {
    UNKNOWN_CONTEXT = 0;
    WINDOW = 1;
    WORKLET = 2;
    DEDICATED_WORKER = 3;
    SHARED_WORKER = 4;
    SERVICE_WORKER = 5;
  }

  // Definition of world type.
  enum WorldType {
    WORLD_UNKNOWN = 0;
    WORLD_MAIN = 1;
    WORLD_ISOLATED = 2;
    WORLD_INSPECTOR_ISOLATED = 3;
    WORLD_REG_EXP = 4;
    WORLD_FOR_V8_CONTEXT_SNAPSHOT_NON_MAIN = 5;
    WORLD_WORKER = 6;
    WORLD_SHADOW_REALM = 7;
  }

  optional ContextType type = 1;
  // Contains url of frame or worker.
  optional string url = 2;
  // The origin of the execution context.
  optional string origin = 3;
  // The world type of the execution context.
  optional WorldType world_type = 4;
}

// Serializes the blink::SourceLocation object.
message BlinkSourceLocation {
  optional string function_name = 1;
  optional int32 script_id = 2;
  optional string url = 3;
  optional int32 line_number = 4;
  optional int32 column_number = 5;
  optional string stack_trace = 6;
  repeated V8StackFrame stack_frames = 7;
}

// Contains the meta information for high entropy events (like api calls)
// that are to be traced for debugging in the context of identifiability study.
message BlinkHighEntropyAPI {
  // Serialization of a parameter passed to a javascript function.
  // Contains the stringified type of the object and some string representation
  // of its value.
  message JSFunctionArgument {
    // Definition of different types of function parameters.
    enum ArgumentType {
      UNKNOWN_TYPE = 0;
      NULL_TYPE = 1;
      UNDEFINED = 2;
      BIGINT = 3;
      BOOLEAN = 4;
      FUNCTION = 5;
      NUMBER = 6;
      STRING = 7;
      SYMBOL = 8;
      OBJECT = 9;
    }
    optional ArgumentType type = 1;
    optional string value = 2;
  }

  // Describes a Javascript API call.
  message CalledJsApi {
    // Contains class and function name of api called
    // similar to "Navigator.languages.get".
    optional string identifier = 1;
    repeated JSFunctionArgument func_arguments = 2;

    // Deprecated in favour of outer source_location. Not filled anymore in
    // newer versions of chrome.
    optional BlinkSourceLocation source_location = 3 [deprecated = true];
  }
  optional BlinkExecutionContext execution_context = 1;
  optional CalledJsApi called_api = 2;
  optional BlinkSourceLocation source_location = 3;

  // Describes lookup of a font.
  message FontLookup {
    enum FontLookupType {
      FONT_LOOKUP_UNKNOWN_TYPE = 0;
      FONT_LOOKUP_UNIQUE_OR_FAMILY_NAME = 1;
      FONT_LOOKUP_UNIQUE_NAME_ONLY = 2;
    }
    optional FontLookupType type = 1;
    optional string name = 2;
    optional uint64 weight = 3;
    optional uint64 width = 4;
    optional uint64 slope = 5;
  }
  optional FontLookup font_lookup = 4;
}

// Contains information about a tab switch measurement.
message TabSwitchMeasurement {
  // Possible outcomes of a tab switch. Maps to
  // blink::ContentToVisibleTimeReporter::TabSwitchResult.
  enum Result {
    RESULT_UNSPECIFIED = 0;
    // A frame was successfully presented after a tab switch.
    RESULT_SUCCESS = 1;
    // Tab was hidden before a frame was presented after a tab switch.
    RESULT_INCOMPLETE = 2;
    // TabWasShown called twice for a frame without TabWasHidden between. Treat
    // the first TabWasShown as an incomplete tab switch.
    RESULT_MISSED_TAB_HIDE = 3;
  }

  // State of the target tab. Corresponds to the suffixes of the
  // Browser.TabSwitchResult2.* histograms.
  enum TabState {
    STATE_UNSPECIFIED = 0;
    // The tab has frames in the frame cache, which can be composited in the
    // browser process.
    STATE_WITH_SAVED_FRAMES = 1;
    // The tab has no frames in the frame cache so must be rendered and
    // composited in a renderer process.
    STATE_LOADED_NO_SAVED_FRAMES = 2;
    // The tab has no frames in the frame cache and is not fully loaded, so it
    // must be reloaded before it can be rendered and composited in a renderer
    // process.
    STATE_NOT_LOADED_NO_SAVED_FRAMES = 3;
  }

  optional Result result = 1;
  optional TabState tab_state = 2;
}

// Data about scroll deltas and offsets.
// All values are in physical screen pixels.
message ScrollDeltas {
  // The trace_id of the current input.
  optional int64 trace_id = 1;
  // The original delta for current input. That is, this is the delta that
  // the Browser receives from Android, but already scaled to the device's
  // screen.
  optional float original_delta_x = 2;
  optional float original_delta_y = 3;
  // The trace_id of the input that the current input is coalesced with.
  // If input is not coalesced, this field is null.
  optional int64 coalesced_to_trace_id = 4;
  // The delta which arrived to compositor.
  // This is the sum of all the inputs coalesced together
  // with the resampler applied to them.
  // This delta is used to calculate a |visual_offset|.
  optional float provided_to_compositor_delta_x = 5;
  optional float provided_to_compositor_delta_y = 6;
  // The offset which compositor set.
  optional int64 visual_offset_x = 7;
  optional int64 visual_offset_y = 8;

  // Data which GPU returns.
  // Number of inputs which were shown together in one GPU frame.
  optional int32 event_count_in_gpu_frame = 9;
  // The trace_ids of inputs which were shown together in one GPU frame.
  repeated int64 trace_ids_in_gpu_frame = 10;
  // The sum of original deltas of inputs which were shown together in one GPU
  // frame.
  optional float original_delta_in_gpu_frame_y = 11;
  // The sum of predicted deltas of inputs which were shown together in one GPU
  // frame.
  optional float predicted_delta_in_gpu_frame_y = 12;
  // The array of original deltas of inputs which were shown together in one GPU
  // frame.
  repeated float segregated_original_deltas_in_gpu_frame_y = 13;
  // The array of predicted deltas of inputs which were shown together in one
  // GPU frame.
  repeated float segregated_predicted_deltas_in_gpu_frame_y = 14;

  // Data for overscrolls.
  // Whether any of the scroll delta was unused.
  optional bool did_overscroll_root = 15;
  // The amount of the scroll delta that was not used for scrolling.
  optional float unused_delta_x = 16;
  optional float unused_delta_y = 17;
}

// Debug information for system layer of audio rendering on Windows.
message WinRenderAudioFromSource {
  // Buffer size used by the platform.
  optional uint32 iaudioclient_buffer_size_frames = 1;
  // Number of available frames in the platform buffer.
  optional uint32 iaudioclient_buffer_unfilled_frames = 2;
  // Number of frames requested from the audio stream client.
  optional uint32 packet_size_frames = 3;
  // Total number of frames requested from the client and written to the
  // platform buffer during the stream lifetime.
  optional uint64 num_written_frames = 4;
  // Total number of frames played by the platform during the stream lifetime.
  optional uint64 num_played_out_frames = 5;
  // Device frequency reported by the platform; used to convert the stream
  // position to frames.
  optional uint64 iaudioclock_device_frequency = 6;
  // Stream position reported by the platform.
  optional uint64 iaudioclock_stream_position = 7;
  // Performance counter position reported by the platform.
  optional uint64 iaudioclock_qpc_position = 8;
  // Stream position increase since the last call, converted to milliseconds.
  optional int64 iaudioclock_stream_position_increase_ms = 9;
  // Performance counter position since the last call, converted to
  // milliseconds.
  optional int64 iaudioclock_qpc_position_increase_ms = 10;
  // Estimated playout delay, milliseconds.
  optional int64 playout_delay_ms = 11;
};

// Debug information for system layer of audio rendering on Mac.
message MacAUHALStream {
  // The number of frames that the stream requests from the audio source.
  optional int32 input_buffer_size = 1;
  // The number of frames that the OS requests for playout.
  optional uint32 output_buffer_size = 2;
  // Sample rate of the stream.
  optional int32 sample_rate = 3;
  // The time that the audio requested by the OS is expected to play out.
  optional int64 os_request_playout_timeticks_us = 4;
  // Total number of frames requested from the audio source.
  optional int32 source_request_frames = 5;
  // The delay between the request for audio from the source and when the audio
  // is expected to be played out.
  optional int64 source_request_playout_delay_us = 6;
  // The time when the audio that is requested from the source is expected to
  // play out.
  optional int64 source_request_playout_timeticks_us = 7;
  // The time when audio audio is requested from the source.
  optional int64 source_request_current_timeticks_us = 8;
  // The audio playout latency that comes from hardware, in milliseconds.
  optional int64 hardware_latency_us = 9;
  // Whether the kAudioTimeStampHostTimeValid is set on the output
  // AudioTimeStamp.
  optional bool audiotimestamp_host_time_valid = 10;
  // The playout time based on the machine time from AudioTimeStamp.
  optional int64 audiotimestamp_mach_timeticks_us = 11;
  // The time that the audio requested by the os is expected to be consumed by
  // the hardware. Measured in frames since the start of playout.
  optional double audiotimestamp_sample_time_frames = 12;
  // The time that the previous audio requested by the os was expected to be
  // consumed by the hardware. Measured in frames since the start of playout.
  optional double audiotimestamp_last_sample_time_frames = 13;
  // The duration of audio that was estimated to be lost in the case of a
  // glitch.
  optional int64 lost_audio_duration_us = 14;
};

// Debug information for system layer of audio rendering using ALSA on Linux.
message LinuxAlsaOutput {
  // The delay between the request for audio from the source and when the audio
  // is expected to be played out.
  optional int64 source_request_playout_delay_us = 1;
  // The number of bytes that are already present in the buffer on a call to
  // BufferPacket.
  optional int32 forward_bytes = 2;
  // Sample rate of the stream.
  optional int32 sample_rate = 3;
  // Delay obtained by the OS in frames.
  optional int32 getcurrentdelay_pcm_delay_frames = 4;
  // The number of frames in ALSA's buffer.
  optional int32 getcurrentdelay_alsa_buffer_frames = 5;
  // The number of frames that can be written to in ALSA's buffer.
  optional int32 getcurrentdelay_available_frames = 6;
  // The final delay that GetCurrentDelay arrives on, in frames.
  optional int32 getcurrentdelay_final_delay_frames = 7;
};

// Debug information for system layer of audio rendering using Pulse on Linux.
message LinuxPulseOutput {
  // The delay between the request for audio from the source and when the audio
  // is expected to be played out.
  optional int64 source_request_playout_delay_us = 1;
  // Sample rate of the stream.
  optional int32 sample_rate = 2;
  // The number of frames that the stream requests from the audio source.
  optional int32 input_buffer_size_frames = 3;
  // The number of bytes that the OS requests.
  optional uint32 stream_request_bytes = 4;
  // The number of bytes in a single frame.
  optional uint32 frame_size_bytes = 5;
};

// Debug information for system layer of audio rendering on ChromeOS.
message CrasUnified {
  // The total duration of silence due to missing samples during the stream.
  optional int64 underrun_duration_us = 1;
  // Previous underrun duration, used for calculating the length of silence
  // since the last callback.
  optional int64 last_underrun_duration_us = 2;
  // Difference in total underrun duration since the last callback. Logged only
  // when positive, which is when a glitch occurs.
  optional int64 underrun_glitch_duration_us = 3;
  // OS playout latency reported by cras.
  optional int64 latency_us = 4;
  // The number of frames that the stream requests from the audio source.
  optional int32 requested_frames = 5;
  // The number of frames that the source provided.
  optional uint32 filled_frames = 6;
  // Sample rate of the stream.
  optional int32 sample_rate = 7;
};

message ChromeUnguessableToken {
  optional uint64 low_token = 1;
  optional uint64 high_token = 2;
}

message FrameSinkId {
  optional uint32 frame_sink_client_id = 1;
  optional uint32 frame_sink_id = 2;
}

message LocalSurfaceId {
  optional uint32 parent_sequence_number = 1;
  optional uint32 child_sequence_number = 2;
  optional ChromeUnguessableToken unguessable_token = 3;
}

message ChromeGraphicsPipeline {
  // Next id: 26
  enum StepName {
    STEP_UNKNOWN = 0;
    STEP_DID_NOT_PRODUCE_FRAME = 1;
    STEP_DID_NOT_PRODUCE_COMPOSITOR_FRAME = 22;
    STEP_GENERATE_COMPOSITOR_FRAME = 2;
    STEP_GENERATE_RENDER_PASS = 3;
    STEP_ISSUE_BEGIN_FRAME = 4;
    STEP_RECEIVE_COMPOSITOR_FRAME = 5;
    STEP_RECEIVE_BEGIN_FRAME = 6;
    STEP_RECEIVE_BEGIN_FRAME_DISCARD = 7;
    STEP_SEND_BEGIN_MAIN_FRAME = 8 [deprecated = true];
    STEP_SUBMIT_COMPOSITOR_FRAME = 9;
    STEP_DRAW_AND_SWAP = 21;
    STEP_SURFACE_AGGREGATION = 10;
    STEP_SEND_BUFFER_SWAP = 11;
    STEP_BUFFER_SWAP_POST_SUBMIT = 12;
    STEP_FINISH_BUFFER_SWAP = 13;
    STEP_SWAP_BUFFERS_ACK = 14;

    // While the above steps are part of the cc/viz/gpu pipeline, the STEP_EXO*
    // and STEP_BACKEND* are somehow special.
    //
    // STEP_BACKEND* is platform independent and it can be used to trace any of
    // the backends. For example, it perfectly fits in ozone/drm, ozone/wayland
    // or x11 and can be set before and after buffer swap or overlay submission
    // that helps to understand the flow better.
    //
    // The STEP_EXO* is used only by EXO (see below). It relies on a trace id
    // from a Wayland client, which can use the "augmented_surface" protocol's
    // "augmented_surface.set_frame_trace_id" to pass that value. As a result,
    // any of the Wayland clients that use EXO will be able to have a nice trace
    // connection and see their buffer submissions' flows.

    // Frame submission stages when Exo (Wayland server implementation in Ash
    // browser process) is involved. Wayland clients (such as ARC++) submit
    // visual contents via Wayland surface commits, with which Exo constructs
    // compositor frames and forwards to Ash Viz.
    STEP_EXO_CONSTRUCT_COMPOSITOR_FRAME = 15;
    STEP_EXO_SUBMIT_COMPOSITOR_FRAME = 16;
    STEP_EXO_DISCARD_COMPOSITOR_FRAME = 17;

    // Frame submission stages in backends that viz uses to submit frames to
    // the gpu or to the system compositor. See the explanation above how these
    // stages can be used.
    STEP_BACKEND_SEND_BUFFER_SWAP = 18;
    STEP_BACKEND_SEND_BUFFER_POST_SUBMIT = 19;
    STEP_BACKEND_FINISH_BUFFER_SWAP = 20;

    // Send viz.mojom.CompositorFrameSinkClient::OnBeginFrame Mojo message from
    // Viz to a renderer's compositor.
    STEP_SEND_ON_BEGIN_FRAME_MOJO_MESSAGE = 23;

    // Send viz.mojom.BeginFrameObserver::OnStandaloneBeginFrame Mojo message
    // from Viz to the browser main thread (for flings).
    STEP_SEND_ON_STANDALONE_BEGIN_FRAME_MOJO_MESSAGE = 24;

    // Send viz.mojom.CompositorFrameSink::SubmitCompositorFrame Mojo message
    // from a renderer's compositor to Viz.
    STEP_SEND_SUBMIT_COMPOSITOR_FRAME_MOJO_MESSAGE = 25;
  }
  enum FrameSkippedReason {
    SKIPPED_REASON_UNKNOWN = 0;
    SKIPPED_REASON_RECOVER_LATENCY = 1;
    SKIPPED_REASON_NO_DAMAGE = 2;
    SKIPPED_REASON_WAITING_ON_MAIN = 3;
    SKIPPED_REASON_DRAW_THROTTLED = 4;
  }
  optional StepName step = 1;
  optional FrameSinkId frame_sink_id = 2;

  // Id used to link `ChromeGraphicsPipeline`s corresponding to work done by a
  // Viz client to produce a frame. This corresponds to
  // `viz::BeginFrameAck.trace_id`. Covers steps:
  // * STEP_ISSUE_BEGIN_FRAME
  // * STEP_RECEIVE_BEGIN_FRAME
  // * STEP_GENERATE_RENDER_PASS
  // * STEP_GENERATE_COMPOSITOR_FRAME
  // * STEP_SUBMIT_COMPOSITOR_FRAME
  // * STEP_RECEIVE_COMPOSITOR_FRAME
  // * STEP_RECEIVE_BEGIN_FRAME_DISCARD
  // * STEP_DID_NOT_PRODUCE_FRAME
  // * STEP_DID_NOT_PRODUCE_COMPOSITOR_FRAME
  optional int64 surface_frame_trace_id = 10;

  // Id used to link `ChromeGraphicsPipeline`s corresponding to work done
  // on creating and presenting one frame *after* surface aggregation. Covers
  // steps:
  // * STEP_DRAW_AND_SWAP
  // * STEP_SURFACE_AGGREGATION
  // * STEP_SEND_BUFFER_SWAP
  // * STEP_BUFFER_SWAP_POST_SUBMIT
  // * STEP_FINISH_BUFFER_SWAP
  // * STEP_SWAP_BUFFERS_ACK
  optional int64 display_trace_id = 3;

  // `viz::BeginFrameAck.trace_id`s for frames aggregated at this step.
  // Used with `STEP_SURFACE_AGGREGATION` only. This can be "joined" with
  // `surface_frame_trace_id`.
  repeated int64 aggregated_surface_frame_trace_ids = 8;

  optional LocalSurfaceId local_surface_id = 4;
  optional int64 frame_sequence = 5;
  optional FrameSkippedReason frame_skipped_reason = 6;

  // Optional variable that can be set together with STEP_BACKEND*.
  optional int64 backend_frame_id = 7;

  // List of LatencyInfo.trace_ids associated with this frame, which
  // should allow us to match input to frame production.
  repeated int64 latency_ids = 9;

  // Optional frame data containing of possible latch and present
  // frame deadlines. Only set on Android devices.
  optional AndroidChoreographerFrameCallbackData possible_deadlines = 11;
};

message LibunwindstackUnwinder {
  // The enum is a copy of ErrorCode enum inside third_party/libunwindstack,
  // ideally this should be in sync with that.
  enum ErrorCode {
    ERROR_NONE = 0;            // No error.
    ERROR_MEMORY_INVALID = 1;  // Memory read failed.
    ERROR_UNWIND_INFO = 2;     // Unable to use unwind information to unwind.
    ERROR_UNSUPPORTED = 3;     // Encountered unsupported feature.
    ERROR_INVALID_MAP = 4;     // Unwind in an invalid map.
    ERROR_MAX_FRAMES_EXCEEDED = 5;  // The number of frames exceed the total
                                    // allowed.
    ERROR_REPEATED_FRAME = 6;  // The last frame has the same pc/sp as the next.
    ERROR_INVALID_ELF = 7;     // Unwind in an invalid elf.
    ERROR_THREAD_DOES_NOT_EXIST = 8;  // Attempt to unwind a local thread that
                                      // does not exist.
    ERROR_THREAD_TIMEOUT = 9;  // Timeout trying to unwind a local thread.
    ERROR_SYSTEM_CALL = 10;    // System call failed while unwinding.
    ERROR_BAD_ARCH = 11;       // Arch invalid (none, or mismatched).
    ERROR_MAPS_PARSE = 12;     // Failed to parse maps data.
    ERROR_INVALID_PARAMETER_LIBUNWINDSTACK =
        13;                  // Invalid parameter passed to function.
    ERROR_PTRACE_CALL = 14;  // Ptrace call failed while unwinding.
  }
  optional ErrorCode error_code = 1;
  optional int32 num_frames = 2;
};

message ScrollPredictorMetrics {
  message EventFrameValue {
    optional int64 event_trace_id = 1;
    // The fractional pixels (can be fractional after the predictor adjusts in
    // resampling of input) that the page was scrolled by this frame.
    optional float delta_value_pixels = 2;
  };
  // Data from the previous, current, and next frame used to determine the
  // values below as according to the metric doc:
  // http://doc/1Y0u0Tq5eUZff75nYUzQVw6JxmbZAW9m64pJidmnGWsY.
  optional EventFrameValue prev_event_frame_value = 1;
  optional EventFrameValue cur_event_frame_value = 2;
  optional EventFrameValue next_event_frame_value = 3;
  // This is the amount of delta processed in this frame that was above the
  // janky threshold (as defined by
  // http://doc/1Y0u0Tq5eUZff75nYUzQVw6JxmbZAW9m64pJidmnGWsY)
  optional float janky_value_pixels = 4;
  // True if we are also missing frames (so multiple frames are being presented
  // at once).
  optional bool has_missed_vsyncs = 5;
  // True if we're moving less than the slow scroll threshold as defined by the
  // doc above.
  optional bool is_slow_scroll = 6;
};

//
// Critical User Interaction metrics
//

message PageLoad {
  optional int64 navigation_id = 1;
  optional string url = 2;
}

message StartUp {
  // This enum must be kept up to date with LaunchCauseMetrics.LaunchCause.
  enum LaunchCauseType {
    UNINITIALIZED = -1;
    OTHER = 0;
    CUSTOM_TAB = 1;
    TWA = 2;
    RECENTS = 3;
    RECENTS_OR_BACK = 4;
    FOREGROUND_WHEN_LOCKED = 5;
    MAIN_LAUNCHER_ICON = 6;
    MAIN_LAUNCHER_ICON_SHORTCUT = 7;
    HOME_SCREEN_WIDGET = 8;
    OPEN_IN_BROWSER_FROM_MENU = 9;
    EXTERNAL_SEARCH_ACTION_INTENT = 10;
    NOTIFICATION = 11;
    EXTERNAL_VIEW_INTENT = 12;
    OTHER_CHROME = 13;
    WEBAPK_CHROME_DISTRIBUTOR = 14;
    WEBAPK_OTHER_DISTRIBUTOR = 15;
    HOME_SCREEN_SHORTCUT = 16;
    SHARE_INTENT = 17;
    NFC = 18;
    AUTH_TAB = 19;
  }

  optional int64 activity_id = 1;
  // deprecated field 2.
  optional LaunchCauseType launch_cause = 3;
}

message WebContentInteraction {
  enum Type {
    INTERACTION_UNSPECIFIED = 0;
    INTERACTION_KEYBOARD = 1;
    INTERACTION_CLICK_TAP = 2;
    INTERACTION_DRAG = 3 [deprecated = true];
  }

  optional Type type = 1;
  optional int64 total_duration_ms = 2;
}

message ScrollMetrics {
  optional int64 frame_count = 1;
  optional int64 vsync_count = 2;
  optional int64 missed_vsync_max = 3;
  optional int64 missed_vsync_sum = 4;
  optional int64 delayed_frame_count = 5;
  optional int64 predictor_janky_frame_count = 6;
}

// The EventForwarder is a subsystem in android that forwards events from Java
// code to Chromium's native implementation. In this case we register how many
// events there was, what time this event occurred and the current x & y on the
// device screen (pixels).
//
// All data comes from MotionEvent getters so read these for more context:
// https://developer.android.com/reference/android/view/MotionEvent
// Next id: 11
message EventForwarder {
  // The events getHistorySize().
  optional int32 history_size = 1;
  // The time of the oldest event (getHistoricalEventTimeNanos(0)).
  optional int64 oldest_time_ns = 2;
  // The time of the newest event (getEventTimeNanos(0)).
  optional int64 latest_time_ns = 5;
  // The down time of event gotten from `MotionEvent.GetDownTime` or
  // `AMotionEvent_getDownTime`.
  optional int64 down_time_ns = 8;
  // The X coordinate of the event as reported by MotionEvent.getX().
  optional float x_pixel = 3;
  // The Y coordinate of the event as reported by MotionEvent.getY().
  optional float y_pixel = 4;
  // Determine if the previous forwarded event changed x coordinate.
  optional bool has_x_movement = 6;
  // Determine if the previous forwarded event changed y coordinate.
  optional bool has_y_movement = 7;

  // The enum comes from Android NDK header: `android/input.h`.
  enum AMotionEventAction {
    AMOTION_EVENT_ACTION_DOWN = 0;
    AMOTION_EVENT_ACTION_UP = 1;
    AMOTION_EVENT_ACTION_MOVE = 2;
    AMOTION_EVENT_ACTION_CANCEL = 3;
    AMOTION_EVENT_ACTION_OUTSIDE = 4;
    AMOTION_EVENT_ACTION_POINTER_DOWN = 5;
    AMOTION_EVENT_ACTION_POINTER_UP = 6;
    AMOTION_EVENT_ACTION_HOVER_MOVE = 7;
    AMOTION_EVENT_ACTION_SCROLL = 8;
    AMOTION_EVENT_ACTION_HOVER_ENTER = 9;
    AMOTION_EVENT_ACTION_HOVER_EXIT = 10;
    AMOTION_EVENT_ACTION_BUTTON_PRESS = 11;
    AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12;
  }
  optional AMotionEventAction action = 9;

  // Whether the event came from the system.
  optional bool verified_event = 10;
}

// TouchDispositionGestureFilter is a class on android that detects and forwards
// along gesture events based on touch acks and other information.
message TouchDispositionGestureFilter {
  // The number of gesture's inside of a GestureEventDataPacket.
  optional int32 gesture_count = 1;
}

message ViewClassName {
  // The name associated with a View class in browser UI. The class name is set
  // by the view class itself through metadata macros and contains no data that
  // can be modified by a user.
  optional string name = 1;
}

// Describes Chrome's Compositor scheduler's current state and associated
// variables.
//
// These protos and enums were adapted from the corresponding original JSON
// trace event for the scheduler state. In contrast to the JSON, we use strongly
// typed enum values instead of strings for many fields, and
// microsecond-granularity timestamps.
//
// The original format was generated in JSON by the code at
// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?l=870&rcl=5e15eabc9c0eec8daf94fdf78e93f13b6e3b63dd
//
// And is now generated as protozero:
// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?q=Scheduler::AsPro
//
// All non-delta-timestamps are absolute CLOCK_MONOTONIC timestamps.

// Next id: 16
enum ChromeCompositorSchedulerActionV2 {
  CC_SCHEDULER_ACTION_V2_UNSPECIFIED = 0;
  CC_SCHEDULER_ACTION_V2_NONE = 1;
  CC_SCHEDULER_ACTION_V2_SEND_BEGIN_MAIN_FRAME = 2;
  CC_SCHEDULER_ACTION_V2_COMMIT = 3;
  CC_SCHEDULER_ACTION_V2_POST_COMMIT = 14;
  CC_SCHEDULER_ACTION_V2_ACTIVATE_SYNC_TREE = 4;
  CC_SCHEDULER_ACTION_V2_DRAW_IF_POSSIBLE = 5;
  CC_SCHEDULER_ACTION_V2_DRAW_FORCED = 6;
  CC_SCHEDULER_ACTION_V2_DRAW_ABORT = 7;
  CC_SCHEDULER_ACTION_V2_UPDATE_DISPLAY_TREE = 15;
  CC_SCHEDULER_ACTION_V2_BEGIN_LAYER_TREE_FRAME_SINK_CREATION = 8;
  CC_SCHEDULER_ACTION_V2_PREPARE_TILES = 9;
  CC_SCHEDULER_ACTION_V2_INVALIDATE_LAYER_TREE_FRAME_SINK = 10;
  CC_SCHEDULER_ACTION_V2_PERFORM_IMPL_SIDE_INVALIDATION = 11;
  CC_SCHEDULER_ACTION_V2_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL = 12;
  CC_SCHEDULER_ACTION_V2_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON = 13;
}

// Next id: 18
message ChromeCompositorSchedulerStateV2 {
  enum BeginImplFrameDeadlineMode {
    DEADLINE_MODE_UNSPECIFIED = 0;
    DEADLINE_MODE_NONE = 1;
    DEADLINE_MODE_IMMEDIATE = 2;
    DEADLINE_MODE_REGULAR = 3;
    DEADLINE_MODE_LATE = 4;
    DEADLINE_MODE_BLOCKED = 5;
    DEADLINE_MODE_WAIT_FOR_SCROLL = 6;
  }
  optional ChromeCompositorStateMachineV2 state_machine = 1;
  optional bool observing_begin_frame_source = 2;
  optional bool begin_impl_frame_deadline_task = 3;
  optional bool pending_begin_frame_task = 4;
  optional bool skipped_last_frame_missed_exceeded_deadline = 5;
  optional ChromeCompositorSchedulerActionV2 inside_action = 7;
  optional BeginImplFrameDeadlineMode deadline_mode = 8;
  optional int64 deadline_us = 9;
  optional int64 deadline_scheduled_at_us = 10;
  optional int64 now_us = 11;
  optional int64 now_to_deadline_delta_us = 12;
  optional int64 now_to_deadline_scheduled_at_delta_us = 13;
  optional BeginImplFrameArgsV2 begin_impl_frame_args = 14;
  optional BeginFrameObserverStateV2 begin_frame_observer_state = 15;
  optional BeginFrameSourceStateV2 begin_frame_source_state = 16;
  optional CompositorTimingHistoryV2 compositor_timing_history = 17;

  reserved 6;
}

// Describes the current values stored in the Chrome Compositor state machine.
// Next id: 3
message ChromeCompositorStateMachineV2 {
  // Next id: 6
  message MajorStateV2 {
    enum BeginImplFrameState {
      BEGIN_IMPL_FRAME_UNSPECIFIED = 0;
      BEGIN_IMPL_FRAME_IDLE = 1;
      BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = 2;
      BEGIN_IMPL_FRAME_INSIDE_DEADLINE = 3;
    }
    enum BeginMainFrameState {
      BEGIN_MAIN_FRAME_UNSPECIFIED = 0;
      BEGIN_MAIN_FRAME_IDLE = 1;
      BEGIN_MAIN_FRAME_SENT = 2;
      BEGIN_MAIN_FRAME_READY_TO_COMMIT = 3;
    }
    enum LayerTreeFrameSinkState {
      LAYER_TREE_FRAME_UNSPECIFIED = 0;
      LAYER_TREE_FRAME_NONE = 1;
      LAYER_TREE_FRAME_ACTIVE = 2;
      LAYER_TREE_FRAME_CREATING = 3;
      LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = 4;
      LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = 5;
    }
    enum ForcedRedrawOnTimeoutState {
      FORCED_REDRAW_UNSPECIFIED = 0;
      FORCED_REDRAW_IDLE = 1;
      FORCED_REDRAW_WAITING_FOR_COMMIT = 2;
      FORCED_REDRAW_WAITING_FOR_ACTIVATION = 3;
      FORCED_REDRAW_WAITING_FOR_DRAW = 4;
    }
    optional ChromeCompositorSchedulerActionV2 next_action = 1;
    optional BeginImplFrameState begin_impl_frame_state = 2;
    optional BeginMainFrameState begin_main_frame_state = 3;
    optional LayerTreeFrameSinkState layer_tree_frame_sink_state = 4;
    optional ForcedRedrawOnTimeoutState forced_redraw_state = 5;
  }
  optional MajorStateV2 major_state = 1;

  // Next id: 48
  message MinorStateV2 {
    enum TreePriority {
      TREE_PRIORITY_UNSPECIFIED = 0;
      TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = 1;
      TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = 2;
      TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = 3;
    }
    enum ScrollHandlerState {
      SCROLL_HANDLER_UNSPECIFIED = 0;
      SCROLL_AFFECTS_SCROLL_HANDLER = 1;
      SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = 2;
    }
    optional int32 commit_count = 1;
    optional int32 current_frame_number = 2;
    optional int32 last_frame_number_submit_performed = 3;
    optional int32 last_frame_number_draw_performed = 4;
    optional int32 last_frame_number_begin_main_frame_sent = 5;
    optional bool did_draw = 6;
    optional bool did_send_begin_main_frame_for_current_frame = 7;
    optional bool did_notify_begin_main_frame_not_expected_until = 8;
    optional bool did_notify_begin_main_frame_not_expected_soon = 9;
    optional bool wants_begin_main_frame_not_expected = 10;
    optional bool did_commit_during_frame = 11;
    optional bool did_invalidate_layer_tree_frame_sink = 12;
    optional bool did_perform_impl_side_invalidaion = 13;
    optional bool did_prepare_tiles = 14;
    optional int32 consecutive_checkerboard_animations = 15;
    optional int32 pending_submit_frames = 16;
    optional int32 submit_frames_with_current_layer_tree_frame_sink = 17;
    optional bool needs_redraw = 18;
    optional bool needs_prepare_tiles = 19;
    optional bool needs_begin_main_frame = 20;
    optional bool needs_one_begin_impl_frame = 21;
    optional bool visible = 22;
    optional bool begin_frame_source_paused = 23;
    optional bool can_draw = 24;
    optional bool resourceless_draw = 25;
    optional bool has_pending_tree = 26;
    optional bool pending_tree_is_ready_for_activation = 27;
    optional bool active_tree_needs_first_draw = 28;
    optional bool active_tree_is_ready_to_draw = 29;
    optional bool did_create_and_initialize_first_layer_tree_frame_sink = 30;
    optional TreePriority tree_priority = 31;
    optional ScrollHandlerState scroll_handler_state = 32;
    optional bool critical_begin_main_frame_to_activate_is_fast = 33;
    optional bool main_thread_missed_last_deadline = 34;
    optional bool video_needs_begin_frames = 36;
    optional bool defer_begin_main_frame = 37;
    optional bool last_commit_had_no_updates = 38;
    optional bool did_draw_in_last_frame = 39;
    optional bool did_submit_in_last_frame = 40;
    optional bool needs_impl_side_invalidation = 41;
    optional bool current_pending_tree_is_impl_side = 42;
    optional bool previous_pending_tree_was_impl_side = 43;
    optional bool processing_animation_worklets_for_active_tree = 44;
    optional bool processing_animation_worklets_for_pending_tree = 45;
    optional bool processing_paint_worklets_for_pending_tree = 46;
    optional bool should_warm_up = 47;

    reserved 35;
  }
  optional MinorStateV2 minor_state = 2;
}

// Next id: 12
message BeginFrameArgsV2 {
  // JSON format has a "type" field that was always just "BeginFrameArgs" we
  // drop this in the proto representation, and instead make the JSON format
  // "subtype" field become the type field.
  enum BeginFrameArgsType {
    BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = 0;
    BEGIN_FRAME_ARGS_TYPE_INVALID = 1;
    BEGIN_FRAME_ARGS_TYPE_NORMAL = 2;
    BEGIN_FRAME_ARGS_TYPE_MISSED = 3;
  }
  optional BeginFrameArgsType type = 1;
  optional uint64 source_id = 2;
  optional uint64 sequence_number = 3;
  optional int64 frame_time_us = 4;
  optional int64 deadline_us = 5;
  optional int64 interval_delta_us = 6;
  optional bool on_critical_path = 7;
  optional bool animate_only = 8;
  oneof created_from {
    // The interned SourceLocation.
    uint64 source_location_iid = 9;
    // The SourceLocation that this args was created from.
    // TODO(nuskos): Eventually we will support interning inside of
    // TypedArgument TraceEvents and then we shouldn't need this SourceLocation
    // since we can emit it as part of the InternedData message. When we can
    // remove this |source_location|.
    SourceLocation source_location = 10;
  }
  optional int64 frames_throttled_since_last = 11;
}

// Next id: 7
message BeginImplFrameArgsV2 {
  optional int64 updated_at_us = 1;
  optional int64 finished_at_us = 2;
  enum State {
    BEGIN_FRAME_FINISHED = 0;
    BEGIN_FRAME_USING = 1;
  }
  optional State state = 3;
  oneof args {
    // Only set if |state| is BEGIN_FRAME_FINISHED.
    BeginFrameArgsV2 current_args = 4;
    // Only set if |state| is BEGIN_FRAME_USING.
    BeginFrameArgsV2 last_args = 5;
  }
  message TimestampsInUs {
    optional int64 interval_delta = 1;
    optional int64 now_to_deadline_delta = 2;
    optional int64 frame_time_to_now_delta = 3;
    optional int64 frame_time_to_deadline_delta = 4;
    optional int64 now = 5;
    optional int64 frame_time = 6;
    optional int64 deadline = 7;
  }
  optional TimestampsInUs timestamps_in_us = 6;
}

message BeginFrameObserverStateV2 {
  optional int64 dropped_begin_frame_args = 1;
  optional BeginFrameArgsV2 last_begin_frame_args = 2;
}

message BeginFrameSourceStateV2 {
  optional uint32 source_id = 1;
  optional bool paused = 2;
  optional uint32 num_observers = 3;
  optional BeginFrameArgsV2 last_begin_frame_args = 4;
}

message CompositorTimingHistoryV2 {
  optional int64 begin_main_frame_queue_critical_estimate_delta_us = 1;
  optional int64 begin_main_frame_queue_not_critical_estimate_delta_us = 2;
  optional int64 begin_main_frame_start_to_ready_to_commit_estimate_delta_us =
      3;
  optional int64 commit_to_ready_to_activate_estimate_delta_us = 4;
  optional int64 prepare_tiles_estimate_delta_us = 5;
  optional int64 activate_estimate_delta_us = 6;
  optional int64 draw_estimate_delta_us = 7;
}

message WebViewStartup {
  optional bool from_ui_thread = 1 [deprecated = true];
  // This enum must be kept in sync with WebViewChromiumAwInit.CallSite
  enum CallSite {
    GET_AW_TRACING_CONTROLLER = 0;
    GET_AW_PROXY_CONTROLLER = 1;
    WEBVIEW_INSTANCE = 2;
    GET_STATICS = 3;
    GET_DEFAULT_GEOLOCATION_PERMISSIONS = 4;
    GET_DEFAULT_SERVICE_WORKER_CONTROLLER = 5;
    GET_WEB_ICON_DATABASE = 6;
    GET_DEFAULT_WEB_STORAGE = 7;
    GET_DEFAULT_WEBVIEW_DATABASE = 8;
    GET_TRACING_CONTROLLER = 9;
    ASYNC_WEBVIEW_STARTUP = 10;
  }

  // LINT.IfChange(WebViewChromiumStartupMode)
  enum StartupMode {
    FULLY_SYNC = 0;
    FULLY_ASYNC = 1;
    PARTIAL_ASYNC_THEN_SYNC = 2;
    ASYNC_BUT_FULLY_SYNC = 3;
  }
  // LINT.ThenChange(//tools/metrics/histograms/metadata/android/enums.xml:WebViewChromiumStartupMode)

  optional CallSite start_call_site = 2;
  optional CallSite finish_call_site = 3;
  optional StartupMode startup_mode = 4;
}

message AnimationFrameTimingInfo {
  optional int64 blocking_duration_ms = 1;
  optional int64 duration_ms = 2;
  optional int64 num_scripts = 3;
  // Id for the BeginFrame, which triggered this animation frame.
  optional BeginFrameId begin_frame_id = 4;
}

message AnimationFrameScriptTimingInfo {
  optional int64 style_duration_ms = 1;
  optional int64 layout_duration_ms = 2;
  optional int64 pause_duration_ms = 3;
  optional string class_like_name = 4;
  optional string property_like_name = 5;
  optional string source_location_url = 6;
  optional string source_location_function_name = 7;
  optional int64 source_location_char_position = 8;
  enum InvokerType {
    UNDEFINED = 0;
    CLASSIC_SCRIPT = 1;
    MODULE_SCRIPT = 2;
    USER_CALLBACK = 3;
    EVENT_HANDLER = 4;
    PROMISE_RESOLVE = 5;
    PROMISE_REJECT = 6;
  }
  optional InvokerType invoker_type = 9;
  enum ThirdPartyTechnology {
    UNSPECIFIED = 0;
    NONE = 1;
    WORD_PRESS = 2;
    GOOGLE_ANALYTICS = 3;
    GOOGLE_FONT_API = 4;
    GOOGLE_TAG_MANAGER = 5;
    GOOGLE_MAPS = 6;
    META_PIXEL = 7;
    YOUTUBE = 8;
    ADOBE_ANALYTICS = 9;
    TIKTOK_PIXEL = 10;
    HOTJAR = 11;
    GOOGLE_ADSENSE = 12;
    GOOGLE_PUBLISHER_TAG = 13;
    GOOGLE_ADS_LIBRARIES = 14;
    FUNDING_CHOICES = 15;
    ELEMENTOR = 16;
    SLIDER_REVOLUTION = 17;
  }
  optional ThirdPartyTechnology third_party_technology = 10;
}

message BeginFrameId {
  optional uint64 source_id = 1;
  optional uint64 sequence_number = 2;
}

message MainFramePipeline {
  enum Step {
    UNKNOWN = 0;
    SEND_BEGIN_MAIN_FRAME = 1;
    BEGIN_MAIN_FRAME = 2;
    ABORTED_ON_MAIN = 3;
    COMMIT_ON_MAIN = 4;
    READY_TO_COMMIT_ON_IMPL = 5;
    COMMIT_ON_IMPL = 6;
    COMMIT_COMPLETE = 7;
    READY_TO_ACTIVATE = 8;
    ACTIVATE = 9;
    DRAW = 10;
    UPDATE_DISPLAY_TREE = 11;
  }

  // Id connecting the steps of the pipeline together.
  optional uint64 main_frame_id = 1;
  optional Step step = 2;

  // Id for the BeginFrame, which triggered this main frame.
  // Set for the SEND_BEGIN_MAIN_FRAME step.
  optional BeginFrameId begin_frame_id = 3;

  // If the step is ABORTED_ON_MAIN, this field will contain the reason.
  enum AbortedOnMainReason {
    ABORTED_MAIN_REASON_UNKNOWN = 0;
    NOT_VISIBLE = 1;
    DEFERRED_UPDATE = 2;
    DEFERRED_COMMIT_ABORTED = 3;
    NO_UPDATE = 4;
  }
  optional AbortedOnMainReason aborted_on_main_reason = 4;

  // Id of the last begin frame id issued by renderer compositor by the time
  // this main frame is drawn for the first time.
  // The difference between `begin_frame_id` and
  // `last_begin_frame_id_during_first_draw` can be used to reason about the
  // main frame latency. Set for the first DRAW step.
  optional BeginFrameId last_begin_frame_id_during_first_draw = 5;
}

message CurrentTask {
  // t1 - t0, where t1 is the start timestamp of this slice and t0 is the start
  // timestamp of the task containing this slice.
  optional uint64 event_offset_from_task_start_time_us = 1;

  // Timestamp in microseconds of the start of the task containing this slice.
  optional uint64 task_start_time_us = 2;

  // t1 - t0, where t1 is the start timestamp of this slice and t0 is the
  // timestamp of the time when the task containing this slice
  // was queued.
  optional uint64 task_queueing_time_us = 3;

  // Timestamp in microseconds of the time when the task containing
  // this slice was queued.
  optional uint64 task_queued_time_us = 4;
}

message ChromeLatencyInfo2 {
  optional int64 trace_id = 1;

  // NEXT ID: 16
  // All step are optional but the enum is ordered (not by number) below in the
  // order we expect them to appear if they are emitted in trace in a blocking
  // fashion.
  enum Step {
    STEP_UNSPECIFIED = 0;
    // Emitted on the browser main thread.
    STEP_SEND_INPUT_EVENT_UI = 3;
    // The browser main thread sends a
    // blink.mojom.WidgetInputHandler::DispatchEvent Mojo message to the
    // renderer's compositor.
    STEP_SEND_DISPATCH_EVENT_MOJO_MESSAGE = 15;
    // Happens on the renderer's compositor.
    STEP_HANDLE_INPUT_EVENT_IMPL = 5;
    STEP_RESAMPLE_SCROLL_EVENTS = 14;
    STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = 8;
    // Occurs on the Renderer's main thread.
    STEP_HANDLE_INPUT_EVENT_MAIN = 4;
    STEP_MAIN_THREAD_SCROLL_UPDATE = 2;
    STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = 1;
    // Could be emitted on both the renderer's main OR compositor.
    STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = 9;
    // Optionally sometimes HANDLED_INPUT_EVENT_MAIN_OR_IMPL will proxy to the
    // renderer's compositor and this will be emitted.
    STEP_HANDLED_INPUT_EVENT_IMPL = 10;
    // Occurs on Browser Main.
    STEP_TOUCH_EVENT_HANDLED = 12;
    // Occurs on Browser Main.
    STEP_GESTURE_EVENT_HANDLED = 13;
    // Renderer's compositor.
    STEP_SWAP_BUFFERS = 6 [deprecated = true];
    // Happens on the VizCompositor in the GPU process.
    STEP_DRAW_AND_SWAP = 7 [deprecated = true];
    // Happens on the GPU main thread after the swap has completed.
    STEP_FINISHED_SWAP_BUFFERS = 11 [deprecated = true];
    // See above for NEXT ID, enum steps are not ordered by tag number.
  };

  optional Step step = 2;
  optional int32 frame_tree_node_id = 3;

  // This enum is a copy of LatencyComponentType enum in Chrome, located in
  // ui/latency/latency_info.h, modulo added UNKNOWN value per protobuf
  // practices.
  enum LatencyComponentType {
    COMPONENT_UNSPECIFIED = 0;
    COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = 1;
    COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = 2;
    COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = 3;
    COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = 4;
    COMPONENT_INPUT_EVENT_LATENCY_UI = 5;
    COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = 6;
    COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = 7;
    COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = 8;
    COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = 9;
    COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = 10;
    COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = 11;
    COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = 12;
    COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = 13;
    COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = 14;
  }

  message ComponentInfo {
    optional LatencyComponentType component_type = 1;

    // Microsecond timestamp in CLOCK_MONOTONIC domain
    optional uint64 time_us = 2;
  };

  repeated ComponentInfo component_info = 4;
  optional bool is_coalesced = 5;
  optional int64 gesture_scroll_id = 6;
  optional int64 touch_id = 7;

  // Must be kept in sync with blink::mojom::EventType.
  // All values are incremented by one for consistency with other proto enums.
  enum InputType {
    UNDEFINED_EVENT = 0;
    MOUSE_DOWN_EVENT = 1;
    MOUSE_UP_EVENT = 2;
    MOUSE_MOVE_EVENT = 3;
    MOUSE_ENTER_EVENT = 4;
    MOUSE_LEAVE_EVENT = 5;
    CONTEXT_MENU_EVENT = 6;

    MOUSE_WHEEL_EVENT = 7;

    RAW_KEY_DOWN_EVENT = 8;
    KEY_DOWN_EVENT = 9;
    KEY_UP_EVENT = 10;
    CHAR_EVENT = 11;

    GESTURE_SCROLL_BEGIN_EVENT = 12;
    GESTURE_SCROLL_END_EVENT = 13;
    GESTURE_SCROLL_UPDATE_EVENT = 14;
    GESTURE_FLING_START_EVENT = 15;
    GESTURE_FLING_CANCEL_EVENT = 16;
    GESTURE_PINCH_BEGIN_EVENT = 17;
    GESTURE_PINCH_END_EVENT = 18;
    GESTURE_PINCH_UPDATE_EVENT = 19;

    GESTURE_BEGIN_EVENT = 20;

    GESTURE_TAP_DOWN_EVENT = 21;
    GESTURE_SHOW_PRESS_EVENT = 22;
    GESTURE_TAP_EVENT = 23;
    GESTURE_TAP_CANCEL_EVENT = 24;
    GESTURE_SHORT_PRESS_EVENT = 25;
    GESTURE_LONG_PRESS_EVENT = 26;
    GESTURE_LONG_TAP_EVENT = 27;
    GESTURE_TWO_FINGER_TAP_EVENT = 28;
    GESTURE_TAP_UNCONFIRMED_EVENT = 29;

    GESTURE_DOUBLE_TAP_EVENT = 30;
    GESTURE_END_EVENT = 31;

    TOUCH_START_EVENT = 32;
    TOUCH_MOVE_EVENT = 33;
    TOUCH_END_EVENT = 34;
    TOUCH_CANCEL_EVENT = 35;
    TOUCH_SCROLL_STARTED_EVENT = 36;

    POINTER_DOWN_EVENT = 37;
    POINTER_UP_EVENT = 38;
    POINTER_MOVE_EVENT = 39;
    POINTER_RAW_UPDATE_EVENT = 40;
    POINTER_CANCEL_EVENT = 41;
    POINTER_CAUSED_UA_ACTION_EVENT = 42;
  }

  // The type of input corresponding to this `ChromeLatencyInfo`.
  optional InputType input_type = 8;

  // Intended to mirror `blink::mojom::InputEventResultState`.
  enum InputResultState {
    UNKNOWN = 0;
    CONSUMED = 1;
    NOT_CONSUMED = 2;
    NO_CONSUMER_EXISTS = 3;
    IGNORED = 4;
    SET_NON_BLOCKING = 5;
    SET_NON_BLOCKING_DUE_TO_FLING = 6;
  }

  // If applicable, the result of handling the input corresponding to this
  // `ChromeLatencyInfo`.
  optional InputResultState input_result_state = 9;

  // `trace_id` values corresponding to inputs that were coalesced/combined into
  // the input for this `ChromeLatencyInfo`.
  repeated int64 coalesced_trace_ids = 10;
}

message EventTiming {
  optional bool cancelable = 1;
  optional string frame = 2;
  optional uint32 interaction_id = 3;
  optional uint32 interaction_offset = 4;
  optional int64 node_id = 5;
  optional int64 key_code = 6;
  optional int32 pointer_id = 7;
  optional uint64 fallback_time_us = 8;
  enum EventType {
    UNDEFINED = 0;
    AUX_CLICK_EVENT = 1;
    CLICK_EVENT = 2;
    CONTEXT_MENU_EVENT = 3;
    DOUBLE_CLICK_EVENT = 4;
    MOUSE_DOWN_EVENT = 5;
    MOUSE_ENTER_EVENT = 6;
    MOUSE_LEAVE_EVENT = 7;
    MOUSE_OUT_EVENT = 9;
    MOUSE_OVER_EVENT = 10;
    MOUSE_UP_EVENT = 11;
    POINTER_OVER_EVENT = 12;
    POINTER_ENTER_EVENT = 13;
    POINTER_DOWN_EVENT = 14;
    POINTER_UP_EVENT = 15;
    POINTER_CANCEL_EVENT = 16;
    POINTER_OUT_EVENT = 17;
    POINTER_LEAVE_EVENT = 18;
    GOT_POINTER_CAPTURE_EVENT = 19;
    LOST_POINTER_CAPTURE_EVENT = 20;
    TOUCH_START_EVENT = 21;
    TOUCH_END_EVENT = 22;
    TOUCH_CANCEL_EVENT = 23;
    KEY_DOWN_EVENT = 24;
    KEY_PRESS_EVENT = 25;
    KEY_UP_EVENT = 26;
    BEFORE_INPUT_EVENT = 27;
    INPUT_EVENT = 28;
    COMPOSITION_START_EVENT = 29;
    COMPOSITION_UPDATE_EVENT = 30;
    COMPOSITION_END_EVENT = 31;
    DRAG_START_EVENT = 32;
    DRAG_END_EVENT = 33;
    DRAG_ENTER_EVENT = 34;
    DRAG_LEAVE_EVENT = 35;
    DRAG_OVER_EVENT = 36;
    DROP_EVENT = 37;
  }
  optional EventType type = 9;
}

// Frame information provided by Android's Choreographer.
// See
// https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata.
// Next ID: 4
message AndroidChoreographerFrameCallbackData {
  // The time in microseconds at which the frame started being rendered.
  // See
  // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimenanos.
  optional int64 frame_time_us = 1;

  message FrameTimeline {
    // The token used by the platform to identify the frame timeline.
    // See
    // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelinevsyncid.
    optional int64 vsync_id = 1;

    // The difference in microseconds between:
    // (A) the time at which the frame needs to be ready by in order to be
    //     presented on time and
    // (B) the time at which the frame started being rendered (frame_time_us).
    // See
    // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelinedeadlinenanos.
    optional int64 latch_delta_us = 2;

    // The difference in microseconds between:
    // (A) the time at which the frame is expected to be presented and
    // (B) the time at which the frame started being rendered (frame_time_us).
    // See
    // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelineexpectedpresentationtimenanos.
    optional int64 present_delta_us = 3;
  }

  // Possible frame timelines.
  // See
  // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelineslength.
  repeated FrameTimeline frame_timeline = 2;

  // The index (into frame_timeline) of the platform-preferred frame timeline.
  // See
  // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getpreferredframetimelineindex.
  optional int64 preferred_frame_timeline_index = 3;
}

message ChromeFrameReporter2 {
  enum State {
    // The frame did not have any updates to present.
    STATE_NO_UPDATE_DESIRED = 0;

    // The frame presented all the desired updates (i.e. any updates requested
    // from both the compositor thread and main-threads were handled).
    STATE_PRESENTED_ALL = 1;

    // The frame was presented with some updates, but also missed some updates
    // (e.g. missed updates from the main-thread, but included updates from the
    // compositor thread).
    STATE_PRESENTED_PARTIAL = 2;

    // The frame was dropped, i.e. some updates were desired for the frame, but
    // was not presented.
    STATE_DROPPED = 3;
  };

  optional State state = 1;

  enum FrameDropReason {
    REASON_UNSPECIFIED = 0;

    // Frame was dropped by the display-compositor.
    // The display-compositor may drop a frame some times (e.g. the frame missed
    // the deadline, or was blocked on surface-sync, etc.)
    REASON_DISPLAY_COMPOSITOR = 1;

    // Frame was dropped because of the main-thread.
    // The main-thread may cause a frame to be dropped, e.g. if the main-thread
    // is running expensive javascript, or doing a lot of layout updates, etc.
    REASON_MAIN_THREAD = 2;

    // Frame was dropped by the client compositor.
    // The client compositor can drop some frames too (e.g. attempting to
    // recover latency, missing the deadline, etc.).
    REASON_CLIENT_COMPOSITOR = 3;
  };

  // The reason is set only if |state| is not |STATE_UPDATED_ALL|.
  optional FrameDropReason reason = 2;

  optional uint64 frame_source = 3;
  optional uint64 frame_sequence = 4;

  // If this is a dropped frame (i.e. if |state| is set to |STATE_DROPPED| or
  // |STATE_PRESENTED_PARTIAL|), then indicates whether this frame impacts
  // smoothness.
  optional bool affects_smoothness = 5;

  enum ScrollState {
    SCROLL_NONE = 0;
    SCROLL_MAIN_THREAD = 1;
    SCROLL_COMPOSITOR_THREAD = 2;
    SCROLL_RASTER = 3;

    // Used when it can't be determined whether a scroll is in progress or not.
    SCROLL_UNKNOWN = 4;
  }

  // The type of active scroll.
  optional ScrollState scroll_state = 6;

  // If any main thread animation is active during this frame.
  optional bool has_main_animation = 7;
  // If any compositor thread animation is active during this frame.
  optional bool has_compositor_animation = 8;
  // If any touch-driven UX (not scroll) is active during this frame.
  optional bool has_smooth_input_main = 9;

  // Whether the frame contained any missing content (i.e. whether there was
  // checkerboarding in the frame).  If has_missing_content,
  // checkerboarded_needs_raster and checkerboarded_needs_record all have
  // values, has_missing_content should equal checkerboarded_needs_raster ||
  // checkerboarded_needs_record.
  optional bool has_missing_content = 10;

  // The id of layer_tree_host that the frame has been produced for.
  optional uint64 layer_tree_host_id = 11;

  // If total latency of PipelineReporter exceeds a certain limit.
  optional bool has_high_latency = 12;

  enum FrameType {
    FORKED = 0;
    BACKFILL = 1;
  }

  // Indicate if the frame is "FORKED" (i.e. a PipelineReporter event starts at
  // the same frame sequence as another PipelineReporter) or "BACKFILL"
  // (i.e. dropped frames when there are no partial compositor updates).
  optional FrameType frame_type = 13;

  // The breakdown stage of PipelineReporter that is most likely accountable for
  // high latency.
  repeated string high_latency_contribution_stage = 14;

  // Whether the frame contained any content that is not fully rastered.
  optional bool checkerboarded_needs_raster = 15;

  // Whether the frame contained any content that is not fully recorded.
  optional bool checkerboarded_needs_record = 16;

  // viz::BeginFrameArgs.trace_id of the frame (before surface aggregation). See
  // also ChromeTrackEvent.EventLatency.surface_frame_trace_id.
  optional int64 surface_frame_trace_id = 17;

  // gfx::PresentationFeedback.display_trace_id of the frame (after surface
  // aggregation). See also ChromeTrackEvent.EventLatency.display_trace_id.
  optional int64 display_trace_id = 18;
}

message InputTransferHandler {
  // The values in this enum are incremented by one compared to histograms enum
  // to follow proto guidelines to leave 0 for unknown or unset values.
  // LINT.IfChange(TransferInputToVizResult)
  enum TransferInputToVizResult {
    // We don't expect this to be present in traces.
    UNKNOWN = 0;
    SUCCESSFULLY_TRANSFERRED = 1;
    INPUT_TRANSFER_HANDLER_NOT_FOUND_IN_MAP = 2;
    NON_FINGER_TOOL_TYPE = 3;
    VIZ_INITIALIZATION_NOT_COMPLETE = 4;
    SELECTION_HANDLES_ACTIVE = 5;
    CAN_TRIGGER_BACK_GESTURE = 6;
    IME_IS_ACTIVE = 7;
    REQUESTED_BY_EMBEDDER = 8;
    SYSTEM_SERVER_DID_NOT_TRANSFER = 9;
    BROWSER_TOKEN_CHANGED = 10;
    MULTIPLE_BROWSER_WINDOWS_OPEN = 11;
    DOWN_TIME_AFTER_EVENT_TIME = 12;
    SEQUENCE_TRANSFERRED_BACK_FROM_VIZ = 13;
  };
  // LINT.ThenChange(//tools/metrics/histograms/metadata/android/enums.xml:TransferInputToVizResult)
  optional TransferInputToVizResult transfer_result = 1;
};

message ChromeTrackEvent {
  // Extension range for Chrome: 1000-1999
  // Next ID: 1077
  extend TrackEvent {
    optional ChromeAppState chrome_app_state = 1000;

    optional ChromeMemoryPressureNotification
        chrome_memory_pressure_notification = 1001;

    optional ChromeTaskAnnotator chrome_task_annotator = 1002;

    optional ChromeBrowserContext chrome_browser_context = 1003;

    optional ChromeProfileDestroyer chrome_profile_destroyer = 1004;

    optional ChromeTaskPostedToDisabledQueue
        chrome_task_posted_to_disabled_queue = 1005;

    optional ChromeRasterTask chrome_raster_task = 1006;

    optional ChromeMessagePumpForUI chrome_message_pump_for_ui = 1007;

    optional RenderFrameImplDeletion render_frame_impl_deletion = 1008;

    optional ShouldSwapBrowsingInstancesResult
        should_swap_browsing_instances_result = 1009;

    optional FrameTreeNodeInfo frame_tree_node_info = 1010;

    optional ChromeHashedPerformanceMark chrome_hashed_performance_mark = 1011;

    optional RenderProcessHost render_process_host = 1012;
    optional RenderProcessHostCleanup render_process_host_cleanup = 1013;
    optional RenderProcessHostListener render_process_host_listener_changed =
        1014;
    optional ChildProcessLauncherPriority child_process_launcher_priority =
        1015;

    optional ResourceBundle resource_bundle = 1016;

    optional ChromeWebAppBadNavigate chrome_web_app_bad_navigate = 1017;

    optional ChromeExtensionId chrome_extension_id = 1018;

    optional SiteInstance site_instance = 1019;

    optional RenderViewHost render_view_host = 1020;

    optional RenderFrameProxyHost render_frame_proxy_host = 1021;

    optional AndroidViewDump android_view_dump = 1022;

    optional ParkableStringCompressInBackground
        parkable_string_compress_in_background = 1023;
    optional ParkableStringUnpark parkable_string_unpark = 1024;

    optional ChromeSamplingProfilerSampleCollected
        chrome_sampling_profiler_sample_completed = 1025;
    optional SendBeginMainFrameToCommitBreakdown
        send_begin_mainframe_to_commit_breakdown = 1026;

    optional GlobalRenderFrameHostId global_render_frame_host_id = 1027;

    optional RenderFrameHost render_frame_host = 1028;

    optional ChromeThreadPoolTask thread_pool_task = 1029;

    optional BackForwardCacheCanStoreDocumentResult
        back_forward_cache_can_store_document_result = 1030;

    optional RendererMainThreadTaskExecution
        renderer_main_thread_task_execution = 1031;

    optional EventLatency event_latency = 1032;

    optional ProcessSingleton process_singleton = 1033;

    optional SiteInstanceGroup site_instance_group = 1034;

    optional BrowsingContextState browsing_context_state = 1035;

    optional DeviceThermalState device_thermal_state = 1036;

    optional NavigationHandle navigation = 1037;

    optional AndroidIPC android_ipc = 1038;

    optional ChromeSqlDiagnostics sql_diagnostics = 1039;

    optional SequenceManagerTask sequence_manager_task = 1040;

    optional AndroidToolbar android_toolbar = 1041;

    optional ActiveProcesses active_processes = 1042;

    optional BlinkTaskScope blink_task_scope = 1043;

    optional UkmPageLoadTimingUpdate ukm_page_load_timing_update = 1044;

    optional BlinkHighEntropyAPI high_entropy_api = 1045;

    optional TabSwitchMeasurement tab_switch_measurement = 1046;

    optional ScrollDeltas scroll_deltas = 1047;

    optional WinRenderAudioFromSource win_render_audio_from_source = 1048;

    optional MacAUHALStream mac_auhal_stream = 1049;

    optional LinuxAlsaOutput linux_alsa_output = 1050;

    optional LinuxPulseOutput linux_pulse_output = 1051;

    optional ChromeGraphicsPipeline chrome_graphics_pipeline = 1052;

    optional CrasUnified chromeos_cras_unified = 1053;

    optional LibunwindstackUnwinder libunwindstack_unwinder = 1054;

    optional ScrollPredictorMetrics scroll_predictor_metrics = 1055;

    optional PageLoad page_load = 1056;

    optional StartUp startup = 1057;

    optional WebContentInteraction web_content_interaction = 1058;

    optional EventForwarder event_forwarder = 1059;

    optional TouchDispositionGestureFilter touch_disposition_gesture_filter =
        1060;

    optional ViewClassName view_class_name = 1061;

    optional ChromeCompositorSchedulerStateV2 cc_scheduler_state = 1062;

    optional WebViewStartup webview_startup = 1063;

    optional AnimationFrameTimingInfo animation_frame_timing_info = 1064;

    optional AnimationFrameScriptTimingInfo animation_frame_script_timing_info =
        1065;

    optional ScrollMetrics scroll_metrics = 1066;

    optional MainFramePipeline main_frame_pipeline = 1067;

    optional ChromeLatencyInfo2 chrome_latency_info = 1068;

    optional EventTiming event_timing = 1069;

    optional AndroidChoreographerFrameCallbackData
        android_choreographer_frame_callback_data = 1070;

    optional CurrentTask current_task = 1071;

    optional WebExposedIsolationInfo web_exposed_isolation_info = 1072;

    optional UrlInfo url_info = 1073;

    optional BeginFrameId begin_frame_id = 1074;

    // Older versions of Chrome set TrackEvent.chrome_frame_reporter, which is
    // now deprecated, instead.
    optional ChromeFrameReporter2 frame_reporter = 1075;

    optional InputTransferHandler input_transfer_handler = 1076;
  }
}