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
// // DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsILoadInfo.idl // /// `typedef uint32_t nsSecurityFlags;` /// pub type nsSecurityFlags = libc::uint32_t; /// `interface nsILoadInfo : nsISupports` /// /// ```text /// /** /// * The LoadInfo object contains information about a network load, why it /// * was started, and how we plan on using the resulting response. /// * If a network request is redirected, the new channel will receive a new /// * LoadInfo object. The new object will contain mostly the same /// * information as the pre-redirect one, but updated as appropriate. /// * For detailed information about what parts of LoadInfo are updated on /// * redirect, see documentation on individual properties. /// */ /// ``` /// // The actual type definition for the interface. This struct has methods // declared on it which will call through its vtable. You never want to pass // this type around by value, always pass it behind a reference. #[repr(C)] pub struct nsILoadInfo { vtable: *const nsILoadInfoVTable, /// This field is a phantomdata to ensure that the VTable type and any /// struct containing it is not safe to send across threads, as XPCOM is /// generally not threadsafe. /// /// XPCOM interfaces in general are not safe to send across threads. __nosync: ::std::marker::PhantomData<::std::rc::Rc<u8>>, } // Implementing XpCom for an interface exposes its IID, which allows for easy // use of the `.query_interface<T>` helper method. This also defines that // method for nsILoadInfo. unsafe impl XpCom for nsILoadInfo { const IID: nsIID = nsID(0xddc65bf9, 0x2f60, 0x41ab, [0xb2, 0x2a, 0x4f, 0x1a, 0xe9, 0xef, 0xcd, 0x36]); } // We need to implement the RefCounted trait so we can be used with `RefPtr`. // This trait teaches `RefPtr` how to manage our memory. unsafe impl RefCounted for nsILoadInfo { #[inline] unsafe fn addref(&self) { self.AddRef(); } #[inline] unsafe fn release(&self) { self.Release(); } } // This trait is implemented on all types which can be coerced to from nsILoadInfo. // It is used in the implementation of `fn coerce<T>`. We hide it from the // documentation, because it clutters it up a lot. #[doc(hidden)] pub trait nsILoadInfoCoerce { /// Cheaply cast a value of this type from a `nsILoadInfo`. fn coerce_from(v: &nsILoadInfo) -> &Self; } // The trivial implementation: We can obviously coerce ourselves to ourselves. impl nsILoadInfoCoerce for nsILoadInfo { #[inline] fn coerce_from(v: &nsILoadInfo) -> &Self { v } } impl nsILoadInfo { /// Cast this `nsILoadInfo` to one of its base interfaces. #[inline] pub fn coerce<T: nsILoadInfoCoerce>(&self) -> &T { T::coerce_from(self) } } // Every interface struct type implements `Deref` to its base interface. This // causes methods on the base interfaces to be directly avaliable on the // object. For example, you can call `.AddRef` or `.QueryInterface` directly // on any interface which inherits from `nsISupports`. impl ::std::ops::Deref for nsILoadInfo { type Target = nsISupports; #[inline] fn deref(&self) -> &nsISupports { unsafe { ::std::mem::transmute(self) } } } // Ensure we can use .coerce() to cast to our base types as well. Any type which // our base interface can coerce from should be coercable from us as well. impl<T: nsISupportsCoerce> nsILoadInfoCoerce for T { #[inline] fn coerce_from(v: &nsILoadInfo) -> &Self { T::coerce_from(v) } } // This struct represents the interface's VTable. A pointer to a statically // allocated version of this struct is at the beginning of every nsILoadInfo // object. It contains one pointer field for each method in the interface. In // the case where we can't generate a binding for a method, we include a void // pointer. #[doc(hidden)] #[repr(C)] pub struct nsILoadInfoVTable { /// We need to include the members from the base interface's vtable at the start /// of the VTable definition. pub __base: nsISupportsVTable, /* readonly attribute nsIPrincipal loadingPrincipal; */ pub GetLoadingPrincipal: unsafe extern "system" fn (this: *const nsILoadInfo, aLoadingPrincipal: *mut *const nsIPrincipal) -> nsresult, /* [binaryname(LoadingPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryLoadingPrincipal (); */ /// Unable to generate binding because `nostdcall is unsupported` pub LoadingPrincipal: *const ::libc::c_void, /* readonly attribute nsIPrincipal triggeringPrincipal; */ pub GetTriggeringPrincipal: unsafe extern "system" fn (this: *const nsILoadInfo, aTriggeringPrincipal: *mut *const nsIPrincipal) -> nsresult, /* [binaryname(TriggeringPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryTriggeringPrincipal (); */ /// Unable to generate binding because `nostdcall is unsupported` pub TriggeringPrincipal: *const ::libc::c_void, /* attribute nsIPrincipal principalToInherit; */ pub GetPrincipalToInherit: unsafe extern "system" fn (this: *const nsILoadInfo, aPrincipalToInherit: *mut *const nsIPrincipal) -> nsresult, /* attribute nsIPrincipal principalToInherit; */ pub SetPrincipalToInherit: unsafe extern "system" fn (this: *const nsILoadInfo, aPrincipalToInherit: *const nsIPrincipal) -> nsresult, /* [binaryname(PrincipalToInherit),noscript,nostdcall,notxpcom] nsIPrincipal binaryPrincipalToInherit (); */ /// Unable to generate binding because `nostdcall is unsupported` pub PrincipalToInherit: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] nsIPrincipal FindPrincipalToInherit (in nsIChannel aChannel); */ /// Unable to generate binding because `nostdcall is unsupported` pub FindPrincipalToInherit: *const ::libc::c_void, /* readonly attribute nsIDOMDocument loadingDocument; */ pub GetLoadingDocument: unsafe extern "system" fn (this: *const nsILoadInfo, aLoadingDocument: *mut *const nsIDOMDocument) -> nsresult, /* [binaryname(LoadingNode),noscript,nostdcall,notxpcom] nsINode binaryLoadingNode (); */ /// Unable to generate binding because `nostdcall is unsupported` pub LoadingNode: *const ::libc::c_void, /* [binaryname(ContextForTopLevelLoad),noscript,nostdcall,notxpcom] nsISupports binaryContextForTopLevelLoad (); */ /// Unable to generate binding because `nostdcall is unsupported` pub ContextForTopLevelLoad: *const ::libc::c_void, /* readonly attribute nsSecurityFlags securityFlags; */ pub GetSecurityFlags: unsafe extern "system" fn (this: *const nsILoadInfo, aSecurityFlags: *mut nsSecurityFlags) -> nsresult, /* [infallible] readonly attribute unsigned long securityMode; */ pub GetSecurityMode: unsafe extern "system" fn (this: *const nsILoadInfo, aSecurityMode: *mut libc::uint32_t) -> nsresult, /* [infallible] readonly attribute boolean isInThirdPartyContext; */ pub GetIsInThirdPartyContext: unsafe extern "system" fn (this: *const nsILoadInfo, aIsInThirdPartyContext: *mut bool) -> nsresult, /* [infallible] readonly attribute unsigned long cookiePolicy; */ pub GetCookiePolicy: unsafe extern "system" fn (this: *const nsILoadInfo, aCookiePolicy: *mut libc::uint32_t) -> nsresult, /* [infallible] readonly attribute boolean forceInheritPrincipal; */ pub GetForceInheritPrincipal: unsafe extern "system" fn (this: *const nsILoadInfo, aForceInheritPrincipal: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean forceInheritPrincipalOverruleOwner; */ pub GetForceInheritPrincipalOverruleOwner: unsafe extern "system" fn (this: *const nsILoadInfo, aForceInheritPrincipalOverruleOwner: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean loadingSandboxed; */ pub GetLoadingSandboxed: unsafe extern "system" fn (this: *const nsILoadInfo, aLoadingSandboxed: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean aboutBlankInherits; */ pub GetAboutBlankInherits: unsafe extern "system" fn (this: *const nsILoadInfo, aAboutBlankInherits: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean allowChrome; */ pub GetAllowChrome: unsafe extern "system" fn (this: *const nsILoadInfo, aAllowChrome: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean disallowScript; */ pub GetDisallowScript: unsafe extern "system" fn (this: *const nsILoadInfo, aDisallowScript: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean dontFollowRedirects; */ pub GetDontFollowRedirects: unsafe extern "system" fn (this: *const nsILoadInfo, aDontFollowRedirects: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean loadErrorPage; */ pub GetLoadErrorPage: unsafe extern "system" fn (this: *const nsILoadInfo, aLoadErrorPage: *mut bool) -> nsresult, /* readonly attribute nsContentPolicyType externalContentPolicyType; */ pub GetExternalContentPolicyType: unsafe extern "system" fn (this: *const nsILoadInfo, aExternalContentPolicyType: *mut nsContentPolicyType) -> nsresult, /* [noscript,notxpcom] nsContentPolicyType internalContentPolicyType (); */ pub InternalContentPolicyType: unsafe extern "system" fn (this: *const nsILoadInfo) -> nsContentPolicyType, /* [infallible] readonly attribute boolean upgradeInsecureRequests; */ pub GetUpgradeInsecureRequests: unsafe extern "system" fn (this: *const nsILoadInfo, aUpgradeInsecureRequests: *mut bool) -> nsresult, /* [infallible] attribute boolean verifySignedContent; */ pub GetVerifySignedContent: unsafe extern "system" fn (this: *const nsILoadInfo, aVerifySignedContent: *mut bool) -> nsresult, /* [infallible] attribute boolean verifySignedContent; */ pub SetVerifySignedContent: unsafe extern "system" fn (this: *const nsILoadInfo, aVerifySignedContent: bool) -> nsresult, /* [infallible] attribute boolean enforceSRI; */ pub GetEnforceSRI: unsafe extern "system" fn (this: *const nsILoadInfo, aEnforceSRI: *mut bool) -> nsresult, /* [infallible] attribute boolean enforceSRI; */ pub SetEnforceSRI: unsafe extern "system" fn (this: *const nsILoadInfo, aEnforceSRI: bool) -> nsresult, /* [infallible] attribute boolean forceAllowDataURI; */ pub GetForceAllowDataURI: unsafe extern "system" fn (this: *const nsILoadInfo, aForceAllowDataURI: *mut bool) -> nsresult, /* [infallible] attribute boolean forceAllowDataURI; */ pub SetForceAllowDataURI: unsafe extern "system" fn (this: *const nsILoadInfo, aForceAllowDataURI: bool) -> nsresult, /* [infallible] readonly attribute boolean forceInheritPrincipalDropped; */ pub GetForceInheritPrincipalDropped: unsafe extern "system" fn (this: *const nsILoadInfo, aForceInheritPrincipalDropped: *mut bool) -> nsresult, /* [infallible] readonly attribute unsigned long long innerWindowID; */ pub GetInnerWindowID: unsafe extern "system" fn (this: *const nsILoadInfo, aInnerWindowID: *mut libc::uint64_t) -> nsresult, /* [infallible] readonly attribute unsigned long long outerWindowID; */ pub GetOuterWindowID: unsafe extern "system" fn (this: *const nsILoadInfo, aOuterWindowID: *mut libc::uint64_t) -> nsresult, /* [infallible] readonly attribute unsigned long long parentOuterWindowID; */ pub GetParentOuterWindowID: unsafe extern "system" fn (this: *const nsILoadInfo, aParentOuterWindowID: *mut libc::uint64_t) -> nsresult, /* [infallible] readonly attribute unsigned long long topOuterWindowID; */ pub GetTopOuterWindowID: unsafe extern "system" fn (this: *const nsILoadInfo, aTopOuterWindowID: *mut libc::uint64_t) -> nsresult, /* [infallible] readonly attribute unsigned long long frameOuterWindowID; */ pub GetFrameOuterWindowID: unsafe extern "system" fn (this: *const nsILoadInfo, aFrameOuterWindowID: *mut libc::uint64_t) -> nsresult, /* void resetPrincipalToInheritToNullPrincipal (); */ pub ResetPrincipalToInheritToNullPrincipal: unsafe extern "system" fn (this: *const nsILoadInfo) -> nsresult, /* [binaryname(ScriptableOriginAttributes),implicit_jscontext] attribute jsval originAttributes; */ /// Unable to generate binding because `native type JS::Value is unsupported` pub GetScriptableOriginAttributes: *const ::libc::c_void, /* [binaryname(ScriptableOriginAttributes),implicit_jscontext] attribute jsval originAttributes; */ /// Unable to generate binding because `native type JS::Value is unsupported` pub SetScriptableOriginAttributes: *const ::libc::c_void, /* [binaryname(GetOriginAttributes),noscript,nostdcall] OriginAttributes binaryGetOriginAttributes (); */ /// Unable to generate binding because `nostdcall is unsupported` pub GetOriginAttributes: *const ::libc::c_void, /* [binaryname(SetOriginAttributes),noscript,nostdcall] void binarySetOriginAttributes (in const_OriginAttributesRef aOriginAttrs); */ /// Unable to generate binding because `native type const mozilla::OriginAttributes is unsupported` pub SetOriginAttributes: *const ::libc::c_void, /* [infallible] attribute boolean enforceSecurity; */ pub GetEnforceSecurity: unsafe extern "system" fn (this: *const nsILoadInfo, aEnforceSecurity: *mut bool) -> nsresult, /* [infallible] attribute boolean enforceSecurity; */ pub SetEnforceSecurity: unsafe extern "system" fn (this: *const nsILoadInfo, aEnforceSecurity: bool) -> nsresult, /* [infallible] attribute boolean initialSecurityCheckDone; */ pub GetInitialSecurityCheckDone: unsafe extern "system" fn (this: *const nsILoadInfo, aInitialSecurityCheckDone: *mut bool) -> nsresult, /* [infallible] attribute boolean initialSecurityCheckDone; */ pub SetInitialSecurityCheckDone: unsafe extern "system" fn (this: *const nsILoadInfo, aInitialSecurityCheckDone: bool) -> nsresult, /* [infallible] attribute boolean loadTriggeredFromExternal; */ pub GetLoadTriggeredFromExternal: unsafe extern "system" fn (this: *const nsILoadInfo, aLoadTriggeredFromExternal: *mut bool) -> nsresult, /* [infallible] attribute boolean loadTriggeredFromExternal; */ pub SetLoadTriggeredFromExternal: unsafe extern "system" fn (this: *const nsILoadInfo, aLoadTriggeredFromExternal: bool) -> nsresult, /* [infallible,noscript] readonly attribute boolean serviceWorkerTaintingSynthesized; */ pub GetServiceWorkerTaintingSynthesized: unsafe extern "system" fn (this: *const nsILoadInfo, aServiceWorkerTaintingSynthesized: *mut bool) -> nsresult, /* void appendRedirectHistoryEntry (in nsIRedirectHistoryEntry entry, in boolean isInternalRedirect); */ pub AppendRedirectHistoryEntry: unsafe extern "system" fn (this: *const nsILoadInfo, entry: *const nsIRedirectHistoryEntry, isInternalRedirect: bool) -> nsresult, /* [implicit_jscontext] readonly attribute jsval redirectChainIncludingInternalRedirects; */ /// Unable to generate binding because `native type JS::Value is unsupported` pub GetRedirectChainIncludingInternalRedirects: *const ::libc::c_void, /* [binaryname(RedirectChainIncludingInternalRedirects),noscript,nostdcall,notxpcom] nsIRedirectHistoryEntryArray binaryRedirectChainIncludingInternalRedirects (); */ /// Unable to generate binding because `nostdcall is unsupported` pub RedirectChainIncludingInternalRedirects: *const ::libc::c_void, /* [implicit_jscontext] readonly attribute jsval redirectChain; */ /// Unable to generate binding because `native type JS::Value is unsupported` pub GetRedirectChain: *const ::libc::c_void, /* [binaryname(RedirectChain),noscript,nostdcall,notxpcom] nsIRedirectHistoryEntryArray binaryRedirectChain (); */ /// Unable to generate binding because `nostdcall is unsupported` pub RedirectChain: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] PrincipalArrayRef AncestorPrincipals (); */ /// Unable to generate binding because `nostdcall is unsupported` pub AncestorPrincipals: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] Uint64ArrayRef AncestorOuterWindowIDs (); */ /// Unable to generate binding because `nostdcall is unsupported` pub AncestorOuterWindowIDs: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void setCorsPreflightInfo (in StringArrayRef unsafeHeaders, in boolean forcePreflight); */ /// Unable to generate binding because `native type const nsTArray<nsCString> is unsupported` pub SetCorsPreflightInfo: *const ::libc::c_void, /* [binaryname(CorsUnsafeHeaders),noscript,nostdcall,notxpcom] StringArrayRef corsUnsafeHeaders (); */ /// Unable to generate binding because `nostdcall is unsupported` pub CorsUnsafeHeaders: *const ::libc::c_void, /* [infallible] readonly attribute boolean forcePreflight; */ pub GetForcePreflight: unsafe extern "system" fn (this: *const nsILoadInfo, aForcePreflight: *mut bool) -> nsresult, /* [infallible] readonly attribute boolean isPreflight; */ pub GetIsPreflight: unsafe extern "system" fn (this: *const nsILoadInfo, aIsPreflight: *mut bool) -> nsresult, /* [infallible,noscript] readonly attribute boolean forceHSTSPriming; */ pub GetForceHSTSPriming: unsafe extern "system" fn (this: *const nsILoadInfo, aForceHSTSPriming: *mut bool) -> nsresult, /* [infallible,noscript] readonly attribute boolean mixedContentWouldBlock; */ pub GetMixedContentWouldBlock: unsafe extern "system" fn (this: *const nsILoadInfo, aMixedContentWouldBlock: *mut bool) -> nsresult, /* [infallible,noscript] attribute boolean isHSTSPriming; */ pub GetIsHSTSPriming: unsafe extern "system" fn (this: *const nsILoadInfo, aIsHSTSPriming: *mut bool) -> nsresult, /* [infallible,noscript] attribute boolean isHSTSPriming; */ pub SetIsHSTSPriming: unsafe extern "system" fn (this: *const nsILoadInfo, aIsHSTSPriming: bool) -> nsresult, /* [infallible,noscript] attribute boolean isHSTSPrimingUpgrade; */ pub GetIsHSTSPrimingUpgrade: unsafe extern "system" fn (this: *const nsILoadInfo, aIsHSTSPrimingUpgrade: *mut bool) -> nsresult, /* [infallible,noscript] attribute boolean isHSTSPrimingUpgrade; */ pub SetIsHSTSPrimingUpgrade: unsafe extern "system" fn (this: *const nsILoadInfo, aIsHSTSPrimingUpgrade: bool) -> nsresult, /* [noscript,nostdcall,notxpcom] void setHSTSPriming (in boolean mixeContentWouldBlock); */ /// Unable to generate binding because `nostdcall is unsupported` pub SetHSTSPriming: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void clearHSTSPriming (); */ /// Unable to generate binding because `nostdcall is unsupported` pub ClearHSTSPriming: *const ::libc::c_void, /* readonly attribute unsigned long tainting; */ pub GetTainting: unsafe extern "system" fn (this: *const nsILoadInfo, aTainting: *mut libc::uint32_t) -> nsresult, /* void maybeIncreaseTainting (in unsigned long aTainting); */ pub MaybeIncreaseTainting: unsafe extern "system" fn (this: *const nsILoadInfo, aTainting: libc::uint32_t) -> nsresult, /* [infallible] readonly attribute boolean isTopLevelLoad; */ pub GetIsTopLevelLoad: unsafe extern "system" fn (this: *const nsILoadInfo, aIsTopLevelLoad: *mut bool) -> nsresult, /* attribute nsIURI resultPrincipalURI; */ pub GetResultPrincipalURI: unsafe extern "system" fn (this: *const nsILoadInfo, aResultPrincipalURI: *mut *const nsIURI) -> nsresult, /* attribute nsIURI resultPrincipalURI; */ pub SetResultPrincipalURI: unsafe extern "system" fn (this: *const nsILoadInfo, aResultPrincipalURI: *const nsIURI) -> nsresult, /* [noscript] readonly attribute nsIPrincipal sandboxedLoadingPrincipal; */ pub GetSandboxedLoadingPrincipal: unsafe extern "system" fn (this: *const nsILoadInfo, aSandboxedLoadingPrincipal: *mut *const nsIPrincipal) -> nsresult, /* [noscript,nostdcall,notxpcom] void SetClientInfo (in const_ClientInfoRef aClientInfo); */ /// Unable to generate binding because `native type const mozilla::dom::ClientInfo is unsupported` pub SetClientInfo: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] const_MaybeClientInfoRef GetClientInfo (); */ /// Unable to generate binding because `nostdcall is unsupported` pub GetClientInfo: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void GiveReservedClientSource (in UniqueClientSourceMove aClientSource); */ /// Unable to generate binding because `native type mozilla::UniquePtr<mozilla::dom::ClientSource>&& is unsupported` pub GiveReservedClientSource: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] UniqueClientSource TakeReservedClientSource (); */ /// Unable to generate binding because `nostdcall is unsupported` pub TakeReservedClientSource: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void SetReservedClientInfo (in const_ClientInfoRef aClientInfo); */ /// Unable to generate binding because `native type const mozilla::dom::ClientInfo is unsupported` pub SetReservedClientInfo: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] const_MaybeClientInfoRef GetReservedClientInfo (); */ /// Unable to generate binding because `nostdcall is unsupported` pub GetReservedClientInfo: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void SetInitialClientInfo (in const_ClientInfoRef aClientInfo); */ /// Unable to generate binding because `native type const mozilla::dom::ClientInfo is unsupported` pub SetInitialClientInfo: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] const_MaybeClientInfoRef GetInitialClientInfo (); */ /// Unable to generate binding because `nostdcall is unsupported` pub GetInitialClientInfo: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void SetController (in const_ServiceWorkerDescriptorRef aServiceWorker); */ /// Unable to generate binding because `native type const mozilla::dom::ServiceWorkerDescriptor is unsupported` pub SetController: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] void ClearController (); */ /// Unable to generate binding because `nostdcall is unsupported` pub ClearController: *const ::libc::c_void, /* [noscript,nostdcall,notxpcom] const_MaybeServiceWorkerDescriptorRef GetController (); */ /// Unable to generate binding because `nostdcall is unsupported` pub GetController: *const ::libc::c_void, } // The implementations of the function wrappers which are exposed to rust code. // Call these methods rather than manually calling through the VTable struct. impl nsILoadInfo { /// ```text /// /** /// * *** DEPRECATED *** /// * No LoadInfo created within Gecko should contain this security flag. /// * Please use any of the five security flags defined underneath. /// * We only keep this security flag to provide backwards compatibilty. /// */ /// ``` /// pub const SEC_NORMAL: i64 = 0; /// ```text /// /** /// * The following five flags determine the security mode and hence what kind of /// * security checks should be performed throughout the lifetime of the channel. /// * /// * * SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS /// * * SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED /// * * SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS /// * * SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL /// * * SEC_REQUIRE_CORS_DATA_INHERITS /// * /// * Exactly one of these flags are required to be set in order to allow /// * the channel to perform the correct security checks (SOP, CORS, ...) and /// * return the correct result principal. If none or more than one of these /// * flags are set AsyncOpen2 will fail. /// */ /// ``` /// pub const SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS: i64 = 1; pub const SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED: i64 = 2; /// ```text /// /** /// * Allow loads from other origins. Loads from data: will inherit the /// * principal. See the documentation for principalToInherit, which describes /// * exactly what principal is inherited. /// * /// * Commonly used by plain <img>, <video>, <link rel=stylesheet> etc. /// */ /// ``` /// pub const SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS: i64 = 4; /// ```text /// /** /// * Allow loads from other origins. Loads from data: will be allowed, /// * but the resulting resource will get a null principal. /// * Used in blink/webkit for <iframe>s. Likely also the mode /// * that should be used by most Chrome code. /// */ /// ``` /// pub const SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL: i64 = 8; /// ```text /// /** /// * Allow loads from any origin, but require CORS for cross-origin loads. /// * Loads from data: are allowed and the result will inherit the principal. /// * See the documentation for principalToInherit, which describes exactly what /// * principal is inherited. /// * /// * Commonly used by <img crossorigin>, <video crossorigin>, /// * XHR, fetch(), etc. /// */ /// ``` /// pub const SEC_REQUIRE_CORS_DATA_INHERITS: i64 = 16; /// ```text /// /** /// * Choose cookie policy. The default policy is equivalent to "INCLUDE" for /// * SEC_REQUIRE_SAME_ORIGIN_* and SEC_ALLOW_CROSS_ORIGIN_* modes, and /// * equivalent to "SAME_ORIGIN" for SEC_REQUIRE_CORS_DATA_INHERITS mode. /// * /// * This means that if you want to perform a CORS load with credentials, pass /// * SEC_COOKIES_INCLUDE. /// * /// * Note that these flags are still subject to the user's cookie policies. /// * For example, if the user is blocking 3rd party cookies, those cookies /// * will be blocked no matter which of these flags are set. /// */ /// ``` /// pub const SEC_COOKIES_DEFAULT: i64 = 0; pub const SEC_COOKIES_INCLUDE: i64 = 32; pub const SEC_COOKIES_SAME_ORIGIN: i64 = 64; pub const SEC_COOKIES_OMIT: i64 = 96; /// ```text /// /** /// * Force inheriting of the principal. See the documentation for /// * principalToInherit, which describes exactly what principal is inherited. /// * /// * Setting this flag will cause GetChannelResultPrincipal to return the /// * principal to be inherited as the channel principal. /// * /// * This will happen independently of the scheme of the URI that the /// * channel is loading. /// * /// * So if the principal that gets inherited is "http://a.com/", and the channel /// * is loading the URI "http://b.com/whatever", GetChannelResultPrincipal /// * will return a principal from "http://a.com/". /// * /// * This flag can not be used together with SEC_SANDBOXED. If both are passed /// * to the LoadInfo constructor then this flag will be dropped. If you need /// * to know whether this flag would have been present but was dropped due to /// * sandboxing, check for the forceInheritPrincipalDropped flag. /// */ /// ``` /// pub const SEC_FORCE_INHERIT_PRINCIPAL: i64 = 128; /// ```text /// /** /// * Sandbox the load. The resulting resource will use a freshly created /// * null principal. So GetChannelResultPrincipal will always return a /// * null principal whenever this flag is set. /// * /// * This will happen independently of the scheme of the URI that the /// * channel is loading. /// * /// * This flag can not be used together with SEC_FORCE_INHERIT_PRINCIPAL. /// */ /// ``` /// pub const SEC_SANDBOXED: i64 = 256; /// ```text /// /** /// * Inherit the Principal for about:blank. /// */ /// ``` /// pub const SEC_ABOUT_BLANK_INHERITS: i64 = 512; /// ```text /// /** /// * Allow access to chrome: packages that are content accessible. /// */ /// ``` /// pub const SEC_ALLOW_CHROME: i64 = 1024; /// ```text /// /** /// * Disallow access to javascript: uris. /// */ /// ``` /// pub const SEC_DISALLOW_SCRIPT: i64 = 2048; /// ```text /// /** /// * Don't follow redirects. Instead the redirect response is returned /// * as a successful response for the channel. /// * /// * Redirects not initiated by a server response, i.e. REDIRECT_INTERNAL and /// * REDIRECT_STS_UPGRADE, are still followed. /// * /// * Note: If this flag is set and the channel response is a redirect, then /// * the response body might not be available. /// * This can happen if the redirect was cached. /// */ /// ``` /// pub const SEC_DONT_FOLLOW_REDIRECTS: i64 = 4096; /// ```text /// /** /// * Load an error page, it should be one of following : about:neterror, /// * about:certerror, about:blocked, or about:tabcrashed. /// */ /// ``` /// pub const SEC_LOAD_ERROR_PAGE: i64 = 8192; /// ```text /// /** /// * Force inheriting of the principal, overruling any owner that might be set /// * on the channel. (Please note that channel.owner is deprecated and will be /// * removed within Bug 1286838). See the documentation for principalToInherit, /// * which describes exactly what principal is inherited. /// * /// * Setting this flag will cause GetChannelResultPrincipal to return the /// * principal to be inherited as the channel principal. /// * /// * This will happen independently of the scheme of the URI that the /// * channel is loading. /// */ /// ``` /// pub const SEC_FORCE_INHERIT_PRINCIPAL_OVERRULE_OWNER: i64 = 16384; /// ```text /// /** /// * Constants reflecting the channel tainting. These are mainly defined here /// * for script. Internal C++ code should use the enum defined in LoadTainting.h. /// * See LoadTainting.h for documentation. /// */ /// ``` /// pub const TAINTING_BASIC: i64 = 0; pub const TAINTING_CORS: i64 = 1; pub const TAINTING_OPAQUE: i64 = 2; /// ```text /// /** /// * This is the principal of the network request's caller/requester where /// * the resulting resource will be used. I.e. it is the principal which /// * will get access to the result of the request. (Where "get access to" /// * might simply mean "embed" depending on the type of resource that is /// * loaded). /// * /// * For example for an image, it is the principal of the document where /// * the image is rendered. For a stylesheet it is the principal of the /// * document where the stylesheet will be applied. /// * /// * So if document at http://a.com/page.html loads an image from /// * http://b.com/pic.jpg, then loadingPrincipal will be /// * http://a.com/page.html. /// * /// * For <iframe> and <frame> loads, the LoadingPrincipal is the /// * principal of the parent document. For top-level loads, the /// * LoadingPrincipal is null. For all loads except top-level loads /// * the LoadingPrincipal is never null. /// * /// * If the loadingPrincipal is the system principal, no security checks /// * will be done at all. There will be no security checks on the initial /// * load or any subsequent redirects. This means there will be no /// * nsIContentPolicy checks or any CheckLoadURI checks. Because of /// * this, never set the loadingPrincipal to the system principal when /// * the URI to be loaded is controlled by a webpage. /// * If the loadingPrincipal and triggeringPrincipal are both /// * codebase-principals, then we will always call into /// * nsIContentPolicies and CheckLoadURI. The call to nsIContentPolicies /// * and CheckLoadURI happen even if the URI to be loaded is same-origin /// * with the loadingPrincipal or triggeringPrincipal. /// */ /// ``` /// /// `readonly attribute nsIPrincipal loadingPrincipal;` #[inline] pub unsafe fn GetLoadingPrincipal(&self, aLoadingPrincipal: *mut *const nsIPrincipal) -> nsresult { ((*self.vtable).GetLoadingPrincipal)(self, aLoadingPrincipal) } /// ```text /// /** /// * A C++-friendly version of loadingPrincipal. /// */ /// ``` /// /// `[binaryname(LoadingPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryLoadingPrincipal ();` const _LoadingPrincipal: () = (); /// ```text /// /** /// * This is the principal which caused the network load to start. I.e. /// * this is the principal which provided the URL to be loaded. This is /// * often the same as the LoadingPrincipal, but there are a few cases /// * where that's not true. /// * /// * For example for loads into an <iframe>, the LoadingPrincipal is always /// * the principal of the parent document. However the triggeringPrincipal /// * is the principal of the document which provided the URL that the /// * <iframe> is navigating to. This could be the previous document inside /// * the <iframe> which set document.location. Or a document elsewhere in /// * the frame tree which contained a <a target="..."> which targetted the /// * <iframe>. /// * /// * If a stylesheet links to a sub-resource, like an @imported stylesheet, /// * or a background image, then the triggeringPrincipal is the principal /// * of the stylesheet, while the LoadingPrincipal is the principal of the /// * document being styled. /// * /// * The triggeringPrincipal is never null. /// * /// * If the triggeringPrincipal is the system principal, no security checks /// * will be done at all. There will be no security checks on the initial /// * load or any subsequent redirects. This means there will be no /// * nsIContentPolicy checks or any CheckLoadURI checks. Because of /// * this, never set the triggeringPrincipal to the system principal when /// * the URI to be loaded is controlled by a webpage. /// * If the loadingPrincipal and triggeringPrincipal are both /// * codebase-principals, then we will always call into /// * nsIContentPolicies and CheckLoadURI. The call to nsIContentPolicies /// * and CheckLoadURI happen even if the URI to be loaded is same-origin /// * with the loadingPrincipal or triggeringPrincipal. /// */ /// ``` /// /// `readonly attribute nsIPrincipal triggeringPrincipal;` #[inline] pub unsafe fn GetTriggeringPrincipal(&self, aTriggeringPrincipal: *mut *const nsIPrincipal) -> nsresult { ((*self.vtable).GetTriggeringPrincipal)(self, aTriggeringPrincipal) } /// ```text /// /** /// * A C++-friendly version of triggeringPrincipal. /// */ /// ``` /// /// `[binaryname(TriggeringPrincipal),noscript,nostdcall,notxpcom] nsIPrincipal binaryTriggeringPrincipal ();` const _TriggeringPrincipal: () = (); /// ```text /// /** /// * For non-document loads the principalToInherit is always null. For /// * loads of type TYPE_DOCUMENT or TYPE_SUBDOCUMENT the principalToInherit /// * might be null. If it's non null, then this is the principal that is /// * inherited if a principal needs to be inherited. If the principalToInherit /// * is null but the inherit flag is set, then the triggeringPrincipal is /// * the principal that is inherited. /// */ /// ``` /// /// `attribute nsIPrincipal principalToInherit;` #[inline] pub unsafe fn GetPrincipalToInherit(&self, aPrincipalToInherit: *mut *const nsIPrincipal) -> nsresult { ((*self.vtable).GetPrincipalToInherit)(self, aPrincipalToInherit) } /// ```text /// /** /// * For non-document loads the principalToInherit is always null. For /// * loads of type TYPE_DOCUMENT or TYPE_SUBDOCUMENT the principalToInherit /// * might be null. If it's non null, then this is the principal that is /// * inherited if a principal needs to be inherited. If the principalToInherit /// * is null but the inherit flag is set, then the triggeringPrincipal is /// * the principal that is inherited. /// */ /// ``` /// /// `attribute nsIPrincipal principalToInherit;` #[inline] pub unsafe fn SetPrincipalToInherit(&self, aPrincipalToInherit: *const nsIPrincipal) -> nsresult { ((*self.vtable).SetPrincipalToInherit)(self, aPrincipalToInherit) } /// ```text /// /** /// * A C++-friendly version of principalToInherit. /// */ /// ``` /// /// `[binaryname(PrincipalToInherit),noscript,nostdcall,notxpcom] nsIPrincipal binaryPrincipalToInherit ();` const _PrincipalToInherit: () = (); /// ```text /// /** /// * Finds the correct principal to inherit for the given channel, based on /// * the values of PrincipalToInherit and TriggeringPrincipal. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] nsIPrincipal FindPrincipalToInherit (in nsIChannel aChannel);` const _FindPrincipalToInherit: () = (); /// ```text /// /** /// * This is the ownerDocument of the LoadingNode. Unless the LoadingNode /// * is a Document, in which case the LoadingDocument is the same as the /// * LoadingNode. /// * /// * For top-level loads, and for loads originating from workers, the /// * LoadingDocument is null. When the LoadingDocument is not null, the /// * LoadingPrincipal is set to the principal of the LoadingDocument. /// */ /// ``` /// /// `readonly attribute nsIDOMDocument loadingDocument;` #[inline] pub unsafe fn GetLoadingDocument(&self, aLoadingDocument: *mut *const nsIDOMDocument) -> nsresult { ((*self.vtable).GetLoadingDocument)(self, aLoadingDocument) } /// ```text /// /** /// * A C++-friendly version of loadingDocument (loadingNode). /// * This is the Node where the resulting resource will be used. I.e. it is /// * the Node which will get access to the result of the request. (Where /// * "get access to" might simply mean "embed" depending on the type of /// * resource that is loaded). /// * /// * For example for an <img>/<video> it is the image/video element. For /// * document loads inside <iframe> and <frame>s, the LoadingNode is the /// * <iframe>/<frame> element. For an XMLHttpRequest, it is the Document /// * which contained the JS which initiated the XHR. For a stylesheet, it /// * is the Document that contains <link rel=stylesheet>. /// * /// * For loads triggered by the HTML pre-parser, the LoadingNode is the /// * Document which is currently being parsed. /// * /// * For top-level loads, and for loads originating from workers, the /// * LoadingNode is null. If the LoadingNode is non-null, then the /// * LoadingPrincipal is the principal of the LoadingNode. /// */ /// ``` /// /// `[binaryname(LoadingNode),noscript,nostdcall,notxpcom] nsINode binaryLoadingNode ();` const _LoadingNode: () = (); /// ```text /// /** /// * A C++ friendly version of the loadingContext for toplevel loads. /// * Most likely you want to query the ownerDocument or LoadingNode /// * and not this context only available for TYPE_DOCUMENT loads. /// * Please note that except for loads of TYPE_DOCUMENT, this /// * ContextForTopLevelLoad will always return null. /// */ /// ``` /// /// `[binaryname(ContextForTopLevelLoad),noscript,nostdcall,notxpcom] nsISupports binaryContextForTopLevelLoad ();` const _ContextForTopLevelLoad: () = (); /// ```text /// /** /// * The securityFlags of that channel. /// */ /// ``` /// /// `readonly attribute nsSecurityFlags securityFlags;` #[inline] pub unsafe fn GetSecurityFlags(&self, aSecurityFlags: *mut nsSecurityFlags) -> nsresult { ((*self.vtable).GetSecurityFlags)(self, aSecurityFlags) } /// ```text /// /** /// * Allows to query only the security mode bits from above. /// */ /// ``` /// /// `[infallible] readonly attribute unsigned long securityMode;` #[inline] pub unsafe fn GetSecurityMode(&self) -> libc::uint32_t { let mut result = <libc::uint32_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetSecurityMode)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * True if this request is embedded in a context that can't be third-party /// * (i.e. an iframe embedded in a cross-origin parent window). If this is /// * false, then this request may be third-party if it's a third-party to /// * loadingPrincipal. /// */ /// ``` /// /// `[infallible] readonly attribute boolean isInThirdPartyContext;` #[inline] pub unsafe fn GetIsInThirdPartyContext(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetIsInThirdPartyContext)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * See the SEC_COOKIES_* flags above. This attribute will never return /// * SEC_COOKIES_DEFAULT, but will instead return what the policy resolves to. /// * I.e. SEC_COOKIES_SAME_ORIGIN for CORS mode, and SEC_COOKIES_INCLUDE /// * otherwise. /// */ /// ``` /// /// `[infallible] readonly attribute unsigned long cookiePolicy;` #[inline] pub unsafe fn GetCookiePolicy(&self) -> libc::uint32_t { let mut result = <libc::uint32_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetCookiePolicy)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If forceInheritPrincipal is true, the data coming from the channel should /// * inherit its principal, even when the data is loaded over http:// or another /// * protocol that would normally use a URI-based principal. /// * /// * See the documentation for principalToInherit, which describes exactly what /// * principal is inherited. /// * /// * This attribute will never be true when loadingSandboxed is true. /// */ /// ``` /// /// `[infallible] readonly attribute boolean forceInheritPrincipal;` #[inline] pub unsafe fn GetForceInheritPrincipal(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetForceInheritPrincipal)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If forceInheritPrincipalOverruleOwner is true, the data coming from the /// * channel should inherit the principal, even when the data is loaded over /// * http:// or another protocol that would normally use a URI-based principal /// * and even if the channel's .owner is not null. This last is the difference /// * between forceInheritPrincipalOverruleOwner and forceInheritPrincipal: the /// * latter does _not_ overrule the .owner setting. /// * /// * See the documentation for principalToInherit, which describes exactly what /// * principal is inherited. /// */ /// ``` /// /// `[infallible] readonly attribute boolean forceInheritPrincipalOverruleOwner;` #[inline] pub unsafe fn GetForceInheritPrincipalOverruleOwner(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetForceInheritPrincipalOverruleOwner)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If loadingSandboxed is true, the data coming from the channel is /// * being loaded sandboxed, so it should have a nonce origin and /// * hence should use a NullPrincipal. /// */ /// ``` /// /// `[infallible] readonly attribute boolean loadingSandboxed;` #[inline] pub unsafe fn GetLoadingSandboxed(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetLoadingSandboxed)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If aboutBlankInherits is true, then about:blank should inherit /// * the principal. /// */ /// ``` /// /// `[infallible] readonly attribute boolean aboutBlankInherits;` #[inline] pub unsafe fn GetAboutBlankInherits(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetAboutBlankInherits)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If allowChrome is true, then use nsIScriptSecurityManager::ALLOW_CHROME /// * when calling CheckLoadURIWithPrincipal(). /// */ /// ``` /// /// `[infallible] readonly attribute boolean allowChrome;` #[inline] pub unsafe fn GetAllowChrome(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetAllowChrome)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If disallowScript is true, then use nsIScriptSecurityManager::DISALLOW_SCRIPT /// * when calling CheckLoadURIWithPrincipal(). /// */ /// ``` /// /// `[infallible] readonly attribute boolean disallowScript;` #[inline] pub unsafe fn GetDisallowScript(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetDisallowScript)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Returns true if SEC_DONT_FOLLOW_REDIRECTS is set. /// */ /// ``` /// /// `[infallible] readonly attribute boolean dontFollowRedirects;` #[inline] pub unsafe fn GetDontFollowRedirects(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetDontFollowRedirects)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Returns true if SEC_LOAD_ERROR_PAGE is set. /// */ /// ``` /// /// `[infallible] readonly attribute boolean loadErrorPage;` #[inline] pub unsafe fn GetLoadErrorPage(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetLoadErrorPage)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * The external contentPolicyType of the channel, used for security checks /// * like Mixed Content Blocking and Content Security Policy. /// * /// * Specifically, content policy types with _INTERNAL_ in their name will /// * never get returned from this attribute. /// */ /// ``` /// /// `readonly attribute nsContentPolicyType externalContentPolicyType;` #[inline] pub unsafe fn GetExternalContentPolicyType(&self, aExternalContentPolicyType: *mut nsContentPolicyType) -> nsresult { ((*self.vtable).GetExternalContentPolicyType)(self, aExternalContentPolicyType) } /// ```text /// /** /// * The internal contentPolicyType of the channel, used for constructing /// * RequestContext values when creating a fetch event for an intercepted /// * channel. /// * /// * This should not be used for the purposes of security checks, since /// * the content policy implementations cannot be expected to deal with /// * _INTERNAL_ values. Please use the contentPolicyType attribute above /// * for that purpose. /// */ /// ``` /// /// `[noscript,notxpcom] nsContentPolicyType internalContentPolicyType ();` #[inline] pub unsafe fn InternalContentPolicyType(&self, ) -> nsContentPolicyType { ((*self.vtable).InternalContentPolicyType)(self, ) } /// ```text /// /** /// * Returns true if document or any of the documents ancestors /// * up to the toplevel document make use of the CSP directive /// * 'upgrade-insecure-requests'. Used to identify upgrade /// * requests in e10s where the loadingDocument is not available. /// * /// * Warning: If the loadingDocument is null, then the /// * upgradeInsecureRequests is false. /// */ /// ``` /// /// `[infallible] readonly attribute boolean upgradeInsecureRequests;` #[inline] pub unsafe fn GetUpgradeInsecureRequests(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetUpgradeInsecureRequests)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If true, the content of the channel is queued up and checked /// * if it matches a content signature. Note, setting this flag /// * to true will negatively impact performance since the preloader /// * can not start until all of the content is fetched from the /// * netwerk. /// * /// * Only use that in combination with TYPE_DOCUMENT. /// */ /// ``` /// /// `[infallible] attribute boolean verifySignedContent;` #[inline] pub unsafe fn GetVerifySignedContent(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetVerifySignedContent)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If true, the content of the channel is queued up and checked /// * if it matches a content signature. Note, setting this flag /// * to true will negatively impact performance since the preloader /// * can not start until all of the content is fetched from the /// * netwerk. /// * /// * Only use that in combination with TYPE_DOCUMENT. /// */ /// ``` /// /// `[infallible] attribute boolean verifySignedContent;` #[inline] pub unsafe fn SetVerifySignedContent(&self, aVerifySignedContent: bool) -> nsresult { ((*self.vtable).SetVerifySignedContent)(self, aVerifySignedContent) } /// ```text /// /** /// * If true, this load will fail if it has no SRI integrity /// */ /// ``` /// /// `[infallible] attribute boolean enforceSRI;` #[inline] pub unsafe fn GetEnforceSRI(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetEnforceSRI)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If true, this load will fail if it has no SRI integrity /// */ /// ``` /// /// `[infallible] attribute boolean enforceSRI;` #[inline] pub unsafe fn SetEnforceSRI(&self, aEnforceSRI: bool) -> nsresult { ((*self.vtable).SetEnforceSRI)(self, aEnforceSRI) } /// ```text /// /** /// * If true, toplevel data: URI navigation is allowed /// */ /// ``` /// /// `[infallible] attribute boolean forceAllowDataURI;` #[inline] pub unsafe fn GetForceAllowDataURI(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetForceAllowDataURI)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If true, toplevel data: URI navigation is allowed /// */ /// ``` /// /// `[infallible] attribute boolean forceAllowDataURI;` #[inline] pub unsafe fn SetForceAllowDataURI(&self, aForceAllowDataURI: bool) -> nsresult { ((*self.vtable).SetForceAllowDataURI)(self, aForceAllowDataURI) } /// ```text /// /** /// * The SEC_FORCE_INHERIT_PRINCIPAL flag may be dropped when a load info /// * object is created. Specifically, it will be dropped if the SEC_SANDBOXED /// * flag is also present. This flag is set if SEC_FORCE_INHERIT_PRINCIPAL was /// * dropped. /// */ /// ``` /// /// `[infallible] readonly attribute boolean forceInheritPrincipalDropped;` #[inline] pub unsafe fn GetForceInheritPrincipalDropped(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetForceInheritPrincipalDropped)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * These are the window IDs of the window in which the element being /// * loaded lives. parentOuterWindowID is the window ID of this window's /// * parent. topOuterWindowID is the ID of the top-level window of the same /// * docShell type. /// * /// * Note that these window IDs can be 0 if the window is not /// * available. parentOuterWindowID and topOuterWindowID will be the same as /// * outerWindowID if the window has no parent. /// */ /// ``` /// /// `[infallible] readonly attribute unsigned long long innerWindowID;` #[inline] pub unsafe fn GetInnerWindowID(&self) -> libc::uint64_t { let mut result = <libc::uint64_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetInnerWindowID)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// `[infallible] readonly attribute unsigned long long outerWindowID;` #[inline] pub unsafe fn GetOuterWindowID(&self) -> libc::uint64_t { let mut result = <libc::uint64_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetOuterWindowID)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// `[infallible] readonly attribute unsigned long long parentOuterWindowID;` #[inline] pub unsafe fn GetParentOuterWindowID(&self) -> libc::uint64_t { let mut result = <libc::uint64_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetParentOuterWindowID)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// `[infallible] readonly attribute unsigned long long topOuterWindowID;` #[inline] pub unsafe fn GetTopOuterWindowID(&self) -> libc::uint64_t { let mut result = <libc::uint64_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetTopOuterWindowID)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Only when the element being loaded is <frame src="foo.html"> /// * (or, more generally, if the element QIs to nsIFrameLoaderOwner), /// * the frameOuterWindowID is the outer window containing the /// * foo.html document. /// * /// * Note: For other cases, frameOuterWindowID is 0. /// */ /// ``` /// /// `[infallible] readonly attribute unsigned long long frameOuterWindowID;` #[inline] pub unsafe fn GetFrameOuterWindowID(&self) -> libc::uint64_t { let mut result = <libc::uint64_t as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetFrameOuterWindowID)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Resets the PrincipalToInherit to a freshly created NullPrincipal /// * which inherits the origin attributes from the loadInfo. /// * /// * WARNING: Please only use that function if you know exactly what /// * you are doing!!! /// */ /// ``` /// /// `void resetPrincipalToInheritToNullPrincipal ();` #[inline] pub unsafe fn ResetPrincipalToInheritToNullPrincipal(&self, ) -> nsresult { ((*self.vtable).ResetPrincipalToInheritToNullPrincipal)(self, ) } /// ```text /// /** /// * Customized OriginAttributes within LoadInfo to allow overwriting of the /// * default originAttributes from the loadingPrincipal. /// * /// * In chrome side, originAttributes.privateBrowsingId will always be 0 even if /// * the usePrivateBrowsing is true, because chrome docshell won't set /// * privateBrowsingId on origin attributes (See bug 1278664). This is to make /// * sure nsILoadInfo and nsILoadContext have the same origin attributes. /// */ /// ``` /// /// `[binaryname(ScriptableOriginAttributes),implicit_jscontext] attribute jsval originAttributes;` const _GetScriptableOriginAttributes: () = (); /// ```text /// /** /// * Customized OriginAttributes within LoadInfo to allow overwriting of the /// * default originAttributes from the loadingPrincipal. /// * /// * In chrome side, originAttributes.privateBrowsingId will always be 0 even if /// * the usePrivateBrowsing is true, because chrome docshell won't set /// * privateBrowsingId on origin attributes (See bug 1278664). This is to make /// * sure nsILoadInfo and nsILoadContext have the same origin attributes. /// */ /// ``` /// /// `[binaryname(ScriptableOriginAttributes),implicit_jscontext] attribute jsval originAttributes;` const _SetScriptableOriginAttributes: () = (); /// `[binaryname(GetOriginAttributes),noscript,nostdcall] OriginAttributes binaryGetOriginAttributes ();` const _GetOriginAttributes: () = (); /// `[binaryname(SetOriginAttributes),noscript,nostdcall] void binarySetOriginAttributes (in const_OriginAttributesRef aOriginAttrs);` const _SetOriginAttributes: () = (); /// ```text /// /** /// * Whenever a channel is openend by asyncOpen2() [or also open2()], /// * lets set this flag so that redirects of such channels are also /// * openend using asyncOpen2() [open2()]. /// * /// * Please note, once the flag is set to true it must remain true /// * throughout the lifetime of the channel. Trying to set it /// * to anything else than true will be discareded. /// * /// */ /// ``` /// /// `[infallible] attribute boolean enforceSecurity;` #[inline] pub unsafe fn GetEnforceSecurity(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetEnforceSecurity)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Whenever a channel is openend by asyncOpen2() [or also open2()], /// * lets set this flag so that redirects of such channels are also /// * openend using asyncOpen2() [open2()]. /// * /// * Please note, once the flag is set to true it must remain true /// * throughout the lifetime of the channel. Trying to set it /// * to anything else than true will be discareded. /// * /// */ /// ``` /// /// `[infallible] attribute boolean enforceSecurity;` #[inline] pub unsafe fn SetEnforceSecurity(&self, aEnforceSecurity: bool) -> nsresult { ((*self.vtable).SetEnforceSecurity)(self, aEnforceSecurity) } /// ```text /// /** /// * Whenever a channel is evaluated by the ContentSecurityManager /// * the first time, we set this flag to true to indicate that /// * subsequent calls of AsyncOpen2() do not have to enforce all /// * security checks again. E.g., after a redirect there is no /// * need to set up CORS again. We need this separate flag /// * because the redirectChain might also contain internal /// * redirects which might pollute the redirectChain so we can't /// * rely on the size of the redirectChain-array to query whether /// * a channel got redirected or not. /// * /// * Please note, once the flag is set to true it must remain true /// * throughout the lifetime of the channel. Trying to set it /// * to anything else than true will be discarded. /// * /// */ /// ``` /// /// `[infallible] attribute boolean initialSecurityCheckDone;` #[inline] pub unsafe fn GetInitialSecurityCheckDone(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetInitialSecurityCheckDone)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Whenever a channel is evaluated by the ContentSecurityManager /// * the first time, we set this flag to true to indicate that /// * subsequent calls of AsyncOpen2() do not have to enforce all /// * security checks again. E.g., after a redirect there is no /// * need to set up CORS again. We need this separate flag /// * because the redirectChain might also contain internal /// * redirects which might pollute the redirectChain so we can't /// * rely on the size of the redirectChain-array to query whether /// * a channel got redirected or not. /// * /// * Please note, once the flag is set to true it must remain true /// * throughout the lifetime of the channel. Trying to set it /// * to anything else than true will be discarded. /// * /// */ /// ``` /// /// `[infallible] attribute boolean initialSecurityCheckDone;` #[inline] pub unsafe fn SetInitialSecurityCheckDone(&self, aInitialSecurityCheckDone: bool) -> nsresult { ((*self.vtable).SetInitialSecurityCheckDone)(self, aInitialSecurityCheckDone) } /// ```text /// /** /// * Returns true if the load was triggered from an external application /// * (e.g. Thunderbird). Please note that this flag will only ever be true /// * if the load is of TYPE_DOCUMENT. /// */ /// ``` /// /// `[infallible] attribute boolean loadTriggeredFromExternal;` #[inline] pub unsafe fn GetLoadTriggeredFromExternal(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetLoadTriggeredFromExternal)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Returns true if the load was triggered from an external application /// * (e.g. Thunderbird). Please note that this flag will only ever be true /// * if the load is of TYPE_DOCUMENT. /// */ /// ``` /// /// `[infallible] attribute boolean loadTriggeredFromExternal;` #[inline] pub unsafe fn SetLoadTriggeredFromExternal(&self, aLoadTriggeredFromExternal: bool) -> nsresult { ((*self.vtable).SetLoadTriggeredFromExternal)(self, aLoadTriggeredFromExternal) } /// ```text /// /** /// * True if the tainting has been set by the service worker. /// */ /// ``` /// /// `[infallible,noscript] readonly attribute boolean serviceWorkerTaintingSynthesized;` #[inline] pub unsafe fn GetServiceWorkerTaintingSynthesized(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetServiceWorkerTaintingSynthesized)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Whenever a channel gets redirected, append the redirect history entry of /// * the channel which contains principal referrer and remote address [before /// * the channels got redirected] to the loadinfo, so that at every point this /// * array provides us information about all the redirects this channel went /// * through. /// * @param entry, the nsIRedirectHistoryEntry before the channel /// * got redirected. /// * @param aIsInternalRedirect should be true if the channel is going /// * through an internal redirect, otherwise false. /// */ /// ``` /// /// `void appendRedirectHistoryEntry (in nsIRedirectHistoryEntry entry, in boolean isInternalRedirect);` #[inline] pub unsafe fn AppendRedirectHistoryEntry(&self, entry: *const nsIRedirectHistoryEntry, isInternalRedirect: bool) -> nsresult { ((*self.vtable).AppendRedirectHistoryEntry)(self, entry, isInternalRedirect) } /// ```text /// /** /// * An array of nsIRedirectHistoryEntry which stores redirects associated /// * with this channel. This array is filled whether or not the channel has /// * ever been opened. The last element of the array is associated with the /// * most recent redirect. Please note, that this array *includes* internal /// * redirects. /// */ /// ``` /// /// `[implicit_jscontext] readonly attribute jsval redirectChainIncludingInternalRedirects;` const _GetRedirectChainIncludingInternalRedirects: () = (); /// ```text /// /** /// * A C++-friendly version of redirectChain. /// * Please note that this array has the same lifetime as the /// * loadInfo object - use with caution! /// */ /// ``` /// /// `[binaryname(RedirectChainIncludingInternalRedirects),noscript,nostdcall,notxpcom] nsIRedirectHistoryEntryArray binaryRedirectChainIncludingInternalRedirects ();` const _RedirectChainIncludingInternalRedirects: () = (); /// ```text /// /** /// * Same as RedirectChain but does *not* include internal redirects. /// */ /// ``` /// /// `[implicit_jscontext] readonly attribute jsval redirectChain;` const _GetRedirectChain: () = (); /// ```text /// /** /// * A C++-friendly version of redirectChain. /// * Please note that this array has the same lifetime as the /// * loadInfo object - use with caution! /// */ /// ``` /// /// `[binaryname(RedirectChain),noscript,nostdcall,notxpcom] nsIRedirectHistoryEntryArray binaryRedirectChain ();` const _RedirectChain: () = (); /// ```text /// /** /// * An array of nsIPrincipals which stores the principals of the parent frames, /// * not including the frame loading this request. The closest ancestor is at /// * index zero and the top level ancestor is at the last index. /// * /// * The ancestorPrincipals[0] entry for an iframe load will be the principal of /// * the iframe element's owner document. /// * The ancestorPrincipals[0] entry for an image loaded in an iframe will be the /// * principal of the iframe element's owner document. /// * /// * See nsIDocument::AncestorPrincipals for more information. /// * /// * Please note that this array has the same lifetime as the /// * loadInfo object - use with caution! /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] PrincipalArrayRef AncestorPrincipals ();` const _AncestorPrincipals: () = (); /// ```text /// /** /// * An array of outerWindowIDs which correspond to nsILoadInfo::AncestorPrincipals /// * above. AncestorOuterWindowIDs[0] is the outerWindowID of the frame /// * associated with the principal at ancestorPrincipals[0], and so forth. /// * /// * Please note that this array has the same lifetime as the /// * loadInfo object - use with caution! /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] Uint64ArrayRef AncestorOuterWindowIDs ();` const _AncestorOuterWindowIDs: () = (); /// ```text /// /** /// * Sets the list of unsafe headers according to CORS spec, as well as /// * potentially forces a preflight. /// * Note that you do not need to set the Content-Type header. That will be /// * automatically detected as needed. /// * /// * Only call this function when using the SEC_REQUIRE_CORS_DATA_INHERITS mode. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void setCorsPreflightInfo (in StringArrayRef unsafeHeaders, in boolean forcePreflight);` const _SetCorsPreflightInfo: () = (); /// ```text /// /** /// * A C++-friendly getter for the list of cors-unsafe headers. /// * Please note that this array has the same lifetime as the /// * loadInfo object - use with caution! /// */ /// ``` /// /// `[binaryname(CorsUnsafeHeaders),noscript,nostdcall,notxpcom] StringArrayRef corsUnsafeHeaders ();` const _CorsUnsafeHeaders: () = (); /// ```text /// /** /// * Returns value set through setCorsPreflightInfo. /// */ /// ``` /// /// `[infallible] readonly attribute boolean forcePreflight;` #[inline] pub unsafe fn GetForcePreflight(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetForcePreflight)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * A C++ friendly getter for the forcePreflight flag. /// */ /// ``` /// /// `[infallible] readonly attribute boolean isPreflight;` #[inline] pub unsafe fn GetIsPreflight(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetIsPreflight)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * When this request would be mixed-content and we do not have an /// * entry in the HSTS cache, we send an HSTS priming request to /// * determine if it is ok to upgrade the request to HTTPS. /// */ /// /** /// * True if this is a mixed-content load and HSTS priming request will be sent. /// */ /// ``` /// /// `[infallible,noscript] readonly attribute boolean forceHSTSPriming;` #[inline] pub unsafe fn GetForceHSTSPriming(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetForceHSTSPriming)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * Carry the decision whether this load would be blocked by mixed content so /// * that if HSTS priming fails, the correct decision can be made. /// */ /// ``` /// /// `[infallible,noscript] readonly attribute boolean mixedContentWouldBlock;` #[inline] pub unsafe fn GetMixedContentWouldBlock(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetMixedContentWouldBlock)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * True if this load is an HSTS priming request. /// */ /// ``` /// /// `[infallible,noscript] attribute boolean isHSTSPriming;` #[inline] pub unsafe fn GetIsHSTSPriming(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetIsHSTSPriming)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * True if this load is an HSTS priming request. /// */ /// ``` /// /// `[infallible,noscript] attribute boolean isHSTSPriming;` #[inline] pub unsafe fn SetIsHSTSPriming(&self, aIsHSTSPriming: bool) -> nsresult { ((*self.vtable).SetIsHSTSPriming)(self, aIsHSTSPriming) } /// ```text /// /** /// * True if this load was upgraded from HSTS priming /// */ /// ``` /// /// `[infallible,noscript] attribute boolean isHSTSPrimingUpgrade;` #[inline] pub unsafe fn GetIsHSTSPrimingUpgrade(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetIsHSTSPrimingUpgrade)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * True if this load was upgraded from HSTS priming /// */ /// ``` /// /// `[infallible,noscript] attribute boolean isHSTSPrimingUpgrade;` #[inline] pub unsafe fn SetIsHSTSPrimingUpgrade(&self, aIsHSTSPrimingUpgrade: bool) -> nsresult { ((*self.vtable).SetIsHSTSPrimingUpgrade)(self, aIsHSTSPrimingUpgrade) } /// ```text /// /** /// * Mark this LoadInfo as needing HSTS Priming /// * /// * @param wouldBlock Carry the decision of Mixed Content Blocking to be /// * applied when HSTS priming is complete. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void setHSTSPriming (in boolean mixeContentWouldBlock);` const _SetHSTSPriming: () = (); /// `[noscript,nostdcall,notxpcom] void clearHSTSPriming ();` const _ClearHSTSPriming: () = (); /// ```text /// /** /// * Determine the associated channel's current tainting. Note, this can /// * change due to a service worker intercept, so it should be checked after /// * OnStartRequest() fires. /// */ /// ``` /// /// `readonly attribute unsigned long tainting;` #[inline] pub unsafe fn GetTainting(&self, aTainting: *mut libc::uint32_t) -> nsresult { ((*self.vtable).GetTainting)(self, aTainting) } /// ```text /// /** /// * Note a new tainting level and possibly increase the current tainting /// * to match. If the tainting level is already greater than the given /// * value, then there is no effect. It is not possible to reduce the tainting /// * level on an existing channel/loadinfo. /// */ /// ``` /// /// `void maybeIncreaseTainting (in unsigned long aTainting);` #[inline] pub unsafe fn MaybeIncreaseTainting(&self, aTainting: libc::uint32_t) -> nsresult { ((*self.vtable).MaybeIncreaseTainting)(self, aTainting) } /// ```text /// /** /// * Various helper code to provide more convenient C++ access to the tainting /// * attribute and maybeIncreaseTainting(). /// */ /// /** /// * Returns true if this load is for top level document. /// * Note that the load for a sub-frame's document will return false here. /// */ /// ``` /// /// `[infallible] readonly attribute boolean isTopLevelLoad;` #[inline] pub unsafe fn GetIsTopLevelLoad(&self) -> bool { let mut result = <bool as ::std::default::Default>::default(); let _rv = ((*self.vtable).GetIsTopLevelLoad)(self, &mut result); debug_assert!(::nserror::NsresultExt::succeeded(_rv)); result } /// ```text /// /** /// * If this is non-null, this property represents two things: (1) the /// * URI to be used for the principal if the channel with this loadinfo /// * gets a principal based on URI and (2) the URI to use for a document /// * created from the channel with this loadinfo. /// */ /// ``` /// /// `attribute nsIURI resultPrincipalURI;` #[inline] pub unsafe fn GetResultPrincipalURI(&self, aResultPrincipalURI: *mut *const nsIURI) -> nsresult { ((*self.vtable).GetResultPrincipalURI)(self, aResultPrincipalURI) } /// ```text /// /** /// * If this is non-null, this property represents two things: (1) the /// * URI to be used for the principal if the channel with this loadinfo /// * gets a principal based on URI and (2) the URI to use for a document /// * created from the channel with this loadinfo. /// */ /// ``` /// /// `attribute nsIURI resultPrincipalURI;` #[inline] pub unsafe fn SetResultPrincipalURI(&self, aResultPrincipalURI: *const nsIURI) -> nsresult { ((*self.vtable).SetResultPrincipalURI)(self, aResultPrincipalURI) } /// ```text /// /** /// * Returns the null principal of the resulting resource if the SEC_SANDBOXED /// * flag is set. Otherwise returns null. This is used by /// * GetChannelResultPrincipal() to ensure that the same null principal object /// * is returned every time. /// */ /// ``` /// /// `[noscript] readonly attribute nsIPrincipal sandboxedLoadingPrincipal;` #[inline] pub unsafe fn GetSandboxedLoadingPrincipal(&self, aSandboxedLoadingPrincipal: *mut *const nsIPrincipal) -> nsresult { ((*self.vtable).GetSandboxedLoadingPrincipal)(self, aSandboxedLoadingPrincipal) } /// ```text /// /** /// * Note which client (i.e. global) initiated this network request. All /// * nsGlobalWindow and WorkerPrivate can be converted to a ClientInfo to /// * be set here. While this is being added to support service worker /// * FetchEvent, it can also be used to communicate other information about /// * the source global context in the future. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void SetClientInfo (in const_ClientInfoRef aClientInfo);` const _SetClientInfo: () = (); /// ```text /// /** /// * Get the ClientInfo for the global that initiated the network request, /// * if it has been set. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] const_MaybeClientInfoRef GetClientInfo ();` const _GetClientInfo: () = (); /// ```text /// /** /// * Give a pre-allocated ClientSource to the channel LoadInfo. This is /// * intended to be used by docshell when loading windows without an /// * initial about:blank document. The docshell will allocate the ClientSource /// * to represent the client that will be created as a result of the navigation /// * network request. If the channel succeeds and remains same-origin, then /// * the result nsGlobalWindow will take ownership of the reserved ClientSource. /// * /// * This method is also called when a cross-origin redirect occurs. A new /// * ClientSource with a different UUID must be created in this case. /// * /// * This method automatically calls SetReservedClientInfo() with the /// * ClientSource::Info(). /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void GiveReservedClientSource (in UniqueClientSourceMove aClientSource);` const _GiveReservedClientSource: () = (); /// ```text /// /** /// * This method takes ownership of the reserved ClientSource previously /// * provided in GiveReservedClientSource(). It may return nullptr if the /// * nsILoadInfo does not own a ClientSource object. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] UniqueClientSource TakeReservedClientSource ();` const _TakeReservedClientSource: () = (); /// ```text /// /** /// * Note the reserved client that be created if this non-subresource /// * network request succeeds. Depending on the type of client this /// * may be called directly or indirectly via GiveReservedClientSource(). /// * For example, web workers do not call give their ClientSource to /// * the nsILoadInfo, but must still call this method to indicate the /// * reserved client for their main script load. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void SetReservedClientInfo (in const_ClientInfoRef aClientInfo);` const _SetReservedClientInfo: () = (); /// ```text /// /** /// * Return the reserved ClientInfo for this load, if one has been set. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] const_MaybeClientInfoRef GetReservedClientInfo ();` const _GetReservedClientInfo: () = (); /// ```text /// /** /// * Note that this non-subresource network request will result in /// * re-using an existing "initial" active client. This mainly only /// * happens when an initial about:blank document is replaced with /// * a real load in a window. In these cases we need to track this /// * initial client so that we may report its existence in a FetchEvent. /// * /// * Note, an nsILoadInfo may only have a reserved client or an /// * initial client. It should never have both. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void SetInitialClientInfo (in const_ClientInfoRef aClientInfo);` const _SetInitialClientInfo: () = (); /// ```text /// /** /// * Return the initial ClientInfo for this load, if one has been set. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] const_MaybeClientInfoRef GetInitialClientInfo ();` const _GetInitialClientInfo: () = (); /// ```text /// /** /// * Note that this network request should be controlled by a service worker. /// * For non-subresource requests this may be set during the load when /// * the first service worker interception occurs. For subresource requests /// * it may be set by the source client if its already controlled by a /// * service worker. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void SetController (in const_ServiceWorkerDescriptorRef aServiceWorker);` const _SetController: () = (); /// ```text /// /** /// * Clear the service worker controller for this channel. This should only /// * be used for window navigation redirects. By default we want to keep /// * the controller in all other cases. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] void ClearController ();` const _ClearController: () = (); /// ```text /// /** /// * Get the service worker controlling this network request, if one has /// * been set. /// */ /// ``` /// /// `[noscript,nostdcall,notxpcom] const_MaybeServiceWorkerDescriptorRef GetController ();` const _GetController: () = (); }