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
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
|
# Use of this source code is governed by a BSD-style license that can be
# Copyright 2014 The Chromium Authors. All rights reserved.
# found in the LICENSE file.
import("//build/android/resource_sizes.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//build/config/chrome_build.gni") # For branding_file_path.
import("//build/config/python.gni")
import("//build/util/process_version.gni")
import("//build/util/version.gni")
import("//chrome/android/chrome_common_shared_library.gni")
import("//chrome/android/chrome_java_resources.gni")
import("//chrome/android/chrome_public_apk_tmpl.gni")
import("//chrome/android/features/dev_ui/dev_ui_module.gni")
import("//chrome/android/features/tab_ui/buildflags.gni")
import("//chrome/android/features/tab_ui/tab_management_java_sources.gni")
import("//chrome/android/features/vr/public_vr_java_sources.gni")
import("//chrome/android/feed/feed_java_sources.gni")
import("//chrome/android/modules/chrome_bundle_tmpl.gni")
import("//chrome/android/modules/chrome_feature_module_tmpl.gni")
import("//chrome/android/monochrome_android_manifest_jinja_variables.gni")
import("//chrome/browser/share/android/java_sources.gni")
import("//chrome/chrome_paks.gni")
import("//chrome/common/features.gni")
import("//device/vr/buildflags/buildflags.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
import("//third_party/protobuf/proto_library.gni")
import("//tools/resources/generate_resource_whitelist.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
import("//weblayer/variables.gni")
import("channel.gni")
import("java_sources.gni")
import("static_initializers.gni")
import("trichrome.gni")
_default_package = "org.chromium.chrome"
if (android_channel != "default") {
# android-binary-size trybot may checks if an internal Chrome variant's
# AndroidManifest is as expected by ensuring the differences between its
# AndroidManifest and its upstream target's .AndroidManifest.expected file
# are as expected. Upstream targets having a "org.chromium.chrome" package
# name will cause the comparison to output many unnecessary differences.
# See https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/README.md
_default_package += "." + android_channel
}
declare_args() {
# Android package name to use when compiling the public chrome targets
# (chrome_modern_public_apk, monochrome_public_apk, etc. as well as the
# *_bundle variants). This is particularly useful when using
# monochrome_public_apk for WebView development, as the OS only accepts
# WebView providers which declare one of a handful of package names. See
# https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/docs/build-instructions.md#Changing-package-name
# for details.
chrome_public_manifest_package = _default_package
}
chrome_public_test_manifest_package = "org.chromium.chrome.tests"
chrome_public_jinja_variables =
default_chrome_public_jinja_variables +
[ "manifest_package=$chrome_public_manifest_package" ]
chrome_public_android_manifest =
"$target_gen_dir/chrome_public_apk/AndroidManifest.xml"
chrome_modern_public_android_manifest =
"$target_gen_dir/chrome_modern_public_apk/AndroidManifest.xml"
trichrome_library_android_manifest =
"$target_gen_dir/trichrome_library_apk/AndroidManifest.xml"
trichrome_library_64_32_android_manifest =
"$target_gen_dir/trichrome_library_64_32_apk/AndroidManifest.xml"
trichrome_library_64_android_manifest =
"$target_gen_dir/trichrome_library_64_apk/AndroidManifest.xml"
trichrome_library_32_android_manifest =
"$target_gen_dir/trichrome_library_32_apk/AndroidManifest.xml"
app_hooks_impl = "java/src/org/chromium/chrome/browser/AppHooksImpl.java"
_chrome_version_java_file = "$target_gen_dir/templates/org/chromium/chrome/browser/ChromeVersionConstants.java"
# Exclude it from JNI registration if VR is not enabled.
chrome_jni_sources_exclusions = []
if (!enable_vr) {
chrome_jni_sources_exclusions += [ "//chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrModuleProvider.java" ]
}
chrome_jni_registration_header =
"$root_build_dir/gen/chrome/browser/android/chrome_jni_registration.h"
chrome_jni_for_test_registration_header = "$root_build_dir/gen/chrome/browser/android/chrome_jni_for_test_registration.h"
# Chosen to match what CQ bots exist.
_enable_libs_and_assets_verification =
public_android_sdk && !is_component_build &&
((target_cpu == "arm" && android_channel == "stable") ||
(target_cpu == "arm64" && android_channel == "default" &&
# Disable checks in official arm64 builds due to unwind assets.
!is_official_build))
# Having //clank present causes different flags because of how play services
# is wired up.
# The channel is required because manifest entries vary based on channel.
_enable_manifest_verification =
!is_java_debug && !enable_chrome_android_internal &&
android_channel == "stable"
jinja_template("chrome_public_android_manifest") {
input = "java/AndroidManifest.xml"
output = chrome_public_android_manifest
variables = chrome_public_jinja_variables
variables += [
"min_sdk_version=21",
"target_sdk_version=$android_sdk_version",
]
}
jinja_template("chrome_modern_public_android_manifest") {
input = "java/AndroidManifest.xml"
output = chrome_modern_public_android_manifest
variables = chrome_public_jinja_variables
variables += [
"min_sdk_version=21",
"target_sdk_version=$android_sdk_version",
]
}
jinja_template("trichrome_library_android_manifest") {
input = "java/AndroidManifest_trichrome_library.xml"
output = trichrome_library_android_manifest
variables = trichrome_jinja_variables + [
"trichrome_version=$trichrome_version_code",
"manifest_package=$trichrome_library_package",
]
}
if (android_64bit_target_cpu) {
jinja_template("trichrome_library_64_32_android_manifest") {
input = "java/AndroidManifest_trichrome_library.xml"
output = trichrome_library_64_32_android_manifest
variables = trichrome_jinja_variables + [
"trichrome_version=$trichrome_64_32_version_code",
"manifest_package=$trichrome_library_package",
]
}
jinja_template("trichrome_library_64_android_manifest") {
input = "java/AndroidManifest_trichrome_library.xml"
output = trichrome_library_64_android_manifest
variables = trichrome_jinja_variables + [
"trichrome_version=$trichrome_64_version_code",
"manifest_package=$trichrome_library_package",
]
}
jinja_template("trichrome_library_32_android_manifest") {
input = "java/AndroidManifest_trichrome_library.xml"
output = trichrome_library_32_android_manifest
variables = trichrome_jinja_variables + [
"trichrome_version=$trichrome_32_version_code",
"manifest_package=$trichrome_library_package",
]
}
}
generate_ui_locale_resources("ui_locale_string_resources") {
ui_locales = locales
}
android_resources("chrome_app_java_resources") {
sources = chrome_java_resources
sources += [
"//chrome/android/java/res_chromium/drawable-hdpi/fre_product_logo.png",
"//chrome/android/java/res_chromium/drawable-hdpi/product_logo_name.png",
"//chrome/android/java/res_chromium/drawable-mdpi/fre_product_logo.png",
"//chrome/android/java/res_chromium/drawable-mdpi/product_logo_name.png",
"//chrome/android/java/res_chromium/drawable-xhdpi/fre_product_logo.png",
"//chrome/android/java/res_chromium/drawable-xhdpi/product_logo_name.png",
"//chrome/android/java/res_chromium/drawable-xxhdpi/fre_product_logo.png",
"//chrome/android/java/res_chromium/drawable-xxhdpi/product_logo_name.png",
"//chrome/android/java/res_chromium/drawable-xxxhdpi/fre_product_logo.png",
"//chrome/android/java/res_chromium/drawable-xxxhdpi/product_logo_name.png",
"//chrome/android/java/res_chromium/mipmap-hdpi/app_icon.png",
"//chrome/android/java/res_chromium/mipmap-mdpi/app_icon.png",
"//chrome/android/java/res_chromium/mipmap-xhdpi/app_icon.png",
"//chrome/android/java/res_chromium/mipmap-xxhdpi/app_icon.png",
"//chrome/android/java/res_chromium/mipmap-xxxhdpi/app_icon.png",
"//chrome/android/java/res_chromium/values/channel_constants.xml",
]
deps = [
":ui_locale_string_resources",
"//chrome/android/webapk/libs/common:splash_resources",
"//chrome/app:java_strings_grd",
"//chrome/browser/ui/android/appmenu:java_resources",
"//chrome/browser/ui/android/default_browser_promo:java_resources",
"//chrome/browser/ui/android/favicon:java_resources",
"//chrome/browser/ui/android/strings:ui_strings_grd",
"//chrome/browser/ui/messages/android:java_resources",
"//components/autofill/android:autofill_java_resources",
"//components/blocked_content/android:java_resources",
"//components/browser_ui/android/bottomsheet:java_resources",
"//components/browser_ui/http_auth/android:java_resources",
"//components/browser_ui/modaldialog/android:java_resources",
"//components/browser_ui/settings/android:java_resources",
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources",
"//components/browser_ui/widget/android:java_resources",
"//components/find_in_page/android:java_resources",
"//components/javascript_dialogs/android:java_resources",
"//components/omnibox/browser:java_resources",
"//components/page_info/android:java_resources",
"//components/permissions/android:java_resources",
"//components/policy:app_restrictions_resources",
"//components/strings:components_locale_settings_grd",
"//components/strings:components_strings_grd",
"//components/translate/content/android:java_resources",
"//content/public/android:content_java_resources",
"//third_party/android_data_chart:android_data_chart_java_resources",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:androidx_gridlayout_gridlayout_java",
"//third_party/android_deps:androidx_preference_preference_java",
"//third_party/android_deps:androidx_recyclerview_recyclerview_java",
"//third_party/android_deps:com_google_android_material_material_java",
]
custom_package = "org.chromium.chrome"
}
if (enable_vr) {
# TODO(crbug.com/935982): Currently, adding multiple resource folders to a
# resource target may clobber some resources. Once that is fixed we should add
# the VR resurces to chrome_app_java_resources.
android_resources("chrome_vr_java_resources") {
sources = [
"//chrome/android/java/res_vr/values-v17/styles.xml",
"//chrome/android/java/res_vr/values-vrheadset-v26/styles.xml",
"//chrome/android/java/res_vr/values/values.xml",
]
deps = [ ":chrome_app_java_resources" ]
}
}
# TODO(chouinard): Remove this wrapper target after downstream dependencies on it are replaced.
android_resources("chrome_download_java_resources") {
sources = []
deps = [ "//chrome/browser/download/android:java_resources" ]
}
android_library("app_hooks_java") {
sources = [ app_hooks_impl ]
deps = [ ":chrome_java" ]
jacoco_never_instrument = true
}
android_aidl("photo_picker_aidl") {
import_include = [ "java/src/org/chromium/chrome/browser/photo_picker" ]
sources = [
"java/src/org/chromium/chrome/browser/photo_picker/IDecoderService.aidl",
"java/src/org/chromium/chrome/browser/photo_picker/IDecoderServiceCallback.aidl",
]
}
java_cpp_template("vr_build_config") {
package_path = "org/chromium/chrome/browser/vr"
sources = [ "//chrome/android/java/src/org/chromium/chrome/browser/vr/VrBuildConfig.template" ]
if (enable_vr) {
defines = [ "ENABLE_VR" ]
}
}
android_library("chrome_java") {
deps = [
":chrome_app_java_resources",
":chrome_public_android_manifest",
":chrome_public_apk_template_resources",
":chrome_version_constants",
":critical_persisted_tab_data_proto_java",
":partner_location_descriptor_proto_java",
":update_proto_java",
":usage_stats_proto_java",
"$google_play_services_package:google_play_services_auth_base_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
"$google_play_services_package:google_play_services_cast_framework_java",
"$google_play_services_package:google_play_services_cast_java",
"$google_play_services_package:google_play_services_fido_java",
"$google_play_services_package:google_play_services_gcm_java",
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
"$google_play_services_package:google_play_services_vision_common_java",
"$google_play_services_package:google_play_services_vision_java",
"//base:base_java",
"//base:jni_java",
"//chrome/android/features/keyboard_accessory:public_java",
"//chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/library:piet_resources",
"//chrome/android/modules/cablev2_authenticator/public:java",
"//chrome/android/modules/image_editor/provider:java",
"//chrome/android/modules/image_editor/public:java",
"//chrome/android/modules/stack_unwinder/provider:java",
"//chrome/android/third_party/compositor_animator:compositor_animator_java",
"//chrome/android/webapk/libs/client:client_java",
"//chrome/android/webapk/libs/common:common_java",
"//chrome/android/webapk/libs/common:splash_java",
"//chrome/android/webapk/libs/runtime_library:webapk_service_aidl_java",
"//chrome/browser/android/crypto:java",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/android/thin_webview:factory_java",
"//chrome/browser/android/thin_webview:java",
"//chrome/browser/browser_controls/android:java",
"//chrome/browser/contextmenu:java",
"//chrome/browser/download/android:factory_java",
"//chrome/browser/download/android:java",
"//chrome/browser/download/android:java_resources",
"//chrome/browser/enterprise/util:java",
"//chrome/browser/flags:java",
"//chrome/browser/fullscreen/android:java",
"//chrome/browser/image_editor/public:java",
"//chrome/browser/image_fetcher:java",
"//chrome/browser/notifications/chime/android:java",
"//chrome/browser/offline_pages/android:java",
"//chrome/browser/optimization_guide/android:java",
"//chrome/browser/performance_hints/android:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/safe_browsing/android:java",
"//chrome/browser/safety_check/android:java",
"//chrome/browser/settings:java",
"//chrome/browser/share/android:java_resources",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/thumbnail:java",
"//chrome/browser/ui:infobar_android_enums_java",
"//chrome/browser/ui/android/appmenu:factory_java",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/browser/ui/android/default_browser_promo:java",
"//chrome/browser/ui/android/favicon:java",
"//chrome/browser/ui/android/native_page:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/util:java",
"//chrome/browser/xsurface:java",
"//components/autofill/android:autofill_java",
"//components/autofill_assistant/browser:proto_java",
"//components/background_task_scheduler:background_task_scheduler_java",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/bookmarks/common/android:bookmarks_java",
"//components/browser_ui/android/bottomsheet:factory_java",
"//components/browser_ui/android/bottomsheet:java",
"//components/browser_ui/android/bottomsheet:manager_java",
"//components/browser_ui/client_certificate/android:java",
"//components/browser_ui/http_auth/android:java",
"//components/browser_ui/media/android:java",
"//components/browser_ui/modaldialog/android:java",
"//components/browser_ui/notifications/android:java",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/share/android:java",
"//components/browser_ui/site_settings/android:java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/webshare/android:java",
"//components/browser_ui/widget/android:java",
"//components/content_capture/android:java",
"//components/content_settings/android:content_settings_enums_java",
"//components/content_settings/android:java",
"//components/contextual_search/content/common/mojom:mojom_java",
"//components/crash/android:java",
"//components/dom_distiller/content/browser/android:dom_distiller_content_java",
"//components/dom_distiller/core/android:dom_distiller_core_java",
"//components/dom_distiller/core/mojom:mojom_java",
"//components/download/internal/background_service:internal_java",
"//components/download/internal/common:internal_java",
"//components/download/network:network_java",
"//components/download/public/common:public_java",
"//components/download/public/task:public_java",
"//components/embedder_support/android:application_java",
"//components/embedder_support/android:browser_context_java",
"//components/embedder_support/android:content_view_java",
"//components/embedder_support/android:context_menu_java",
"//components/embedder_support/android:util_java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/external_intents/android:java",
"//components/feature_engagement:feature_engagement_java",
"//components/feed/core/proto:proto_java",
"//components/feed/core/proto:proto_java_v2",
"//components/find_in_page/android:java",
"//components/gcm_driver/android:gcm_driver_java",
"//components/gcm_driver/instance_id/android:instance_id_driver_java",
"//components/infobars/android:java",
"//components/infobars/core:infobar_enums_java",
"//components/javascript_dialogs/android:java",
"//components/language/android:language_bridge_java",
"//components/location/android:location_java",
"//components/location/android:settings_java",
"//components/minidump_uploader:minidump_uploader_java",
"//components/module_installer/android:module_installer_java",
"//components/module_installer/android:module_interface_java",
"//components/navigation_interception/android:navigation_interception_java",
"//components/offline_items_collection/core:core_java",
"//components/omnibox/browser:browser_java",
"//components/page_info/android:java",
"//components/paint_preview/browser/android:java",
"//components/paint_preview/player/android:java",
"//components/payments/content/android:java",
"//components/payments/mojom:mojom_java",
"//components/permissions/android:java",
"//components/policy/android:policy_java",
"//components/prefs/android:java",
"//components/query_tiles:java",
"//components/safe_browsing/android:safe_browsing_java",
"//components/schema_org/common:mojom_java",
"//components/search_engines/android:java",
"//components/security_interstitials/content/android:java",
"//components/security_state/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//components/signin/core/browser/android:java",
"//components/signin/public/android:java",
"//components/spellcheck/browser/android:java",
"//components/subresource_filter/android:java",
"//components/sync/android:sync_java",
"//components/sync/protocol:protocol_java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//components/variations/android:variations_java",
"//components/version_info/android:version_constants_java",
"//components/viz/common:common_java",
"//components/viz/service:service_java",
"//components/webapk/android/libs/client:java",
"//components/webapk/android/libs/common:java",
"//components/webrtc/android:java",
"//content/public/android:content_java",
"//device/gamepad:java",
"//media/base/android:media_java",
"//media/capture/content/android:screen_capture_java",
"//media/capture/video/android:capture_java",
"//media/midi:midi_java",
"//mojo/public/java:bindings_java",
"//mojo/public/java:system_java",
"//mojo/public/java/system:system_impl_java",
"//mojo/public/mojom/base:base_java",
"//net/android:net_java",
"//printing:printing_java",
"//services/data_decoder/public/cpp/android:safe_json_java",
"//services/device/public/java:device_feature_list_java",
"//services/media_session/public/cpp/android:media_session_java",
"//services/media_session/public/mojom:mojom_java",
"//services/network/public/mojom:mojom_java",
"//services/service_manager/public/java:service_manager_java",
"//services/service_manager/public/mojom:mojom_java",
"//services/shape_detection:shape_detection_java",
"//services/shape_detection/public/mojom:mojom_java",
"//skia/public/mojom:mojom_java",
"//third_party/android_data_chart:android_data_chart_java",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:androidx_appcompat_appcompat_resources_java",
"//third_party/android_deps:androidx_collection_collection_java",
"//third_party/android_deps:androidx_coordinatorlayout_coordinatorlayout_java",
"//third_party/android_deps:androidx_core_core_java",
"//third_party/android_deps:androidx_customview_customview_java",
"//third_party/android_deps:androidx_gridlayout_gridlayout_java",
"//third_party/android_deps:androidx_interpolator_interpolator_java",
"//third_party/android_deps:androidx_legacy_legacy_support_v13_java",
"//third_party/android_deps:androidx_lifecycle_lifecycle_common_java",
"//third_party/android_deps:androidx_lifecycle_lifecycle_common_java8_java",
"//third_party/android_deps:androidx_lifecycle_lifecycle_runtime_java",
"//third_party/android_deps:androidx_mediarouter_mediarouter_java",
"//third_party/android_deps:androidx_preference_preference_java",
"//third_party/android_deps:androidx_recyclerview_recyclerview_java",
"//third_party/android_deps:androidx_viewpager_viewpager_java",
"//third_party/android_deps:com_google_android_material_material_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
"//third_party/android_deps:com_google_dagger_dagger_java",
"//third_party/android_deps:com_google_guava_listenablefuture_java",
"//third_party/android_deps:com_google_protobuf_protobuf_javalite_java",
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
"//third_party/android_sdk:android_gcm_java",
"//third_party/android_sdk/androidx_browser:androidx_browser_java",
"//third_party/android_swipe_refresh:android_swipe_refresh_java",
"//third_party/blink/public:blink_headers_java",
"//third_party/blink/public/mojom:android_mojo_bindings_java",
"//third_party/blink/public/mojom:mojom_platform_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/cacheinvalidation:cacheinvalidation_proto_java",
"//third_party/gif_player:gif_player_java",
"//third_party/google_android_play_core:com_google_android_play_core_java",
"//ui/android:ui_java",
"//ui/base/mojom:mojom_java",
"//ui/gfx/geometry/mojom:mojom_java",
"//url:gurl_java",
"//url:origin_java",
"//url/mojom:url_mojom_gurl_java",
]
deps += feed_deps
srcjar_deps = [
":chrome_android_java_enums_srcjar",
":chrome_android_java_google_api_keys_srcjar",
":chrome_product_config",
":photo_picker_aidl",
":resource_id_javagen",
":sync_user_settings_enums_java",
":vr_build_config",
"//chrome:assist_ranker_prediction_enum_javagen",
"//chrome:instant_apps_reasons_enum_javagen",
"//chrome:offline_pages_enum_javagen",
"//chrome:partner_bookmarks_javagen",
"//chrome:quick_action_category_enum_javagen",
"//chrome:supervised_user_url_filter_enum_javagen",
"//chrome/browser:sharing_dialog_type_generated_enum",
"//chrome/browser:sharing_send_message_result_generated_enum",
"//chrome/browser/net:secure_dns_management_mode_generated_enum",
"//chrome/browser/notifications/scheduler/public:jni_enums",
"//chrome/browser/supervised_user/supervised_user_error_page:enums_srcjar",
"//chrome/browser/updates/announcement_notification:jni_enums",
"//components/autofill_assistant/browser:autofill_assistant_enums_java",
"//components/browsing_data/core:browsing_data_utils_java",
"//components/browsing_data/core:clear_browsing_data_tab_java",
"//components/consent_auditor:consent_auditor_java",
"//components/data_reduction_proxy/core/browser:data_reduction_proxy_savings_cleared_enum_java",
"//components/dom_distiller/core:distiller_type_java",
"//components/ntp_snippets:ntp_snippets_java_enums_srcjar",
"//components/ntp_tiles:ntp_tiles_enums_java",
"//components/offline_pages/core:offline_page_model_enums_java",
"//components/password_manager/core/browser:password_manager_java_enums_srcjar",
"//components/payments/content/android:method_strings_generated_srcjar",
"//components/search_engines:search_engine_type_java",
"//components/signin/core/browser:signin_enums_javagen",
"//components/ui_metrics:ui_metrics_enums_java",
"//content/public/browser:contacts_picker_properties_requested_javagen",
"//net:effective_connection_type_java",
"//net/dns:secure_dns_mode_generated_enum",
]
# From java_sources.gni.
sources = chrome_java_sources + [
app_hooks_impl,
_chrome_version_java_file,
]
# Include sources from feed_java_sources.gni.
sources += feed_java_sources
srcjar_deps += feed_srcjar_deps
sources += public_vr_java_sources
# Include sources from public_tab_management_java_sources.gni.
sources += public_tab_management_java_sources
if (enable_vr) {
deps += [ ":chrome_vr_java_resources" ]
}
srcjar_deps += [ ":chrome_vr_android_java_enums_srcjar" ]
if (enable_feed_in_chrome) {
deps += [ "//chrome/android/feed:chrome_feed_java_resources" ]
}
# Add the actual implementation where necessary so that downstream targets
# can provide their own implementations.
jar_excluded_patterns = [
"*/AppHooksImpl.class",
"*/ProductConfig.class",
]
annotation_processor_deps = [
"//base/android/jni_generator:jni_processor",
"//components/module_installer/android:module_interface_processor",
"//third_party/android_deps:dagger_processor",
]
processor_args_javac = [ "dagger.fastInit=enabled" ]
# TODO(crbug/1022172): Instead of adding source files, add it as a separate
# dependency when circular deps is resolved.
sources += share_java_sources
}
generate_product_config_srcjar("chrome_product_config") {
java_package = "org.chromium.chrome.browser"
}
# This is a list of all base module java dependencies. New features should be
# added to this list.
java_group("chrome_all_java") {
deps = [
":chrome_java",
"//chrome/android/features/keyboard_accessory:internal_java",
"//chrome/android/features/media_router:java",
"//chrome/android/modules/extra_icu/provider:java",
"//chrome/browser/download/internal/android:java",
"//chrome/browser/test_dummy/internal:base_module_java",
"//chrome/browser/touch_to_fill/android/internal:java",
"//chrome/browser/ui/android/appmenu/internal:java",
"//components/browser_ui/android/bottomsheet/internal:java",
]
if (disable_autofill_assistant_dfm) {
deps += [ "//chrome/android/features/autofill_assistant:java" ]
}
if (disable_tab_ui_dfm) {
deps += [
"//chrome/android/features/tab_ui:java",
"//chrome/android/features/tab_ui:module_desc_java",
]
}
if (dfmify_dev_ui) {
deps += [ "//chrome/android/modules/dev_ui/provider:java" ]
}
if (use_chime_android_sdk) {
deps += [ "//chrome/android/modules/chime/public:java" ]
}
}
# This is a list of all base module jni headers. New features should add their
# own jni target to this list.
group("jni_headers") {
public_deps = [
":chrome_jni_headers",
"//chrome/android/features/autofill_assistant:jni_headers",
"//chrome/android/features/keyboard_accessory:jni_headers",
"//chrome/android/features/media_router:jni_headers",
"//chrome/browser/download/android:jni_headers",
"//chrome/browser/enterprise/util:jni_headers",
"//chrome/browser/flags:jni_headers",
"//chrome/browser/image_fetcher:jni_headers",
"//chrome/browser/performance_hints/android:jni_headers",
"//chrome/browser/preferences:jni_headers",
"//chrome/browser/profiles/android:jni_headers",
"//chrome/browser/touch_to_fill/android:jni_headers",
"//chrome/browser/ui/android/favicon:jni_headers",
"//chrome/browser/ui/messages/android:jni_headers",
"//chrome/browser/util:jni_headers",
]
}
action("chrome_android_java_google_api_keys_srcjar") {
script = "//build/android/gyp/java_google_api_keys.py"
_output_path = "$target_gen_dir/$target_name.srcjar"
outputs = [ _output_path ]
args = [
"--srcjar",
rebase_path(_output_path, root_build_dir),
]
}
java_cpp_enum("chrome_android_java_enums_srcjar") {
sources = [
"//chrome/browser/android/chrome_session_state.h",
"//chrome/browser/android/customtabs/detached_resource_request.h",
"//chrome/browser/android/explore_sites/explore_sites_bridge.h",
"//chrome/browser/android/explore_sites/explore_sites_feature.h",
"//chrome/browser/android/feedback/connectivity_checker.cc",
"//chrome/browser/android/policy/policy_auditor.cc",
"//chrome/browser/android/shortcut_info.h",
"//chrome/browser/android/tab_android.h",
"//chrome/browser/android/webapk/webapk_install_service.h",
"//chrome/browser/android/webapk/webapk_installer.h",
"//chrome/browser/android/webapk/webapk_types.h",
"//chrome/browser/android/webapps/add_to_homescreen_params.h",
"//chrome/browser/banners/app_banner_settings_helper.h",
"//chrome/browser/download/android/download_open_source.h",
"//chrome/browser/installable/digital_asset_links/digital_asset_links_handler.h",
"//chrome/browser/installable/installed_webapp_geolocation_bridge.cc",
"//chrome/browser/notifications/notification_channels_provider_android.h",
"//chrome/browser/notifications/notification_handler.h",
"//chrome/browser/notifications/notification_platform_bridge_android.cc",
"//chrome/browser/ntp_snippets/ntp_snippets_metrics.h",
"//chrome/browser/profiles/profile_metrics.h",
"//chrome/browser/translate/android/translate_utils.h",
]
}
java_cpp_enum("chrome_vr_android_java_enums_srcjar") {
sources = [
"//chrome/browser/android/vr/vr_core_info.h",
"//chrome/browser/android/vr/vr_shell_delegate.h",
"//chrome/browser/vr/text_edit_action.h",
"//chrome/browser/vr/ui_test_input.h",
"//chrome/browser/vr/ui_unsupported_mode.h",
]
}
java_cpp_enum("sync_user_settings_enums_java") {
sources = [ "//components/sync/driver/sync_user_settings.h" ]
}
proto_java_library("partner_location_descriptor_proto_java") {
proto_path = "java/src/org/chromium/chrome/browser/omnibox/geo"
sources = [ "$proto_path/partner_location_descriptor.proto" ]
}
proto_java_library("critical_persisted_tab_data_proto_java") {
proto_path = "java/src/org/chromium/chrome/browser/tab/state/proto"
sources = [ "$proto_path/critical_persisted_tab_data.proto" ]
}
proto_java_library("update_proto_java") {
proto_path = "java/src/org/chromium/chrome/browser/omaha/metrics"
sources = [ "$proto_path/update_success_tracking.proto" ]
}
proto_java_library("usage_stats_proto_java") {
proto_path = "../browser/android/usage_stats"
sources = [ "$proto_path/website_event.proto" ]
}
java_cpp_template("resource_id_javagen") {
sources = [ "java/ResourceId.template" ]
package_path = "org/chromium/chrome/browser/resources"
inputs = [
"../browser/android/resource_id.h",
"//components/resources/android/blocked_content_resource_id.h",
"//components/resources/android/page_info_resource_id.h",
"//components/resources/android/permissions_resource_id.h",
]
}
junit_binary("chrome_junit_tests") {
# From java_sources.gni.
sources = chrome_junit_test_java_sources
# Should not have any deps native targets since junit tests are java-only.
assert_no_deps = [
"//content",
"//mojo/public/mojom/base",
]
deps = [
":app_hooks_java",
":chrome_app_java_resources",
":chrome_java",
":partner_location_descriptor_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
"$google_play_services_package:google_play_services_cast_framework_java",
"$google_play_services_package:google_play_services_cast_java",
"$google_play_services_package:google_play_services_fido_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//base:jni_java",
"//chrome/android:update_proto_java",
"//chrome/android:usage_stats_proto_java",
"//chrome/android/features/keyboard_accessory:internal_java",
"//chrome/android/features/start_surface/internal:java",
"//chrome/android/features/tab_ui:java",
"//chrome/android/webapk/libs/client:client_java",
"//chrome/android/webapk/libs/common:common_java",
"//chrome/android/webapk/libs/common:splash_java",
"//chrome/android/webapk/test:junit_test_support",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/browser_controls/android:java",
"//chrome/browser/browser_controls/android:junit",
"//chrome/browser/download/android:java",
"//chrome/browser/download/android:junit_tests",
"//chrome/browser/flags:flags_junit_tests",
"//chrome/browser/flags:java",
"//chrome/browser/fullscreen/android:java",
"//chrome/browser/image_fetcher:java",
"//chrome/browser/optimization_guide/android:junit_tests",
"//chrome/browser/performance_hints/android:java",
"//chrome/browser/preferences:java",
"//chrome/browser/preferences:preferences_junit_tests",
"//chrome/browser/profiles/android:java",
"//chrome/browser/safety_check/android:java",
"//chrome/browser/safety_check/android:junit",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/thumbnail:java",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/browser/ui/android/appmenu/internal:junit",
"//chrome/browser/ui/android/default_browser_promo:java",
"//chrome/browser/ui/android/default_browser_promo:junit",
"//chrome/browser/ui/android/favicon:java",
"//chrome/browser/ui/android/native_page:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/ui/messages/android:junit",
"//chrome/browser/util:java",
"//chrome/browser/xsurface:java",
"//chrome/test/android:chrome_java_test_support",
"//components/background_task_scheduler:background_task_scheduler_java",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/bookmarks/common/android:bookmarks_java",
"//components/browser_ui/android/bottomsheet:java",
"//components/browser_ui/media/android:java",
"//components/browser_ui/notifications/android:java",
"//components/browser_ui/share/android:java",
"//components/browser_ui/site_settings/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/content_settings/android:content_settings_enums_java",
"//components/dom_distiller/core/android:dom_distiller_core_java",
"//components/embedder_support/android:browser_context_java",
"//components/embedder_support/android:content_view_java",
"//components/embedder_support/android:context_menu_java",
"//components/embedder_support/android:junit_test_support",
"//components/embedder_support/android:util_java",
"//components/feature_engagement/public:public_java",
"//components/feed/core/proto:proto_java",
"//components/feed/core/proto:proto_java_v2",
"//components/minidump_uploader:minidump_uploader_java",
"//components/module_installer/android:module_installer_java",
"//components/offline_items_collection/core:core_java",
"//components/omnibox/browser:browser_java",
"//components/page_info/android:java",
"//components/payments/content/android:java",
"//components/payments/mojom:mojom_java",
"//components/prefs/android:java",
"//components/schema_org/common:mojom_java",
"//components/search_engines/android:java",
"//components/security_state/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//components/signin/core/browser/android:java",
"//components/signin/core/browser/android:signin_java_test_support",
"//components/signin/public/android:java",
"//components/sync:sync_java_test_support",
"//components/sync/android:sync_java",
"//components/url_formatter/android:url_formatter_java",
"//components/variations/android:variations_java",
"//components/version_info/android:version_constants_java",
"//components/webapk/android/libs/client:java",
"//components/webapk/android/libs/common:java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//mojo/public/java:bindings_java",
"//mojo/public/java:system_java",
"//net/android:net_java",
"//services/media_session/public/cpp/android:media_session_java",
"//services/media_session/public/mojom:mojom_java",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:androidx_collection_collection_java",
"//third_party/android_deps:androidx_lifecycle_lifecycle_common_java",
"//third_party/android_deps:androidx_mediarouter_mediarouter_java",
"//third_party/android_deps:androidx_recyclerview_recyclerview_java",
"//third_party/android_deps:androidx_swiperefreshlayout_swiperefreshlayout_java",
"//third_party/android_deps:androidx_test_core_java",
"//third_party/android_deps:com_google_dagger_dagger_java",
"//third_party/android_deps:com_google_protobuf_protobuf_javalite_java",
"//third_party/android_deps:com_googlecode_java_diff_utils_diffutils_java",
"//third_party/android_sdk/androidx_browser:androidx_browser_java",
"//third_party/blink/public:blink_headers_java",
"//third_party/blink/public/mojom:android_mojo_bindings_java",
"//third_party/blink/public/mojom:mojom_platform_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/gif_player:gif_player_java",
"//third_party/google-truth:google_truth_java",
"//third_party/guava:guava_android_java",
"//third_party/hamcrest:hamcrest_java",
"//ui/android:ui_java",
"//ui/base/mojom:mojom_java",
"//url:gurl_java",
"//url:origin_java",
"//url/mojom:url_mojom_gurl_java",
]
data_deps = [ "//testing/buildbot/filters:chrome_junit_tests_filters" ]
package_name = chrome_public_manifest_package
}
process_version("chrome_version_constants") {
process_only = true
template_file = "java/ChromeVersionConstants.java.version"
sources = [ branding_file_path ]
output = _chrome_version_java_file
}
# Files used for both chrome tests and VR/AR and autofill_assistant tests
android_library("chrome_test_util_java") {
testonly = true
sources = [
"javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTestRule.java",
"javatests/src/org/chromium/chrome/browser/customtabs/CustomTabsTestUtils.java",
"javatests/src/org/chromium/chrome/browser/directactions/FakeDirectActionReporter.java",
"javatests/src/org/chromium/chrome/browser/media/RouterTestUtils.java",
"javatests/src/org/chromium/chrome/browser/webapps/TestFetchStorageCallback.java",
"javatests/src/org/chromium/chrome/browser/webapps/WebappActivityTestRule.java",
]
deps = [
":browser_java_test_support",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:chrome_java",
"//chrome/browser/tab:java",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/test/android:chrome_java_test_support",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//net/android:net_java_test_support",
"//third_party/android_deps:android_support_v4_java",
"//third_party/android_deps:espresso_java",
"//third_party/android_media:android_media_resources",
"//third_party/android_sdk/androidx_browser:androidx_browser_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit:junit",
]
}
android_library("chrome_test_java") {
testonly = true
# From java_sources.gni.
sources = chrome_test_java_sources
deps = [
":browser_java_test_support",
":chrome_app_java_resources",
":chrome_test_util_java",
":native_java_unittests_java",
":partner_location_descriptor_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
"$google_play_services_package:google_play_services_cast_framework_java",
"$google_play_services_package:google_play_services_cast_java",
"$google_play_services_package:google_play_services_fido_java",
"$google_play_services_package:google_play_services_gcm_java",
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:jni_java",
"//base/test:test_support_java",
"//chrome/android:app_hooks_java",
"//chrome/android:chrome_java",
"//chrome/android/features/start_surface/internal:java",
"//chrome/android/features/tab_ui:java",
"//chrome/android/third_party/compositor_animator:compositor_animator_java",
"//chrome/android/webapk/libs/client:client_java",
"//chrome/android/webapk/libs/common:common_java",
"//chrome/browser/android/crypto:java",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/browser_controls/android:java",
"//chrome/browser/download/android:java",
"//chrome/browser/enterprise/util:java",
"//chrome/browser/flags:java",
"//chrome/browser/fullscreen/android:java",
"//chrome/browser/offline_pages/android:java",
"//chrome/browser/password_manager/android_test_helpers:test_support_java",
"//chrome/browser/performance_hints/android:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/safety_check/android:java",
"//chrome/browser/settings:java",
"//chrome/browser/settings:javatests",
"//chrome/browser/settings:test_support_java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/thumbnail:java",
"//chrome/browser/thumbnail:javatests",
"//chrome/browser/ui/android/appmenu:java",
"//chrome/browser/ui/android/appmenu/test:test_support_java",
"//chrome/browser/ui/android/default_browser_promo:java",
"//chrome/browser/ui/android/default_browser_promo:javatests",
"//chrome/browser/ui/android/favicon:java",
"//chrome/browser/ui/android/native_page:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/util:java",
"//chrome/test:sync_integration_test_support_java",
"//chrome/test/android:chrome_java_test_pagecontroller",
"//chrome/test/android:chrome_java_test_support",
"//chrome/test/android/test_trusted_web_activity:test_trusted_web_activity_java",
"//components/autofill/android:autofill_java",
"//components/background_task_scheduler:background_task_scheduler_java",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/background_task_scheduler/internal:background_task_scheduler_javatests",
"//components/bookmarks/common/android:bookmarks_java",
"//components/browser_ui/android/bottomsheet:java",
"//components/browser_ui/android/bottomsheet/test:java",
"//components/browser_ui/modaldialog/android:java",
"//components/browser_ui/modaldialog/android:javatests",
"//components/browser_ui/notifications/android:java",
"//components/browser_ui/notifications/android:test_support_java",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/share/android:java",
"//components/browser_ui/share/android:javatests",
"//components/browser_ui/site_settings/android:java",
"//components/browser_ui/site_settings/android:javatests",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/browser_ui/widget/android:javatests",
"//components/browser_ui/widget/android:test_support_java",
"//components/content_settings/android:content_settings_enums_java",
"//components/content_settings/android:java",
"//components/crash/android:java",
"//components/dom_distiller/core/android:dom_distiller_core_java",
"//components/dom_distiller/core/mojom:mojom_java",
"//components/download/internal/background_service:internal_java",
"//components/download/internal/common:internal_java",
"//components/download/network:network_java",
"//components/download/public/common:public_java",
"//components/embedder_support/android:browser_context_java",
"//components/embedder_support/android:content_view_java",
"//components/embedder_support/android:util_java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/embedder_support/android:web_contents_delegate_javatests",
"//components/external_intents/android:java",
"//components/external_intents/android:javatests",
"//components/feature_engagement:feature_engagement_java",
"//components/gcm_driver/android:gcm_driver_java",
"//components/gcm_driver/instance_id/android:instance_id_driver_java",
"//components/gcm_driver/instance_id/android:instance_id_driver_test_support_java",
"//components/infobars/android:java",
"//components/infobars/android:javatests",
"//components/infobars/core:infobar_enums_java",
"//components/javascript_dialogs/android:java",
"//components/location/android:location_java",
"//components/metrics:metrics_java",
"//components/minidump_uploader:minidump_uploader_java",
"//components/minidump_uploader:minidump_uploader_javatests",
"//components/navigation_interception/android:navigation_interception_java",
"//components/offline_items_collection/core:core_java",
"//components/offline_pages/core/prefetch:offline_prefetch_proto_java",
"//components/omnibox/browser:browser_java",
"//components/page_info/android:java",
"//components/page_info/android:page_info_action_enum_java",
"//components/paint_preview/player/android:javatests",
"//components/payments/content/android:java",
"//components/payments/mojom:mojom_java",
"//components/permissions/android:java",
"//components/policy/android:policy_java",
"//components/policy/android:policy_java_test_support",
"//components/prefs/android:java",
"//components/query_tiles:public_java",
"//components/query_tiles:test_support_java",
"//components/safe_browsing/android:safe_browsing_java",
"//components/schema_org/common:mojom_java",
"//components/search_engines/android:java",
"//components/security_interstitials/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//components/signin/core/browser/android:java",
"//components/signin/core/browser/android:signin_java_test_support",
"//components/signin/core/browser/android:signin_javatests",
"//components/signin/public/android:java",
"//components/sync:sync_java_test_support",
"//components/sync/android:sync_java",
"//components/sync/android:sync_javatests",
"//components/sync/protocol:protocol_java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//components/webapk/android/libs/client:java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//media/base/android:java_switches",
"//media/base/android:media_java",
"//mojo/public/java:bindings_java",
"//mojo/public/java:system_java",
"//mojo/public/mojom/base:base_java",
"//net/android:net_java",
"//net/android:net_java_test_support",
"//printing:printing_java",
"//services:service_javatests",
"//services/device/public/java:geolocation_java",
"//services/device/public/java:geolocation_java_test_support",
"//services/network/public/mojom:mojom_java",
"//services/service_manager/public/java:service_manager_java",
"//third_party/android_data_chart:android_data_chart_java",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:androidx_appcompat_appcompat_resources_java",
"//third_party/android_deps:androidx_collection_collection_java",
"//third_party/android_deps:androidx_lifecycle_lifecycle_common_java",
"//third_party/android_deps:androidx_preference_preference_java",
"//third_party/android_deps:androidx_recyclerview_recyclerview_java",
"//third_party/android_deps:androidx_viewpager_viewpager_java",
"//url:origin_java",
# TODO (bjoyce): Remove recyclerview_v7 when espresso tests are migrated
# to androidx.
"//third_party/android_deps:com_android_support_recyclerview_v7_java",
"//third_party/android_deps:com_google_android_material_material_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
"//third_party/android_deps:com_google_protobuf_protobuf_javalite_java",
"//third_party/android_deps:espresso_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_sdk:android_test_runner_java",
"//third_party/android_sdk/androidx_browser:androidx_browser_java",
"//third_party/android_support_test_runner:rules_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/blink/public:blink_headers_java",
"//third_party/blink/public/mojom:android_mojo_bindings_java",
"//third_party/blink/public/mojom:mojom_mhtml_load_result_java",
"//third_party/blink/public/mojom:mojom_platform_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/hamcrest:hamcrest_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//third_party/ub-uiautomator:ub_uiautomator_java",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
"//ui/android:ui_javatests",
"//ui/base/mojom:mojom_java",
"//url:gurl_java",
"//url/mojom:url_mojom_gurl_java",
]
if (enable_feed_in_chrome) {
deps += feed_test_deps
}
data = [
"//chrome/test/data/android/",
"//chrome/test/data/autofill/",
"//chrome/test/data/background_sync/",
"//chrome/test/data/banners/",
"//chrome/test/data/dom_distiller/",
"//chrome/test/data/browsing_data/",
"//chrome/test/data/encoding_tests/auto_detect/Big5_with_no_encoding_specified.html",
"//chrome/test/data/geolocation/",
"//chrome/test/data/google/",
"//chrome/test/data/image_search/valid.png",
"//chrome/test/data/media/",
"//chrome/test/data/navigation_interception/",
"//chrome/test/data/notifications/",
"//chrome/test/data/offline_pages/",
"//chrome/test/data/password/",
"//chrome/test/data/popup_blocker/",
"//chrome/test/data/push_messaging/",
"//chrome/test/data/translate/",
"//chrome/test/media_router/resources/",
"//components/test/data/autofill/",
"//components/test/data/paint_preview/",
"//components/test/data/payments/",
"//content/test/data/browsing_data/",
"//content/test/data/android/authenticator.html",
"//content/test/data/android/auto_downloads_permissions.html",
"//content/test/data/android/eme_permissions.html",
"//content/test/data/android/geolocation.html",
"//content/test/data/android/installedapp.html",
"//content/test/data/android/media_permissions.html",
"//content/test/data/android/midi_permissions.html",
"//content/test/data/android/permission_navigation.html",
"//content/test/data/android/quota_permissions.html",
"//content/test/data/android/webshare.html",
"//content/test/data/android/webshare-apk.html",
"//content/test/data/android/webshare-bmp.html",
"//content/test/data/android/webshare-csv.html",
"//content/test/data/android/webshare-dex.html",
"//content/test/data/android/webshare-ogg.html",
"//content/test/data/android/webshare-many.html",
"//content/test/data/android/webshare-large.html",
"//content/test/data/media/bear.webm",
"//content/test/data/media/getusermedia.html",
"//content/test/data/media/session/",
"//content/test/data/media/video-player.html",
"//content/test/data/media/webrtc_test_utilities.js",
"//media/test/data/bear.mp4",
"//media/test/data/bear-vp8-webvtt.webm",
"//media/test/data/bear-vp8a.webm",
"//media/test/data/sfx.mp3",
]
data_deps = [ "//ui/base:goldctl" ]
}
if (enable_vr || enable_arcore) {
# Desugaring doesn't seem to play nice with deps when there are multiple
# layers of android_library. If A is included in B's deps, and B is included
# in C's deps, desugar can fail to find classes from A. As a workaround,
# have each android_library have duplicate entries in their deps lists.
# See https://crbug.com/860018.
chrome_test_xr_java_deps = [
":chrome_test_util_java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:app_hooks_java",
"//chrome/android:chrome_java",
"//chrome/android/features/vr:java",
"//chrome/browser/tab:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/util:java",
"//chrome/test/android:chrome_java_test_support",
"//components/embedder_support/android:util_java",
"//components/permissions/android:java",
"//components/policy/android:policy_java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//net/android:net_java_test_support",
"//third_party/android_deps:android_support_v7_appcompat_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:androidx_lifecycle_lifecycle_common_java",
"//third_party/android_deps:androidx_recyclerview_recyclerview_java",
"//third_party/android_sdk/androidx_browser:androidx_browser_java",
"//third_party/android_support_test_runner:rules_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit",
"//third_party/ub-uiautomator:ub_uiautomator_java",
"//ui/android:ui_java",
]
# Files used for both VR and AR testing
android_library("chrome_test_xr_java") {
testonly = true
sources = [
"javatests/src/org/chromium/chrome/browser/vr/WebXrTestFramework.java",
"javatests/src/org/chromium/chrome/browser/vr/XrTestFramework.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/ChromeTabbedActivityXrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/CustomTabActivityXrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/WebappActivityXrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/XrActivityRestriction.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/XrActivityRestrictionRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/XrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/util/PermissionUtils.java",
"javatests/src/org/chromium/chrome/browser/vr/util/XrTestRuleUtils.java",
]
deps = chrome_test_xr_java_deps
data = [
"//chrome/test/data/android/feed/",
"//chrome/test/data/xr/e2e_test_files/",
"//third_party/blink/web_tests/resources/testharness.js",
]
data_deps = [ "//ui/base:goldctl" ]
}
if (enable_vr) {
# All files necessary for VR instrumentation tests
android_library("chrome_test_vr_java") {
testonly = true
sources = [
"javatests/src/org/chromium/chrome/browser/vr/EmulatedVrController.java",
"javatests/src/org/chromium/chrome/browser/vr/TestVrShellDelegate.java",
"javatests/src/org/chromium/chrome/browser/vr/VrDaydreamReadyModuleInstallTest.java",
"javatests/src/org/chromium/chrome/browser/vr/VrInstallUpdateInfoBarTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrDeviceTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrInputTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrPermissionTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrPermissionTestFramework.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrTabTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrTestFramework.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrVrTransitionTest.java",
"javatests/src/org/chromium/chrome/browser/vr/mock/MockBrowserKeyboardInterface.java",
"javatests/src/org/chromium/chrome/browser/vr/mock/MockVrCoreVersionChecker.java",
"javatests/src/org/chromium/chrome/browser/vr/mock/MockVrDaydreamApi.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/ChromeTabbedActivityVrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/CustomTabActivityVrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/VrActivityRestrictionRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/VrModuleNotInstalled.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/VrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/WebappActivityVrTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/util/NativeUiUtils.java",
"javatests/src/org/chromium/chrome/browser/vr/util/RenderTestUtils.java",
"javatests/src/org/chromium/chrome/browser/vr/util/VrInfoBarUtils.java",
"javatests/src/org/chromium/chrome/browser/vr/util/VrShellDelegateUtils.java",
"javatests/src/org/chromium/chrome/browser/vr/util/VrTestRuleUtils.java",
"javatests/src/org/chromium/chrome/browser/vr/util/VrTransitionUtils.java",
]
deps =
chrome_test_xr_java_deps + [
":chrome_test_util_java",
"//chrome/android:chrome_test_xr_java",
"//components/module_installer/android:module_installer_java",
"//components/browser_ui/site_settings/android:java",
"//components/content_settings/android:content_settings_enums_java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:java",
"//chrome/browser/tabmodel:java",
"//third_party/gvr-android-sdk:controller_test_api_java",
"//third_party/gvr-android-sdk:gvr_common_java",
"//ui/android:ui_java_test_support",
]
data = [
"//chrome/android/shared_preference_files/test/",
"//components/test/data/js_dialogs/render_tests/",
"//components/test/data/permission_dialogs/render_tests/",
"//components/test/data/vr_browser_ui/render_tests/",
"//components/test/data/vr_browser_video/render_tests/",
"//third_party/gvr-android-sdk/test-apks/",
]
}
}
if (enable_arcore) {
# All files necessary for AR instrumentation tests
android_library("chrome_test_ar_java") {
testonly = true
sources = [
"javatests/src/org/chromium/chrome/browser/vr/WebXrArHitTestTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrArSessionTest.java",
"javatests/src/org/chromium/chrome/browser/vr/WebXrArTestFramework.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/ArPlaybackFile.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/ArTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/ChromeTabbedActivityArTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/CustomTabActivityArTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/rules/WebappActivityArTestRule.java",
"javatests/src/org/chromium/chrome/browser/vr/util/ArTestRuleUtils.java",
]
deps =
chrome_test_xr_java_deps + [ "//chrome/android:chrome_test_xr_java" ]
data = [
"//chrome/test/data/xr/ar_playback_datasets/",
"//third_party/arcore-android-sdk/test-apks/",
]
}
}
}
# Overrides icon / name defined in chrome_app_java_resources.
android_resources("chrome_public_apk_resources") {
sources = [
"java/res_chromium/drawable-hdpi/fre_product_logo.png",
"java/res_chromium/drawable-hdpi/product_logo_name.png",
"java/res_chromium/drawable-mdpi/fre_product_logo.png",
"java/res_chromium/drawable-mdpi/product_logo_name.png",
"java/res_chromium/drawable-xhdpi/fre_product_logo.png",
"java/res_chromium/drawable-xhdpi/product_logo_name.png",
"java/res_chromium/drawable-xxhdpi/fre_product_logo.png",
"java/res_chromium/drawable-xxhdpi/product_logo_name.png",
"java/res_chromium/drawable-xxxhdpi/fre_product_logo.png",
"java/res_chromium/drawable-xxxhdpi/product_logo_name.png",
"java/res_chromium/mipmap-hdpi/app_icon.png",
"java/res_chromium/mipmap-mdpi/app_icon.png",
"java/res_chromium/mipmap-xhdpi/app_icon.png",
"java/res_chromium/mipmap-xxhdpi/app_icon.png",
"java/res_chromium/mipmap-xxxhdpi/app_icon.png",
"java/res_chromium/values/channel_constants.xml",
]
# Dep needed to ensure override works properly.
deps = [ ":chrome_app_java_resources" ]
}
version_resource_dir = "$target_gen_dir/templates/chrome_version_xml/res"
version_resource_file = "$version_resource_dir/values/strings.xml"
process_version("version_xml") {
process_only = true
template_file = "java/version_strings.xml.template"
sources = [ "//chrome/VERSION" ]
output = version_resource_file
}
android_resources("product_version_resources") {
sources = [ version_resource_file ]
custom_package = "org.chromium.base"
deps = [ ":version_xml" ]
}
java_group("chrome_public_non_pak_assets") {
deps =
[ "//chrome/android/webapk/libs/runtime_library:runtime_library_assets" ]
}
java_group("chrome_public_v8_assets") {
if (use_v8_context_snapshot) {
deps = [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ]
} else {
deps = [ "//v8:v8_external_startup_data_assets" ]
}
}
jinja_template_resources("chrome_public_apk_template_resources") {
resources = [
"java/res_template/xml/file_paths.xml",
"java/res_template/xml/launchershortcuts.xml",
"java/res_template/xml/searchable.xml",
"java/res_template/xml/syncadapter.xml",
]
res_dir = "java/res_template"
variables = [ "manifest_package=$chrome_public_manifest_package" ]
}
jinja_template_resources("chrome_test_apk_template_resources") {
resources = [
"java/res_template/xml/file_paths.xml",
"java/res_template/xml/launchershortcuts.xml",
"java/res_template/xml/searchable.xml",
]
res_dir = "java/res_template"
# Add dep to ensure these override the ones in
# chrome_public_apk_template_resources.
deps = [ ":chrome_public_apk_template_resources" ]
variables = [ "manifest_package=$chrome_public_test_manifest_package" ]
}
# Chrome APK's native library.
template("libchrome_impl") {
chrome_common_shared_library(target_name) {
sources = [
"../browser/android/chrome_entry_point.cc",
chrome_jni_registration_header,
]
deps = [ ":chrome_jni_registration($default_toolchain)" ]
if (defined(invoker.deps)) {
deps += invoker.deps
}
if (enable_vr) {
deps += [ "//chrome/browser/android/vr:module_factory" ]
}
module_descs = chrome_modern_module_descs
forward_variables_from(invoker, "*", [ "deps" ])
}
}
if (enable_resource_whitelist_generation) {
libchrome_impl("libchrome_pak_whitelist_inputs") {
collect_inputs_only = true
}
}
libchrome_impl("libchrome") {
if (enable_resource_whitelist_generation) {
# Make sure whitelist_inputs is built first so when concurrent_links == 1
# it comes before the actual (very slow) link step.
deps = [ ":libchrome_pak_whitelist_inputs" ]
}
}
chrome_common_shared_library("libchromefortest") {
testonly = true
sources = [
"../browser/android/chrome_entry_point_for_test.cc",
chrome_jni_for_test_registration_header,
]
deps = [
":browser_test_support",
":chrome_jni_for_test_registration($default_toolchain)",
"//base/test:test_support",
"//chrome:chrome_android_core",
"//chrome/browser/password_manager/android_test_helpers:android_wrappers",
"//chrome/browser/subresource_filter:test_support",
"//components/autofill_assistant/browser:test_support",
"//components/crash/android:crash_android",
"//components/minidump_uploader",
"//components/paint_preview/player/android:test_support",
"//components/sync",
"//components/sync/test/fake_server:fake_server_android",
"//content/public/test/android:content_native_test_support",
"//content/test:test_support",
"//ui/base/clipboard:clipboard_test_support",
]
if (enable_vr) {
deps += [ "//chrome/browser/android/vr:test_support" ]
}
# Make this a partitioned library, since some partitioned code is linked in
# (otherwise, the library will warn at build time that it contains multiple
# symbol tables). However, do not create the partitions, as they are not
# required or packaged into the APK. This can be removed if LLD starts
# supporting a "no partitions" argument (https://crbug.com/1021108).
module_descs = []
}
# Ensure that .pak files are built only once (build them in the default
# toolchain). The central header file calling JNI registration functions
# is generated from Java code so it just needs to be generated once.
if (current_toolchain == default_toolchain) {
generate_jni_registration("chrome_jni_registration") {
targets = [ ":chrome_public_base_module_java" ]
header_output = chrome_jni_registration_header
sources_exclusions = chrome_jni_sources_exclusions
}
# The test apks do not use chromium linker, but using manual JNI registration
# helps ensure that the correct classes are marked with @MainDex.
generate_jni_registration("chrome_jni_for_test_registration") {
testonly = true
targets = [ ":chrome_public_base_module_java_for_test" ]
header_output = chrome_jni_for_test_registration_header
sources_exclusions = chrome_jni_sources_exclusions
}
# This template instantiates targets responsible for generating pak
# resources. The generated target names are derived from input variables.
#
# Variables:
# is_monochrome: If true, generate Monochrome targets rather than Chrome.
# is_trichrome: (Optional) Generate Trichrome targets that use monochrome
# library targets but don't include webview resources.
# is_bundle_module: (Optional) If true, generate targets for base bundle
# module.
template("resource_packaging") {
_is_monochrome = invoker.is_monochrome
_is_trichrome = defined(invoker.is_trichrome) && invoker.is_trichrome
_is_bundle_module =
defined(invoker.is_bundle_module) && invoker.is_bundle_module
if (_is_trichrome) {
_variant = "trichrome_chrome"
} else if (_is_monochrome) {
_variant = "monochrome"
} else {
_variant = "chrome"
}
if (_is_bundle_module) {
_variant += "_bundle_module"
} else {
_variant += "_apk"
}
if (enable_resource_whitelist_generation) {
if (_is_trichrome || _is_monochrome) {
_lib = "libmonochrome_pak_whitelist_inputs"
} else {
_lib = "libchrome_pak_whitelist_inputs"
}
_resource_whitelist_target = "${_variant}_resource_whitelist"
_resource_whitelist_file =
"$target_gen_dir/${_variant}_resource_whitelist.txt"
_lib_path = "/lib.unstripped/" + _lib + shlib_extension
generate_resource_whitelist(_resource_whitelist_target) {
_fat_lib_toolchain = ""
if (_is_monochrome || _is_trichrome) {
# Always use the 32-bit library's whitelist since the 64-bit one is
# webview-only.
if (!android_64bit_target_cpu) {
_fat_lib_toolchain = current_toolchain
} else {
_fat_lib_toolchain = android_secondary_abi_toolchain
}
}
deps = [ ":${_lib}($_fat_lib_toolchain)" ]
inputs = [ get_label_info(deps[0], "root_out_dir") + _lib_path ]
output = _resource_whitelist_file
}
# Use custom resource ID list instead of android_webview's compiler
# resource whitelist because //android_webview:generate_webui_resources
# and //android_webview:generate_components_resources use hand-written
# resource whitelists.
if (_is_monochrome) {
_locale_whitelist_target = "${_variant}_locale_whitelist"
_locale_whitelist_file =
"$target_gen_dir/${_variant}_locale_whitelist.txt"
_system_webview_locale_whitelist_target =
"${_variant}_system_webview_locale_resource_whitelist"
_system_webview_locale_whitelist_file =
"$target_gen_dir/" +
"${_variant}_system_webview_locale_resource_id_list.txt"
action(_system_webview_locale_whitelist_target) {
script = "//tools/grit/pak_util.py"
_system_webview_en_US_locale_pak =
"$root_out_dir/android_webview/locales/en-US.pak"
inputs = [ _system_webview_en_US_locale_pak ]
outputs = [ _system_webview_locale_whitelist_file ]
deps = [ "//android_webview:repack_locales" ]
args = [
"list-id",
"--output",
rebase_path(_system_webview_locale_whitelist_file, root_build_dir),
rebase_path(_system_webview_en_US_locale_pak, root_build_dir),
]
}
action(_locale_whitelist_target) {
script = "//tools/resources/filter_resource_whitelist.py"
inputs = [
_resource_whitelist_file,
_system_webview_locale_whitelist_file,
]
outputs = [ _locale_whitelist_file ]
deps = [
":$_resource_whitelist_target",
":$_system_webview_locale_whitelist_target",
"//android_webview:system_webview_pak_whitelist",
]
args = [
"--input",
rebase_path(_resource_whitelist_file, root_build_dir),
"--filter",
rebase_path(_system_webview_locale_whitelist_file, root_build_dir),
"--output",
rebase_path(_locale_whitelist_file, root_build_dir),
]
}
}
}
chrome_paks("${_variant}_paks") {
output_dir = "$target_gen_dir/${_variant}_paks"
deps = []
additional_extra_paks = []
if (_is_monochrome) {
additional_extra_paks +=
[ "$root_gen_dir/android_webview/aw_resources.pak" ]
deps += [ "//android_webview:generate_aw_resources" ]
if (webview_includes_weblayer) {
additional_extra_paks +=
[ "$root_gen_dir/weblayer/weblayer_resources.pak" ]
deps += [ "//weblayer:resources" ]
}
}
if (!dfmify_dev_ui || !_is_bundle_module) {
additional_extra_paks += [ "$root_gen_dir/chrome/dev_ui_resources.pak" ]
deps += [ "//chrome/browser/resources:dev_ui_paks" ]
}
if (enable_resource_whitelist_generation) {
repack_whitelist = _resource_whitelist_file
deps += [ ":${_resource_whitelist_target}" ]
if (_is_monochrome) {
locale_whitelist = _locale_whitelist_file
deps += [ ":$_locale_whitelist_target" ]
}
}
}
android_assets("${_variant}_locale_pak_assets") {
disable_compression = _is_bundle_module
renaming_sources = []
renaming_destinations = []
# Only include all Android locales on bundle builds.
if (_is_bundle_module) {
_locales_list = locales
} else {
_locales_list = android_apk_locales
}
foreach(_locale, _locales_list) {
renaming_sources +=
[ "$target_gen_dir/${_variant}_paks/locales/$_locale.pak" ]
renaming_destinations += [ "locales/$_locale.pak" ]
}
treat_as_locale_paks = true
deps = [ ":${_variant}_paks" ]
}
# This target explicitly includes locale paks via deps.
android_assets(target_name) {
assert("${_variant}_pak_assets" == target_name)
sources = [
"$target_gen_dir/${_variant}_paks/chrome_100_percent.pak",
"$target_gen_dir/${_variant}_paks/resources.pak",
]
disable_compression = true
deps = [
":${_variant}_locale_pak_assets",
":${_variant}_paks",
]
if (_is_monochrome) {
deps += [ "//android_webview:locale_pak_assets" ]
if (webview_includes_weblayer && !_is_bundle_module) {
deps += [ "//weblayer:locale_pak_assets" ]
}
}
}
}
# Resource packaging varies with Monochrome and bundles because the pak
# resource whitelist is derived from the native library.
resource_packaging("chrome_apk_pak_assets") {
is_monochrome = false
}
resource_packaging("chrome_bundle_module_pak_assets") {
is_monochrome = false
is_bundle_module = true
}
resource_packaging("monochrome_apk_pak_assets") {
is_monochrome = true
}
resource_packaging("monochrome_bundle_module_pak_assets") {
is_monochrome = true
is_bundle_module = true
}
resource_packaging("trichrome_chrome_bundle_module_pak_assets") {
is_monochrome = false
is_trichrome = true
is_bundle_module = true
}
} # current_toolchain == host_toolchain
# Monochrome equivalent of Chrome's APK or bundle library template.
template("libmonochrome_apk_or_bundle_tmpl") {
chrome_common_shared_library(target_name) {
sources = [ "../browser/android/monochrome_entry_point.cc" ]
deps = [
"//android_webview/lib",
"//android_webview/nonembedded",
"//components/crash/android:crashpad_main",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
if (webview_includes_weblayer) {
defines = [ "WEBVIEW_INCLUDES_WEBLAYER" ]
deps += [ "//weblayer:weblayer_lib" ]
}
if (enable_vr) {
deps += [ "//chrome/browser/android/vr:module_factory" ]
}
is_monochrome = true
module_descs = monochrome_module_descs
forward_variables_from(invoker, "*", [ "deps" ])
}
}
if (!android_64bit_target_cpu ||
current_toolchain == android_secondary_abi_toolchain) {
if (enable_resource_whitelist_generation) {
# Avoiding a real link for this step allows the actual libmonochrome to
# run at the same time as R8.
libmonochrome_apk_or_bundle_tmpl("libmonochrome_pak_whitelist_inputs") {
collect_inputs_only = true
}
}
libmonochrome_apk_or_bundle_tmpl("libmonochrome") {
if (enable_resource_whitelist_generation) {
# Make sure whitelist_inputs is built first so when concurrent_links == 1
# it comes before the actual (very slow) link step.
deps = [ ":libmonochrome_pak_whitelist_inputs" ]
}
}
if (android_64bit_target_cpu) {
group("monochrome_64_secondary_abi_lib") {
public_deps = [ ":libmonochrome_64($android_secondary_abi_toolchain)" ]
}
}
} else {
# 64-bit browser library targets (APK and bundle).
libmonochrome_apk_or_bundle_tmpl("libmonochrome_64") {
}
# 32-bit browser library alias targets, pulled in by 64-bit WebView builds.
group("monochrome_secondary_abi_lib") {
public_deps = [ ":libmonochrome($android_secondary_abi_toolchain)" ]
}
}
# Java libraries that go into each public chrome APK and base module. The chrome
# JNI registration is generated based on this target.
# TODO(tiborg): Remove the following three groups once we have a APK / module
# target that contain exactly the grouped java libraries.
java_group("chrome_public_base_module_java") {
deps = [
":app_hooks_java",
":chrome_all_java",
]
}
# Similar to chrome_public_base_module_java but for Java libraries that go into
# the public chrome test APK.
java_group("chrome_public_base_module_java_for_test") {
testonly = true
deps = [
":browser_java_test_support",
":chrome_public_base_module_java",
"//chrome/android/features/autofill_assistant:autofill_assistant_java_test_support",
"//chrome/browser/password_manager/android_test_helpers:test_support_java",
"//chrome/browser/subresource_filter:subresource_filter_java_test_support",
"//chrome/browser/thumbnail:thumbnail_java_test_support",
"//components/minidump_uploader:minidump_uploader_java",
"//components/paint_preview/player/android:player_java_test_support",
"//content/public/test/android:content_java_test_support",
"//ui/android:clipboard_java_test_support",
]
}
# Dependencies that are common to any chrome_public derivative targets.
_chrome_public_shared_deps = [
":chrome_public_apk_resources",
":chrome_public_base_module_java",
":chrome_public_non_pak_assets",
":chrome_public_v8_assets",
"//third_party/icu:icu_assets",
]
generate_jni("test_support_jni_headers") {
testonly = true
sources = [
"javatests/src/org/chromium/chrome/browser/ServicificationBackgroundService.java",
"javatests/src/org/chromium/chrome/browser/offlinepages/OfflineTestUtil.java",
"javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchTestBridge.java",
"javatests/src/org/chromium/chrome/browser/query_tiles/QueryTileFakeServer.java",
"javatests/src/org/chromium/chrome/browser/test/MockCertVerifierRuleAndroid.java",
]
}
# Test support code that needs access to the browser.
android_library("browser_java_test_support") {
testonly = true
sources = [
"javatests/src/org/chromium/chrome/browser/ServicificationBackgroundService.java",
"javatests/src/org/chromium/chrome/browser/offlinepages/OfflineTestUtil.java",
"javatests/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchTestBridge.java",
"javatests/src/org/chromium/chrome/browser/query_tiles/QueryTileFakeServer.java",
"javatests/src/org/chromium/chrome/browser/sync/FakeServerHelper.java",
"javatests/src/org/chromium/chrome/browser/test/MockCertVerifierRuleAndroid.java",
]
deps = [
":chrome_java",
"$google_play_services_package:google_play_services_gcm_java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/browser/profiles/android:java",
"//chrome/browser/tab:java",
"//components/offline_items_collection/core:core_java",
"//components/sync/protocol:protocol_java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:com_google_protobuf_protobuf_javalite_java",
"//third_party/junit",
]
}
static_library("browser_test_support") {
testonly = true
sources = [
"../browser/android/servicification_background_service_jni.cc",
"../browser/android/ssl/mock_cert_verifier_rule_android.cc",
"../browser/android/ssl/mock_cert_verifier_rule_android.h",
"../browser/offline_pages/android/offline_test_util_jni.cc",
"../browser/offline_pages/android/prefetch_test_bridge.cc",
"../browser/query_tiles/query_tile_fake_server.cc",
]
deps = [
":test_support_jni_headers",
"//chrome/browser",
"//chrome/browser/thumbnail:test_support",
"//components/offline_pages/core/background:test_support",
"//components/query_tiles",
"//components/query_tiles/test:test_support",
"//content/test:test_support",
"//net:test_support",
]
}
# Defines a target that derives from the chrome public application. This
# can be either an APK or an app bundle module. This supports both the
# chrome_public_xxx targets (for Android J-K) and chrome_modern_public_xxx
# ones (for Android L-M). For Android N+, see instead
# monochrome_public_apk_or_module_tmpl() below.
#
# Variables:
# target_type: Determines the final target type. Should be one of
# 'android_apk', or 'android_app_bundle_module'.
# apk_name: For 'android_apk' target types, name of the final APK without
# an .apk suffix (e.g. 'ChromePublic').
# is_base_module: For 'android_app_bundle_module' target types only,
# set to true to indicate that this is a base application module
# (instead of a feature module).
# is_modern: Optional. Set to true to indicate that this is a Chrome-modern
# target, intended for Android L and M only.
template("chrome_public_apk_or_module_tmpl") {
_is_modern = defined(invoker.is_modern) && invoker.is_modern
_is_bundle_module = invoker.target_type == "android_app_bundle_module"
chrome_public_common_apk_or_module_tmpl(target_name) {
forward_variables_from(invoker,
[
"apk_name",
"bundle_target",
"is_base_module",
"jni_registration_header",
"is_modern",
"target_type",
"enable_multidex",
"lint_suppressions_dep",
"lint_suppressions_file",
# TODO(crbug.com/1076896): remove
# "disable_library_rename" when we remove chrome
# public apk.
"disable_library_rename",
])
deps = _chrome_public_shared_deps
if (_is_bundle_module) {
deps += [ ":chrome_bundle_module_pak_assets" ]
} else {
deps += [ ":chrome_apk_pak_assets" ]
}
if (_is_modern) {
android_manifest = chrome_modern_public_android_manifest
android_manifest_dep = ":chrome_modern_public_android_manifest"
} else {
android_manifest = chrome_public_android_manifest
android_manifest_dep = ":chrome_public_android_manifest"
}
shared_libraries = [ ":libchrome" ]
# Native libraries can be loaded directly from the APK using the
# Chromium linker. However, we disable this for J-K due to an OEM-specific
# platform bug, where overzealous SELinux settings prevent mapping some apk
# file segments with PROT_EXEC (see http://crbug.com/398425). This was
# fixed for Android L by adding proper CTS tests.
load_library_from_apk = _is_modern && chromium_linker_supported
version_name = chrome_version_name
}
}
# The chrome_public and chrome_modern_public APKs and bundle modules
chrome_public_apk_or_module_tmpl("chrome_public_apk") {
target_type = "android_apk"
apk_name = "ChromePublic"
enable_multidex = is_java_debug
if (android_64bit_target_cpu) {
disable_library_rename = true
}
}
android_resource_sizes_test("resource_sizes_chrome_public_apk") {
apk_name = "ChromePublic"
data_deps = [ ":chrome_public_apk" ]
}
chrome_public_apk_or_module_tmpl("chrome_modern_public_apk") {
target_type = "android_apk"
apk_name = "ChromeModernPublic"
is_modern = true
}
chrome_public_apk_or_module_tmpl("chrome_modern_public_base_bundle_module") {
target_type = "android_app_bundle_module"
is_base_module = true
is_modern = true
bundle_target = ":chrome_modern_public_bundle"
}
android_library("monochrome_java") {
deps = [
"//android_webview:android_webview_java",
"//base:base_java",
"//chrome/android:chrome_java",
"//content/public/android:content_java",
]
sources =
[ "java/src/org/chromium/chrome/browser/MonochromeApplication.java" ]
}
# Defines a target that derives from the monochrome public application. This
# can be either an APK or an app bundle module. Note that these only work
# on Android N+ devices, see chrome_public_apk_or_module_tmpl() for a template
# that supports generating targets for older Android releases.
#
# Variables:
# target_type: Either 'android_apk' or 'android_app_bundle_module'.
# apk_name: For APK target types, the final APK name without an .apk
# suffix (e.g. "MonochromePublic").
# is_base_module: For module target types, a boolean indicating whether
# this is a base bundle module (instead of a feature one).
# is_64_bit_browser: When compiling in a 64-bit configuration, a boolean
# indicating whether the browser is 64-bit or 32-bit.
# include_32_bit_webview: When compiling a 64-bit browser configuration, if
# true, a 32-bit WebView library will also be built and included.
template("monochrome_public_apk_or_module_tmpl") {
_android_manifest =
"$target_gen_dir/manifest/${target_name}/AndroidManifest.xml"
_is_trichrome =
defined(invoker.use_trichrome_library) && invoker.use_trichrome_library
# Generate the manifest here in the template, to avoid a growing collection
# of manually-instantiated manifests.
jinja_template("${target_name}__android_manifest") {
includes = [ "java/AndroidManifest.xml" ]
variables = chrome_public_jinja_variables +
[ "include_arcore_manifest_flag=$enable_arcore" ]
if (_is_trichrome) {
input = "java/AndroidManifest_trichrome_chrome.xml"
variables += trichrome_jinja_variables
if (android_64bit_target_cpu) {
if (invoker.is_64_bit_browser) {
if (invoker.include_32_bit_webview) {
variables += [ "trichrome_version=$trichrome_64_32_version_code" ]
} else {
variables += [ "trichrome_version=$trichrome_64_version_code" ]
}
} else {
if (invoker.include_64_bit_webview) {
variables += [ "trichrome_version=$trichrome_32_64_version_code" ]
} else {
variables += [ "trichrome_version=$trichrome_32_version_code" ]
}
}
} else {
variables += [ "trichrome_version=$trichrome_version_code" ]
}
} else {
_arch = ""
if (android_64bit_target_cpu && invoker.is_64_bit_browser) {
_arch = "_64"
}
input = "java/AndroidManifest_monochrome.xml"
includes += [ "//android_webview/nonembedded/java/AndroidManifest.xml" ]
variables += monochrome_android_manifest_jinja_variables + [
"target_sdk_version=$android_sdk_version",
"webview_library=libmonochrome${_arch}.so",
]
}
# 32-bit is the common case, so remove the ABI variable in the 64-case.
if (android_64bit_target_cpu && invoker.is_64_bit_browser) {
variables -= [ use_32bit_abi_jinja_variable ]
}
output = _android_manifest
}
monochrome_public_common_apk_or_module_tmpl(target_name) {
forward_variables_from(invoker,
[
"apk_name",
"bundle_target",
"expected_android_manifest",
"include_32_bit_webview",
"include_64_bit_webview",
"is_64_bit_browser",
"is_base_module",
"resource_ids_provider_dep",
"static_library_provider",
"static_library_synchronized_proguard",
"target_type",
"use_chromium_linker",
"use_modern_linker",
"use_trichrome_library",
"version_code",
"version_name",
])
android_manifest = _android_manifest
android_manifest_dep = ":${target_name}__android_manifest"
if (public_android_sdk && !_is_trichrome) {
# Resource allowlist used when generating R.java files and causes
# only the webview subset of resources to be marked as non-final.
# Strings in this target will also be kept in the base apk rather than placed in the language splits.
shared_resources_allowlist_target =
"//android_webview:system_webview_no_weblayer_apk"
# Ensure the localized resources for all locales are used, even when
# a smaller set is specified through aapt_locale_allowlist.
shared_resources_allowlist_locales = locales
}
deps = [ "//chrome/android:app_hooks_java" ]
if (!_is_trichrome) {
deps += [
":monochrome_java",
"//android_webview:platform_service_bridge_upstream_implementation_java",
"//android_webview/nonembedded:icon_resources",
"//android_webview/nonembedded:monochrome_devui_launcher_icon_resources",
]
if (webview_includes_weblayer) {
deps += [ "//weblayer/browser/java:gms_bridge_upstream_impl_java" ]
}
}
}
}
# Public webview targets don't work with non-public sdks.
# https://crbug.com/1000763
if (public_android_sdk) {
monochrome_public_apk_or_module_tmpl("monochrome_public_apk") {
version_code = monochrome_version_code
version_name = chrome_version_name
apk_name = "MonochromePublic"
target_type = "android_apk"
if (android_64bit_target_cpu) {
is_64_bit_browser = false
include_64_bit_webview = true
}
}
}
trichrome_library_apk_tmpl("trichrome_library_apk") {
apk_name = "TrichromeLibrary"
android_manifest = trichrome_library_android_manifest
android_manifest_dep = ":trichrome_library_android_manifest"
if (android_64bit_target_cpu) {
is_64_bit_browser = false
include_64_bit_webview = true
}
if (trichrome_synchronized_proguard) {
webview_target = "//android_webview:trichrome_webview_apk"
chrome_target = ":trichrome_chrome_bundle"
}
if (_enable_manifest_verification) {
expected_android_manifest =
"expectations/trichrome_library_apk.AndroidManifest.expected"
}
if (_enable_libs_and_assets_verification) {
expected_libs_and_assets = "expectations/trichrome_library_apk.$target_cpu.libs_and_assets.expected"
}
}
if (android_64bit_target_cpu) {
trichrome_library_apk_tmpl("trichrome_library_32_apk") {
apk_name = "TrichromeLibrary32"
android_manifest = trichrome_library_32_android_manifest
android_manifest_dep = ":trichrome_library_32_android_manifest"
is_64_bit_browser = false
include_64_bit_webview = false
}
trichrome_library_apk_tmpl("trichrome_library_64_32_apk") {
apk_name = "TrichromeLibrary6432"
android_manifest = trichrome_library_64_32_android_manifest
android_manifest_dep = ":trichrome_library_64_32_android_manifest"
is_64_bit_browser = true
include_32_bit_webview = true
}
trichrome_library_apk_tmpl("trichrome_library_64_apk") {
apk_name = "TrichromeLibrary64"
android_manifest = trichrome_library_64_android_manifest
android_manifest_dep = ":trichrome_library_64_android_manifest"
is_64_bit_browser = true
include_32_bit_webview = false
}
}
# TODO(agrieve): Remove this once we switch to using bundle targets to
# generate APK stubs.
android_resources("trichrome_dummy_resources") {
custom_package = "org.chromium.trichromelibrary"
sources = [ "trichrome/res_dummy/values/strings.xml" ]
}
chrome_public_test_apk_manifest =
"$root_gen_dir/chrome_public_test_apk_manifest/AndroidManifest.xml"
chrome_public_test_vr_apk_manifest =
"$root_gen_dir/chrome_public_test_vr_apk_manifest/AndroidManifest.xml"
monochrome_public_test_ar_apk_manifest =
"$root_gen_dir/monochrome_public_test_ar_apk_manifest/AndroidManifest.xml"
jinja_template("chrome_public_test_apk_manifest") {
input = "javatests/AndroidManifest.xml"
includes = [ "java/AndroidManifest.xml" ]
output = chrome_public_test_apk_manifest
variables = default_chrome_public_jinja_variables
variables += [
"manifest_package=$chrome_public_test_manifest_package",
"min_sdk_version=21",
"target_sdk_version=$android_sdk_version",
]
}
jinja_template("chrome_public_test_vr_apk_manifest") {
input = "javatests/AndroidManifest.xml"
includes = [ "java/AndroidManifest.xml" ]
output = chrome_public_test_vr_apk_manifest
variables = chrome_public_jinja_variables
variables += [
"min_sdk_version=21",
"target_sdk_version=$android_sdk_version",
]
}
jinja_template("monochrome_public_test_ar_apk_manifest") {
input = "javatests/AndroidManifest_monochrome.xml"
includes = [
"java/AndroidManifest.xml",
"java/AndroidManifest_monochrome.xml",
"javatests/AndroidManifest.xml",
"//android_webview/nonembedded/java/AndroidManifest.xml",
]
output = monochrome_public_test_ar_apk_manifest
variables = chrome_public_jinja_variables +
monochrome_android_manifest_jinja_variables +
[
"target_sdk_version=$android_sdk_version",
"test_manifest_package=$chrome_public_test_manifest_package",
"webview_library=libmonochrome.so",
"include_arcore_manifest_flag=$enable_arcore",
]
}
template("chrome_test_apk_tmpl") {
chrome_public_common_apk_or_module_tmpl(target_name) {
forward_variables_from(invoker,
[
"apk_name",
"android_manifest",
"android_manifest_dep",
"data_deps",
"enable_lint",
"shared_libraries",
])
testonly = true
target_type = "instrumentation_test_apk"
shared_library_for_unwind_asset = "chromefortest"
bundles_supported = true
deps = _chrome_public_shared_deps + invoker.deps + [
":chrome_apk_pak_assets",
":chrome_public_base_module_java_for_test",
"//third_party/android_support_test_runner:runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_sdk:android_test_runner_java",
]
if (enable_vr) {
# Contains VrFirstRunActivity, which is referenced by AndroidManifest.xml.
deps += [ "//chrome/android/features/vr:java" ]
}
additional_apks = [ "//net/android:net_test_support_apk" ]
if (defined(invoker.additional_apks)) {
additional_apks += invoker.additional_apks
}
if (!is_java_debug) {
proguard_enabled = true
proguard_configs = [ "//chrome/android/java/apk_for_test.flags" ]
}
# TODO(crbug.com/993340): Update test goldens with webp versions of images.
png_to_webp = false
}
}
template("monochrome_test_apk_tmpl") {
monochrome_public_common_apk_or_module_tmpl(target_name) {
forward_variables_from(invoker,
[
"android_manifest",
"android_manifest_dep",
"apk_name",
"data_deps",
"is_64_bit_browser",
"include_64_bit_webview",
"loadable_modules",
"min_sdk_version",
"proguard_configs",
"secondary_abi_loadable_modules",
"shared_libraries",
"target_sdk_version",
])
testonly = true
target_type = "instrumentation_test_apk"
# Always set to false so that we don't have to change the shared library we
# use. See the comment in the monochrome_public_test_ar_apk target for
# details.
add_unwind_tables_in_apk = false
deps = _chrome_public_shared_deps + invoker.deps + [
":monochrome_apk_pak_assets",
":chrome_public_base_module_java_for_test",
"//third_party/android_support_test_runner:runner_java",
"//third_party/android_sdk:android_test_base_java",
"//third_party/android_sdk:android_test_mock_java",
"//third_party/android_sdk:android_test_runner_java",
]
additional_apks = [ "//net/android:net_test_support_apk" ]
if (defined(invoker.additional_apks)) {
additional_apks += invoker.additional_apks
}
if (!is_java_debug) {
if (!defined(proguard_configs)) {
proguard_configs = []
}
proguard_enabled = true
proguard_configs += [ "//chrome/android/java/apk_for_test.flags" ]
}
}
}
chrome_test_apk_tmpl("chrome_public_test_apk") {
enable_lint = true
apk_name = "ChromePublicTest"
android_manifest = chrome_public_test_apk_manifest
android_manifest_dep = ":chrome_public_test_apk_manifest"
shared_libraries = [ ":libchromefortest" ]
deps = [
":chrome_test_apk_template_resources",
":chrome_test_java",
"//chrome/android/features/autofill_assistant:test_java",
"//chrome/android/features/keyboard_accessory:test_java",
"//chrome/android/features/media_router:test_java",
"//chrome/android/webapk/libs/runtime_library:runtime_library_javatests",
"//chrome/android/webapk/shell_apk:shell_apk_javatests",
"//chrome/browser/download/android:download_java_tests",
"//chrome/browser/flags:javatests",
"//chrome/browser/subresource_filter:subresource_filter_javatests",
"//chrome/browser/touch_to_fill/android:test_java",
"//chrome/browser/ui/android/appmenu/internal:javatests",
"//chrome/browser/ui/messages/android:javatests",
"//chrome/browser/util:javatests",
]
data_deps = [ "//testing/buildbot/filters:chrome_public_test_apk_filters" ]
if (enable_chrome_android_internal) {
data_deps += [ "//clank/build/bot/filters:chrome_public_test_apk_filters" ]
}
additional_apks = [
"//chrome/android/webapk/libs/runtime_library/javatests/apk_with_webapk_service:apk_with_webapk_service",
"//chrome/android/webapk/shell_apk:javatests_webapk",
"//chrome/android/webapk/shell_apk/javatests/dex_optimizer:dex_optimizer_apk",
"//chrome/test/android/chrome_public_test_support:chrome_public_test_support_apk",
]
}
if (enable_vr) {
chrome_test_apk_tmpl("chrome_public_test_vr_apk") {
apk_name = "ChromePublicTestVr"
android_manifest = chrome_public_test_vr_apk_manifest
android_manifest_dep = ":chrome_public_test_vr_apk_manifest"
shared_libraries = [ ":libchromefortest" ]
deps = [
":chrome_test_vr_java",
":vr_test_module_desc_java",
"//third_party/android_sdk:android_test_mock_java",
]
}
# This is necessary since vr tests simulate a bundle build.
module_desc_java("vr_test_module_desc_java") {
module_name = "vr"
load_native_on_get_impl = false
}
}
if (enable_arcore) {
monochrome_test_apk_tmpl("monochrome_public_test_ar_apk") {
apk_name = "MonochromePublicTestAr"
android_manifest = monochrome_public_test_ar_apk_manifest
android_manifest_dep = ":monochrome_public_test_ar_apk_manifest"
min_sdk_version = 24
target_sdk_version = android_sdk_version
if (android_64bit_target_cpu) {
is_64_bit_browser = false
include_64_bit_webview = true
}
# This is where we would add the shared_libraries entry for
# :libchromefortest in the non-Monochrome version. However, doing so in the
# Monochrome version causes Chrome to crash on startup due to being unable
# to load the library, and looking at the libraries included in the APK
# shows both libchromefortest and libmonochrome, when only one should be
# present. The tests currently work fine with just libmonochrome, so keep
# it this way until we actually need the test-only library. This may be
# related to monochrome_public_common_apk_or_module_tmpl adding its own
# shared libraries, but chrome_public_common_apk_or_module_tmpl not. See
# https://crbug.com/974017.
deps = [
":chrome_test_ar_java",
"//third_party/android_sdk:android_test_mock_java",
]
# Include ArCore files directly instead of using bundles.
deps += [
"//chrome/browser/android/vr:ar_java",
"//third_party/arcore-android-sdk-client:com_google_ar_core_java",
]
_libarcore_dir = get_label_info(
"//third_party/arcore-android-sdk-client:com_google_ar_core_java($default_toolchain)",
"target_out_dir") + "/com_google_ar_core_java/jni"
# We store this as a separate .so in the APK and only load as needed.
if (android_64bit_target_cpu) {
secondary_abi_loadable_modules =
[ "$_libarcore_dir/armeabi-v7a/libarcore_sdk_c.so" ]
} else {
loadable_modules = [ "$_libarcore_dir/armeabi-v7a/libarcore_sdk_c.so" ]
}
additional_apks = [ "//net/android:net_test_support_apk" ]
proguard_enabled = !is_java_debug
if (proguard_enabled && !enable_proguard_obfuscation) {
proguard_configs = [ "//base/android/proguard/enable_obfuscation.flags" ]
}
}
}
# Chrome smoke test is a minimal test to ensure Chrome is not DOA. It is
# designed to be runnable against uninstrumented Chrome apks.
android_test_apk("chrome_smoke_test_apk") {
apk_name = "ChromeSmokeTest"
android_manifest =
"javatests/src/org/chromium/chrome/test/smoke/AndroidManifest.xml"
target_sdk_version = android_sdk_version
testonly = true
sources =
[ "javatests/src/org/chromium/chrome/test/smoke/ChromeSmokeTest.java" ]
deps = [
"//base:base_java_test_support",
"//chrome/test/android:chrome_java_test_pagecontroller",
"//content/public/test/android:content_java_test_support",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit",
"//third_party/ub-uiautomator:ub_uiautomator_java",
]
}
instrumentation_test_runner("chrome_public_smoke_test") {
apk_under_test = ":chrome_public_apk"
android_test_apk = ":chrome_smoke_test_apk"
android_test_apk_name = "ChromeSmokeTest"
}
instrumentation_test_runner("chrome_modern_public_smoke_test") {
apk_under_test = ":chrome_modern_public_apk"
android_test_apk = ":chrome_smoke_test_apk"
android_test_apk_name = "ChromeSmokeTest"
}
# Public webview targets don't work with non-public sdks.
# https://crbug.com/1000763
if (public_android_sdk) {
instrumentation_test_runner("monochrome_public_smoke_test") {
apk_under_test = ":monochrome_public_apk"
android_test_apk = ":chrome_smoke_test_apk"
android_test_apk_name = "ChromeSmokeTest"
never_incremental = true
}
}
android_test_apk("chrome_bundle_smoke_test_apk") {
apk_name = "ChromeBundleSmokeTest"
android_manifest =
"javatests/src/org/chromium/chrome/test/smoke/AndroidManifest_bundle.xml"
target_sdk_version = android_sdk_version
testonly = true
sources = [
"javatests/src/org/chromium/chrome/test/smoke/ChromeBundleSmokeTest.java",
]
# Used as test_apk for bundle smoke tests, which are also never_incremental.
# The test_runner_script target does not support incremental test_apk when
# the parent target is never_incremental.
never_incremental = true
deps = [
"//base:base_java",
"//base:base_java_test_support",
"//chrome/test/android:chrome_java_test_pagecontroller",
"//content/public/test/android:content_java_test_support",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit",
]
}
_bundle_smoke_test_extra_args = [
# Make extra args be passed through to the bundle under test (see below).
"--use-apk-under-test-flags-file",
# Chrome crashes at startup if strict mode is turned on.
"--strict-mode=off",
# These args are passed through to the bundle under test.
"--enable-test-dummy-module",
"--disable-fre",
]
instrumentation_test_runner("chrome_modern_public_bundle_smoke_test") {
apk_under_test = ":chrome_modern_public_bundle_apks"
android_test_apk = ":chrome_bundle_smoke_test_apk"
android_test_apk_name = "ChromeBundleSmokeTest"
never_incremental = true
modules = [ "test_dummy" ]
extra_args = _bundle_smoke_test_extra_args
}
_bundle_fake_modules_smoke_test_extra_args = [
# These are in addition to the ones listed in _bundle_smoke_test_extra_args.
"--fake-feature-module-install",
]
instrumentation_test_runner(
"chrome_modern_public_bundle_fake_modules_smoke_test") {
apk_under_test = ":chrome_modern_public_bundle_apks"
android_test_apk = ":chrome_bundle_smoke_test_apk"
android_test_apk_name = "ChromeBundleSmokeTest"
never_incremental = true
fake_modules = [ "test_dummy" ]
extra_args =
_bundle_smoke_test_extra_args + _bundle_fake_modules_smoke_test_extra_args
}
# Public webview targets don't work with non-public sdks.
# https://crbug.com/1000763
if (public_android_sdk) {
instrumentation_test_runner("monochrome_public_bundle_smoke_test") {
apk_under_test = "//chrome/android:monochrome_public_bundle_apks"
android_test_apk = ":chrome_bundle_smoke_test_apk"
android_test_apk_name = "ChromeBundleSmokeTest"
never_incremental = true
modules = [ "test_dummy" ]
extra_args = _bundle_smoke_test_extra_args
}
instrumentation_test_runner(
"monochrome_public_bundle_fake_modules_smoke_test") {
apk_under_test = "//chrome/android:monochrome_public_bundle_apks"
android_test_apk = ":chrome_bundle_smoke_test_apk"
android_test_apk_name = "ChromeBundleSmokeTest"
never_incremental = true
fake_modules = [ "test_dummy" ]
extra_args = _bundle_smoke_test_extra_args +
_bundle_fake_modules_smoke_test_extra_args
}
if (defined(expected_static_initializer_count)) {
action_with_pydeps("monochrome_static_initializers") {
script = "//build/android/gyp/assert_static_initializers.py"
inputs = [ "$root_build_dir/apks/MonochromePublic.aab" ]
outputs = [ "$target_gen_dir/$target_name.stamp" ]
deps = [ ":monochrome_public_bundle" ]
args = [
"--expected-count=$expected_static_initializer_count",
"--tool-prefix",
rebase_path(android_tool_prefix, root_build_dir),
"--touch",
rebase_path(outputs[0], root_build_dir),
rebase_path(inputs[0], root_build_dir),
]
}
}
instrumentation_test_runner("trichrome_chrome_bundle_smoke_test") {
apk_under_test = "//chrome/android:trichrome_chrome_bundle_apks"
android_test_apk = ":chrome_bundle_smoke_test_apk"
android_test_apk_name = "ChromeBundleSmokeTest"
never_incremental = true
modules = [ "test_dummy" ]
additional_apks = [ "//chrome/android:trichrome_library_apk" ]
extra_args = _bundle_smoke_test_extra_args
}
instrumentation_test_runner(
"trichrome_chrome_bundle_fake_modules_smoke_test") {
apk_under_test = "//chrome/android:trichrome_chrome_bundle_apks"
android_test_apk = ":chrome_bundle_smoke_test_apk"
android_test_apk_name = "ChromeBundleSmokeTest"
never_incremental = true
fake_modules = [ "test_dummy" ]
additional_apks = [ "//chrome/android:trichrome_library_apk" ]
extra_args = _bundle_smoke_test_extra_args +
_bundle_fake_modules_smoke_test_extra_args
}
}
python_library("chrome_public_wpt") {
testonly = true
pydeps_file = "//testing/scripts/run_android_wpt.pydeps"
data_deps = [
":chrome_public_apk",
"//build/android:test_runner_py",
"//chrome/test/chromedriver:chromedriver($host_toolchain)",
"//third_party/blink/tools:wpt_tests_android_isolate",
]
}
chrome_bundle("chrome_modern_public_bundle") {
base_module_target = ":chrome_modern_public_base_bundle_module"
bundle_name = "ChromeModernPublic"
compress_shared_libraries = true
if (android_64bit_target_cpu) {
is_64_bit_browser = true
include_32_bit_webview = false
}
is_monochrome_or_trichrome = false
manifest_package = chrome_public_manifest_package
min_sdk_version = 21
module_descs = chrome_modern_module_descs
version_code = chrome_modern_version_code
if (_enable_libs_and_assets_verification) {
expected_libs_and_assets = "expectations/chrome_modern_public_bundle.$target_cpu.libs_and_assets.expected"
}
}
if (is_official_build) {
# Used for binary size monitoring.
create_app_bundle_minimal_apks("chrome_modern_public_minimal_apks") {
deps = [ ":chrome_modern_public_bundle" ]
bundle_path = "$root_build_dir/apks/ChromeModernPublic.aab"
}
android_resource_sizes_test(
"resource_sizes_chrome_modern_public_minimal_apks") {
file_path = "$root_build_dir/apks/ChromeModernPublic.minimal.apks"
data_deps = [ ":chrome_modern_public_minimal_apks" ]
}
}
template("monochrome_or_trichrome_public_bundle_tmpl") {
_base_module_target_name = "${invoker.target_name}__base_bundle_module"
_is_trichrome =
defined(invoker.use_trichrome_library) && invoker.use_trichrome_library
# Find the correct version code.
if (_is_trichrome) {
if (android_64bit_target_cpu) {
if (invoker.is_64_bit_browser) {
if (invoker.include_32_bit_webview) {
_version_code = trichrome_64_32_version_code
} else {
_version_code = trichrome_64_version_code
}
} else {
if (invoker.include_64_bit_webview) {
_version_code = trichrome_32_64_version_code
} else {
_version_code = trichrome_32_version_code
}
}
} else {
_version_code = trichrome_version_code
}
} else {
if (android_64bit_target_cpu) {
if (invoker.is_64_bit_browser) {
if (invoker.include_32_bit_webview) {
_version_code = monochrome_64_32_version_code
} else {
_version_code = monochrome_64_version_code
}
} else {
if (invoker.include_64_bit_webview) {
_version_code = monochrome_32_64_version_code
} else {
_version_code = monochrome_32_version_code
}
}
} else {
_version_code = monochrome_version_code
}
}
if (_is_trichrome) {
_bundle_name = "TrichromeChrome${invoker.bundle_suffix}"
_min_sdk_version = 29
_module_descs = trichrome_module_descs
} else {
_bundle_name = "MonochromePublic${invoker.bundle_suffix}"
_min_sdk_version = 24
_module_descs = monochrome_module_descs
}
monochrome_public_apk_or_module_tmpl(_base_module_target_name) {
forward_variables_from(invoker,
[
"expected_android_manifest",
"is_64_bit_browser",
"include_32_bit_webview",
"include_64_bit_webview",
"static_library_provider",
"static_library_synchronized_proguard",
"resource_ids_provider_dep",
"use_trichrome_library",
])
target_type = "android_app_bundle_module"
is_base_module = true
version_code = _version_code
if (!_is_trichrome ||
!defined(invoker.static_library_synchronized_proguard) ||
!invoker.static_library_synchronized_proguard) {
bundle_target = ":${invoker.target_name}"
}
}
chrome_bundle(target_name) {
forward_variables_from(invoker,
[
"include_32_bit_webview",
"include_64_bit_webview",
"is_64_bit_browser",
"static_library_provider",
"static_library_synchronized_proguard",
"expected_libs_and_assets",
"expected_proguard_config",
])
base_module_target = ":$_base_module_target_name"
bundle_name = _bundle_name
is_monochrome_or_trichrome = true
manifest_package = chrome_public_manifest_package
min_sdk_version = _min_sdk_version
module_descs = _module_descs
version_code = _version_code
if (!is_java_debug) {
proguard_android_sdk_dep = webview_framework_dep
}
}
}
# Public webview targets don't work with non-public sdks.
# https://crbug.com/1000763
if (public_android_sdk) {
monochrome_or_trichrome_public_bundle_tmpl("monochrome_public_bundle") {
bundle_suffix = ""
if (android_64bit_target_cpu) {
is_64_bit_browser = false
include_64_bit_webview = true
}
if (_enable_manifest_verification) {
expected_android_manifest =
"expectations/monochrome_public_bundle.AndroidManifest.expected"
expected_proguard_config =
"expectations/monochrome_public_bundle.proguard_flags.expected"
}
if (_enable_libs_and_assets_verification) {
expected_libs_and_assets = "expectations/monochrome_public_bundle.$target_cpu.libs_and_assets.expected"
}
}
if (is_official_build) {
# Used for binary size monitoring.
create_app_bundle_minimal_apks("monochrome_public_minimal_apks") {
deps = [ ":monochrome_public_bundle" ]
bundle_path = "$root_build_dir/apks/MonochromePublic.aab"
}
android_resource_sizes_test(
"resource_sizes_monochrome_public_minimal_apks") {
file_path = "$root_build_dir/apks/MonochromePublic.minimal.apks"
data_deps = [ ":monochrome_public_minimal_apks" ]
}
}
monochrome_or_trichrome_public_bundle_tmpl("trichrome_chrome_bundle") {
bundle_suffix = ""
use_trichrome_library = true
static_library_provider = ":trichrome_library_apk"
if (!is_java_debug) {
static_library_synchronized_proguard = trichrome_synchronized_proguard
if (trichrome_synchronized_proguard) {
resource_ids_provider_dep = "//android_webview:trichrome_webview_apk"
}
}
if (android_64bit_target_cpu) {
is_64_bit_browser = false
include_64_bit_webview = true
}
if (_enable_manifest_verification) {
expected_android_manifest =
"expectations/trichrome_chrome_bundle.AndroidManifest.expected"
}
if (_enable_libs_and_assets_verification) {
expected_libs_and_assets = "expectations/trichrome_chrome_bundle.$target_cpu.libs_and_assets.expected"
}
}
if (is_official_build) {
_trichrome_library_basename = "TrichromeLibrary.apk"
_trichrome_chrome_basename = "TrichromeChrome.minimal.apks"
_trichrome_webview_basename = "TrichromeWebView.minimal.apks"
write_ssargs_trichrome("ssargs_trichrome") {
ssargs_path = "$root_build_dir/apks/Trichrome.ssargs"
trichrome_library_basename = _trichrome_library_basename
trichrome_chrome_basename = _trichrome_chrome_basename
trichrome_webview_basename = _trichrome_webview_basename
}
# Used for binary size monitoring.
create_app_bundle_minimal_apks("trichrome_chrome_minimal_apks") {
deps = [ ":trichrome_chrome_bundle" ]
bundle_path = "$root_build_dir/apks/TrichromeChrome.aab"
}
android_resource_sizes_test("resource_sizes_trichrome") {
apk_name = "Trichrome"
trichrome_library_path =
"$root_build_dir/apks/$_trichrome_library_basename"
trichrome_chrome_path = "$root_build_dir/apks/$_trichrome_chrome_basename"
trichrome_webview_path =
"$root_build_dir/apks/$_trichrome_webview_basename"
data_deps = [
":trichrome_chrome_minimal_apks",
":trichrome_library_apk",
"//android_webview:trichrome_webview_minimal_apks",
]
}
}
if (android_64bit_target_cpu) {
monochrome_or_trichrome_public_bundle_tmpl("monochrome_32_public_bundle") {
bundle_suffix = "32"
is_64_bit_browser = false
include_64_bit_webview = false
}
monochrome_or_trichrome_public_bundle_tmpl("monochrome_64_public_bundle") {
bundle_suffix = "64"
is_64_bit_browser = true
include_32_bit_webview = false
}
monochrome_or_trichrome_public_bundle_tmpl(
"monochrome_64_32_public_bundle") {
bundle_suffix = "6432"
is_64_bit_browser = true
include_32_bit_webview = true
}
monochrome_or_trichrome_public_bundle_tmpl("trichrome_chrome_64_bundle") {
bundle_suffix = "64"
is_64_bit_browser = true
include_32_bit_webview = false
use_trichrome_library = true
static_library_provider = ":trichrome_library_64_apk"
}
monochrome_or_trichrome_public_bundle_tmpl(
"trichrome_chrome_64_32_bundle") {
bundle_suffix = "6432"
is_64_bit_browser = true
include_32_bit_webview = true
use_trichrome_library = true
static_library_provider = ":trichrome_library_64_32_apk"
}
monochrome_or_trichrome_public_bundle_tmpl("trichrome_chrome_32_bundle") {
bundle_suffix = "32"
is_64_bit_browser = false
include_64_bit_webview = false
use_trichrome_library = true
static_library_provider = ":trichrome_library_32_apk"
}
}
}
generate_jni("chrome_jni_headers") {
sources = [
# Files under a feature's public/ dir are included in chrome_java's source
# files, so include these files in chrome_jni_headers.
"java/src/org/chromium/chrome/browser/AfterStartupTaskUtils.java",
"java/src/org/chromium/chrome/browser/AppHooks.java",
"java/src/org/chromium/chrome/browser/ApplicationLifetime.java",
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeVersionInfo.java",
"java/src/org/chromium/chrome/browser/DevToolsServer.java",
"java/src/org/chromium/chrome/browser/IntentHeadersRecorder.java",
"java/src/org/chromium/chrome/browser/IntentHelper.java",
"java/src/org/chromium/chrome/browser/NearOomMonitor.java",
"java/src/org/chromium/chrome/browser/SearchGeolocationDisclosureTabHelper.java",
"java/src/org/chromium/chrome/browser/ServiceTabLauncher.java",
"java/src/org/chromium/chrome/browser/ShortcutHelper.java",
"java/src/org/chromium/chrome/browser/WarmupManager.java",
"java/src/org/chromium/chrome/browser/WebContentsFactory.java",
"java/src/org/chromium/chrome/browser/about_settings/AboutSettingsBridge.java",
"java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java",
"java/src/org/chromium/chrome/browser/announcement/AnnouncementNotificationManager.java",
"java/src/org/chromium/chrome/browser/app/tab_activity_glue/ReparentingTask.java",
"java/src/org/chromium/chrome/browser/autofill/AutofillExpirationDateFixFlowBridge.java",
"java/src/org/chromium/chrome/browser/autofill/AutofillLogger.java",
"java/src/org/chromium/chrome/browser/autofill/AutofillNameFixFlowBridge.java",
"java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java",
"java/src/org/chromium/chrome/browser/autofill/CardUnmaskBridge.java",
"java/src/org/chromium/chrome/browser/autofill/CreditCardScannerBridge.java",
"java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java",
"java/src/org/chromium/chrome/browser/autofill/PhoneNumberUtil.java",
"java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfileBridge.java",
"java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java",
"java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java",
"java/src/org/chromium/chrome/browser/background_sync/GooglePlayServicesChecker.java",
"java/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTask.java",
"java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java",
"java/src/org/chromium/chrome/browser/background_task_scheduler/ProxyNativeTask.java",
"java/src/org/chromium/chrome/browser/banners/AppBannerManager.java",
"java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java",
"java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java",
"java/src/org/chromium/chrome/browser/browserservices/permissiondelegation/InstalledWebappBridge.java",
"java/src/org/chromium/chrome/browser/browserservices/permissiondelegation/InstalledWebappGeolocationBridge.java",
"java/src/org/chromium/chrome/browser/browsing_data/BrowsingDataBridge.java",
"java/src/org/chromium/chrome/browser/browsing_data/BrowsingDataCounterBridge.java",
"java/src/org/chromium/chrome/browser/browsing_data/UrlFilterBridge.java",
"java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java",
"java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java",
"java/src/org/chromium/chrome/browser/complex_tasks/TaskTabHelper.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java",
"java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java",
"java/src/org/chromium/chrome/browser/compositor/CompositorView.java",
"java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java",
"java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java",
"java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java",
"java/src/org/chromium/chrome/browser/compositor/resources/ResourceFactory.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/SceneLayer.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/ScrollingBottomViewSceneLayer.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java",
"java/src/org/chromium/chrome/browser/compositor/scene_layer/ToolbarSceneLayer.java",
"java/src/org/chromium/chrome/browser/consent_auditor/ConsentAuditorBridge.java",
"java/src/org/chromium/chrome/browser/content/ContentUtils.java",
"java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java",
"java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java",
"java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchContext.java",
"java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
"java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java",
"java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java",
"java/src/org/chromium/chrome/browser/contextualsearch/CtrSuppression.java",
"java/src/org/chromium/chrome/browser/contextualsearch/SimpleSearchTermResolver.java",
"java/src/org/chromium/chrome/browser/crash/MinidumpUploadService.java",
"java/src/org/chromium/chrome/browser/crash/PureJavaExceptionHandler.java",
"java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java",
"java/src/org/chromium/chrome/browser/database/SQLiteCursor.java",
"java/src/org/chromium/chrome/browser/device_dialog/BluetoothChooserDialog.java",
"java/src/org/chromium/chrome/browser/device_dialog/BluetoothScanningPermissionDialog.java",
"java/src/org/chromium/chrome/browser/device_dialog/UsbChooserDialog.java",
"java/src/org/chromium/chrome/browser/document/DocumentWebContentsDelegate.java",
"java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java",
"java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java",
"java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java",
"java/src/org/chromium/chrome/browser/download/DownloadController.java",
"java/src/org/chromium/chrome/browser/download/DownloadItem.java",
"java/src/org/chromium/chrome/browser/download/DownloadManagerService.java",
"java/src/org/chromium/chrome/browser/download/DownloadUtils.java",
"java/src/org/chromium/chrome/browser/download/home/rename/RenameUtils.java",
"java/src/org/chromium/chrome/browser/download/items/OfflineContentAggregatorFactory.java",
"java/src/org/chromium/chrome/browser/download/service/DownloadBackgroundTask.java",
"java/src/org/chromium/chrome/browser/download/service/DownloadTaskScheduler.java",
"java/src/org/chromium/chrome/browser/engagement/SiteEngagementService.java",
"java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridge.java",
"java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeExperimental.java",
"java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesCategory.java",
"java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesCategoryTile.java",
"java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesSite.java",
"java/src/org/chromium/chrome/browser/feature_engagement/TrackerFactory.java",
"java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java",
"java/src/org/chromium/chrome/browser/feedback/ProcessIdFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java",
"java/src/org/chromium/chrome/browser/feedback/SystemInfoFeedbackSource.java",
"java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java",
"java/src/org/chromium/chrome/browser/flags/ChromeSessionState.java",
"java/src/org/chromium/chrome/browser/gesturenav/CompositorNavigationGlow.java",
"java/src/org/chromium/chrome/browser/history/BrowsingHistoryBridge.java",
"java/src/org/chromium/chrome/browser/history/HistoryDeletionBridge.java",
"java/src/org/chromium/chrome/browser/history/HistoryDeletionInfo.java",
"java/src/org/chromium/chrome/browser/historyreport/HistoryReportJniBridge.java",
"java/src/org/chromium/chrome/browser/incognito/IncognitoUtils.java",
"java/src/org/chromium/chrome/browser/infobar/AdsBlockedInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/AutofillCreditCardFillingInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/AutofillSaveCardInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBarDelegate.java",
"java/src/org/chromium/chrome/browser/infobar/DownloadProgressInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/DuplicateDownloadInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/FramebustBlockInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/GeneratedPasswordSavedInfoBarDelegate.java",
"java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java",
"java/src/org/chromium/chrome/browser/infobar/InstallableAmbientBadgeInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/InstantAppsInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/InstantAppsInfoBarDelegate.java",
"java/src/org/chromium/chrome/browser/infobar/KnownInterceptionDisclosureInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/NearOomInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/NearOomReductionInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/PermissionInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/PermissionUpdateInfoBarDelegate.java",
"java/src/org/chromium/chrome/browser/infobar/PreviewsInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/PreviewsLitePageInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/ReaderModeInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/SafetyTipInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/SavePasswordInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/SearchGeolocationDisclosureInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/SurveyInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/SyncErrorInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java",
"java/src/org/chromium/chrome/browser/infobar/UpdatePasswordInfoBar.java",
"java/src/org/chromium/chrome/browser/init/NativeStartupBridge.java",
"java/src/org/chromium/chrome/browser/installedapp/InstalledAppProviderImpl.java",
"java/src/org/chromium/chrome/browser/installedapp/PackageHash.java",
"java/src/org/chromium/chrome/browser/instantapps/InstantAppsSettings.java",
"java/src/org/chromium/chrome/browser/locale/LocaleManager.java",
"java/src/org/chromium/chrome/browser/locale/LocaleTemplateUrlLoader.java",
"java/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandler.java",
"java/src/org/chromium/chrome/browser/media/MediaCaptureDevicesDispatcherAndroid.java",
"java/src/org/chromium/chrome/browser/media/PictureInPictureActivity.java",
"java/src/org/chromium/chrome/browser/metrics/BackgroundTaskMemoryMetricsEmitter.java",
"java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java",
"java/src/org/chromium/chrome/browser/metrics/PageLoadMetrics.java",
"java/src/org/chromium/chrome/browser/metrics/UkmRecorder.java",
"java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java",
"java/src/org/chromium/chrome/browser/metrics/UmaUtils.java",
"java/src/org/chromium/chrome/browser/metrics/VariationsSession.java",
"java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java",
"java/src/org/chromium/chrome/browser/navigation_predictor/NavigationPredictorBridge.java",
"java/src/org/chromium/chrome/browser/net/nqe/NetworkQualityProvider.java",
"java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java",
"java/src/org/chromium/chrome/browser/notifications/ActionInfo.java",
"java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java",
"java/src/org/chromium/chrome/browser/notifications/NotificationSettingsBridge.java",
"java/src/org/chromium/chrome/browser/notifications/NotificationSystemStatusUtil.java",
"java/src/org/chromium/chrome/browser/notifications/NotificationTriggerScheduler.java",
"java/src/org/chromium/chrome/browser/notifications/scheduler/DisplayAgent.java",
"java/src/org/chromium/chrome/browser/notifications/scheduler/NotificationSchedulerTask.java",
"java/src/org/chromium/chrome/browser/ntp/ForeignSessionHelper.java",
"java/src/org/chromium/chrome/browser/ntp/LogoBridge.java",
"java/src/org/chromium/chrome/browser/ntp/RecentTabsPagePrefs.java",
"java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java",
"java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java",
"java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsLauncher.java",
"java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java",
"java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java",
"java/src/org/chromium/chrome/browser/offlinepages/CCTRequestStatus.java",
"java/src/org/chromium/chrome/browser/offlinepages/CctOfflinePageModelObserver.java",
"java/src/org/chromium/chrome/browser/offlinepages/OfflinePageArchivePublisherBridge.java",
"java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java",
"java/src/org/chromium/chrome/browser/offlinepages/PublishPageCallback.java",
"java/src/org/chromium/chrome/browser/offlinepages/RequestCoordinatorBridge.java",
"java/src/org/chromium/chrome/browser/offlinepages/SavePageRequest.java",
"java/src/org/chromium/chrome/browser/offlinepages/downloads/OfflinePageDownloadBridge.java",
"java/src/org/chromium/chrome/browser/offlinepages/prefetch/OfflineNotificationBackgroundTask.java",
"java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTask.java",
"java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskScheduler.java",
"java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchNotificationServiceBridge.java",
"java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchedPagesNotifier.java",
"java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationServiceBridge.java",
"java/src/org/chromium/chrome/browser/omnibox/ChromeAutocompleteSchemeClassifier.java",
"java/src/org/chromium/chrome/browser/omnibox/OmniboxPrerender.java",
"java/src/org/chromium/chrome/browser/omnibox/OmniboxViewUtil.java",
"java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java",
"java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java",
"java/src/org/chromium/chrome/browser/paint_preview/services/PaintPreviewDemoService.java",
"java/src/org/chromium/chrome/browser/paint_preview/services/PaintPreviewDemoServiceFactory.java",
"java/src/org/chromium/chrome/browser/paint_preview/services/PaintPreviewTabService.java",
"java/src/org/chromium/chrome/browser/paint_preview/services/PaintPreviewTabServiceFactory.java",
"java/src/org/chromium/chrome/browser/partnerbookmarks/PartnerBookmarksReader.java",
"java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java",
"java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java",
"java/src/org/chromium/chrome/browser/password_manager/AutoSigninFirstRunDialog.java",
"java/src/org/chromium/chrome/browser/password_manager/AutoSigninSnackbarController.java",
"java/src/org/chromium/chrome/browser/password_manager/BiometricAuthenticatorBridge.java",
"java/src/org/chromium/chrome/browser/password_manager/Credential.java",
"java/src/org/chromium/chrome/browser/password_manager/CredentialLeakDialogBridge.java",
"java/src/org/chromium/chrome/browser/password_manager/OnboardingDialogBridge.java",
"java/src/org/chromium/chrome/browser/password_manager/PasswordChangeLauncher.java",
"java/src/org/chromium/chrome/browser/password_manager/PasswordCheckupLauncher.java",
"java/src/org/chromium/chrome/browser/password_manager/PasswordGenerationDialogBridge.java",
"java/src/org/chromium/chrome/browser/password_manager/PasswordGenerationPopupBridge.java",
"java/src/org/chromium/chrome/browser/password_manager/PasswordManagerLauncher.java",
"java/src/org/chromium/chrome/browser/password_manager/settings/PasswordEditingBridge.java",
"java/src/org/chromium/chrome/browser/password_manager/settings/PasswordUIView.java",
"java/src/org/chromium/chrome/browser/permissions/PermissionSettingsBridge.java",
"java/src/org/chromium/chrome/browser/photo_picker/DecoderService.java",
"java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java",
"java/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandler.java",
"java/src/org/chromium/chrome/browser/previews/PreviewsAndroidBridge.java",
"java/src/org/chromium/chrome/browser/printing/TabPrinter.java",
"java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManager.java",
"java/src/org/chromium/chrome/browser/provider/ChromeBrowserProvider.java",
"java/src/org/chromium/chrome/browser/push_messaging/PushMessagingServiceObserver.java",
"java/src/org/chromium/chrome/browser/query_tiles/TileProviderFactory.java",
"java/src/org/chromium/chrome/browser/rappor/RapporServiceBridge.java",
"java/src/org/chromium/chrome/browser/resources/ResourceMapper.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java",
"java/src/org/chromium/chrome/browser/screenshot/EditorScreenshotTask.java",
"java/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceFactory.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationManager.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfAndroidBridge.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfEntry.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfInfoBar.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfModelObserverBridge.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/TargetDeviceInfo.java",
"java/src/org/chromium/chrome/browser/sharing/SharingJNIBridge.java",
"java/src/org/chromium/chrome/browser/sharing/SharingServiceProxy.java",
"java/src/org/chromium/chrome/browser/sharing/click_to_call/ClickToCallMessageHandler.java",
"java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardMessageHandler.java",
"java/src/org/chromium/chrome/browser/signin/IdentityServicesProvider.java",
"java/src/org/chromium/chrome/browser/signin/ProfileDownloader.java",
"java/src/org/chromium/chrome/browser/signin/SigninInvestigator.java",
"java/src/org/chromium/chrome/browser/signin/SigninManager.java",
"java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java",
"java/src/org/chromium/chrome/browser/signin/SigninUtils.java",
"java/src/org/chromium/chrome/browser/signin/UnifiedConsentServiceBridge.java",
"java/src/org/chromium/chrome/browser/site_settings/CookieControlsServiceBridge.java",
"java/src/org/chromium/chrome/browser/sms/SmsReceiverInfoBar.java",
"java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java",
"java/src/org/chromium/chrome/browser/suggestions/SuggestionsEventReporterBridge.java",
"java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSites.java",
"java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java",
"java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java",
"java/src/org/chromium/chrome/browser/sync/TrustedVaultClient.java",
"java/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelper.java",
"java/src/org/chromium/chrome/browser/tab/TabFavicon.java",
"java/src/org/chromium/chrome/browser/tab/TabImpl.java",
"java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroidImpl.java",
"java/src/org/chromium/chrome/browser/tab/TrustedCdn.java",
"java/src/org/chromium/chrome/browser/tab/WebContentsStateBridge.java",
"java/src/org/chromium/chrome/browser/tabmodel/TabModelJniBridge.java",
"java/src/org/chromium/chrome/browser/tabmodel/TabModelObserverJniBridge.java",
"java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java",
"java/src/org/chromium/chrome/browser/translate/TranslateBridge.java",
"java/src/org/chromium/chrome/browser/usage_stats/NotificationSuspender.java",
"java/src/org/chromium/chrome/browser/usage_stats/UsageStatsBridge.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkHandlerDelegate.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkInstallService.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkInstaller.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkPostShareTargetNavigator.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkUkmRecorder.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkUpdateDataFetcher.java",
"java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java",
"java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java",
"java/src/org/chromium/chrome/browser/webapps/addtohomescreen/AddToHomescreenCoordinator.java",
"java/src/org/chromium/chrome/browser/webapps/addtohomescreen/AddToHomescreenInstaller.java",
"java/src/org/chromium/chrome/browser/webapps/addtohomescreen/AddToHomescreenMediator.java",
"java/src/org/chromium/chrome/browser/webauth/AuthenticatorImpl.java",
"java/src/org/chromium/chrome/browser/webauth/Fido2Helper.java",
]
# Used for testing only, should not be shipped to end users.
if (enable_offline_pages_harness) {
sources += [ "java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java" ]
}
if (enable_feed_in_chrome) {
sources += [
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedContentBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedDebuggingBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedJournalBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedLifecycleBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedLoggingBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedNetworkBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedOfflineBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedSchedulerBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/v2/FeedServiceBridge.java",
"feed/core/java/src/org/chromium/chrome/browser/feed/v2/FeedStreamSurface.java",
]
}
if (enable_vr) {
sources += [ "java/src/org/chromium/chrome/browser/component_updater/VrAssetsComponentInstaller.java" ]
}
}
native_java_unittests_tests = [
"native_java_unittests/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulatorTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/installedapp/InstalledAppProviderTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediatorUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteResultUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilderUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManagerUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/basic/BasicSuggestionProcessorUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/clipboard/ClipboardSuggestionProcessorTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/status/StatusMediatorUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/base/BaseSuggestionProcessorTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/answer/AnswerSuggestionProcessorUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/editurl/EditUrlSuggestionUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/entity/EntitySuggestionProcessorUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/tiles/TileSuggestionProcessorUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/CachedZeroSuggestionsManagerUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizationsUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinderUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/payments/AndroidPaymentAppUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/payments/PaymentManifestVerifierTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreUnitTest.java",
"native_java_unittests/src/org/chromium/chrome/browser/toolbar/ToolbarSecurityIconTest.java",
]
android_library("native_java_unittests_java") {
testonly = true
deps = [
":browser_java_test_support",
":chrome_app_java_resources",
":chrome_test_util_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:jni_java",
"//base/test:test_support_java",
"//chrome/android:chrome_java",
"//chrome/browser/contextmenu:java",
"//chrome/browser/flags:java",
"//chrome/browser/image_fetcher:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/ui/android/favicon:java",
"//chrome/browser/util:java",
"//chrome/test/android:chrome_java_test_support",
"//components/embedder_support/android:context_menu_java",
"//components/embedder_support/android:util_java",
"//components/omnibox/browser:browser_java",
"//components/payments/content/android:java",
"//components/payments/mojom:mojom_java",
"//components/query_tiles:java",
"//components/search_engines/android:java",
"//components/security_state/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//content/public/android:content_java",
"//content/public/test/android:android_test_message_pump_support_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:androidx_collection_collection_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
"//third_party/blink/public:blink_headers_java",
"//third_party/blink/public/mojom:android_mojo_bindings_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
"//url:gurl_java",
"//url/mojom:url_mojom_gurl_java",
]
sources = [
"native_java_unittests/src/org/chromium/chrome/browser/UnitTestUtils.java",
"native_java_unittests/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionBuilderForTest.java",
]
sources += native_java_unittests_tests
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
}
# See https://bugs.chromium.org/p/chromium/issues/detail?id=908819 for why we
# can't put 'java' in the name here.
generate_jni("native_j_unittests_jni_headers") {
testonly = true
sources = native_java_unittests_tests
feature_list_file = "//chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java"
}
# Used by android-binary-size trybot to know which expectations to validate.
group("validate_expectations") {
deps = []
if (_enable_libs_and_assets_verification) {
deps += [
":chrome_modern_public_bundle_validate_libs_and_assets",
":monochrome_public_bundle_validate_libs_and_assets",
":trichrome_chrome_bundle_validate_libs_and_assets",
":trichrome_library_apk_validate_libs_and_assets",
]
}
if (_enable_manifest_verification) {
deps += [
":monochrome_public_bundle__base_bundle_module_validate_android_manifest",
":monochrome_public_bundle_validate_proguard_config",
":trichrome_chrome_bundle__base_bundle_module_validate_android_manifest",
":trichrome_library_apk_validate_android_manifest",
"//android_webview:system_webview_base_bundle_module_validate_android_manifest",
"//android_webview:trichrome_webview_base_bundle_module_validate_android_manifest",
]
}
}
|