DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
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
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mozilla/docshell/base/nsIDocShell.idl
 */

#ifndef __gen_nsIDocShell_h__
#define __gen_nsIDocShell_h__


#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

#ifndef __gen_nsIDocShellTreeItem_h__
#include "nsIDocShellTreeItem.h"
#endif

#ifndef __gen_nsIRequest_h__
#include "nsIRequest.h"
#endif

#include "js/Value.h"

#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#include "js/TypeDecls.h"
#include "mozilla/Maybe.h"
#include "mozilla/NotNull.h"
#include "mozilla/UniquePtr.h"
#include "nsCOMPtr.h"
#include "nsIURI.h"
class nsPresContext;
class nsIPresShell;
class nsDocShellLoadInfo;
namespace mozilla {
class Encoding;
class HTMLEditor;
namespace dom {
class BrowsingContext;
class ClientSource;
} // namespace dom
}
class nsIURI; /* forward declaration */

class nsIChannel; /* forward declaration */

class nsIContentViewer; /* forward declaration */

class nsIDocShellLoadInfo; /* forward declaration */

class nsIEditor; /* forward declaration */

class nsIEditingSession; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */

class nsIInputStream; /* forward declaration */

class nsIRequest; /* forward declaration */

class nsISHEntry; /* forward declaration */

class nsILayoutHistoryState; /* forward declaration */

class nsISecureBrowserUI; /* forward declaration */

class nsIScriptGlobalObject; /* forward declaration */

class nsIDOMStorage; /* forward declaration */

class nsIPrincipal; /* forward declaration */

class nsIWebBrowserPrint; /* forward declaration */

class nsIPrivacyTransitionObserver; /* forward declaration */

class nsIReflowObserver; /* forward declaration */

class nsIScrollObserver; /* forward declaration */

class nsITabParent; /* forward declaration */

class nsITabChild; /* forward declaration */

class nsICommandManager; /* forward declaration */

class nsICommandParams; /* forward declaration */

class nsILoadURIDelegate; /* forward declaration */

namespace mozilla {
namespace dom {
class ContentFrameMessageManager; /* webidl ContentFrameMessageManager */
} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {
class EventTarget; /* webidl EventTarget */
} // namespace dom
} // namespace mozilla


/* starting interface:    nsIDocShell */
#define NS_IDOCSHELL_IID_STR "049234fe-da10-478b-bc5d-bc6f9a1ba63d"

#define NS_IDOCSHELL_IID \
  {0x049234fe, 0xda10, 0x478b, \
    { 0xbc, 0x5d, 0xbc, 0x6f, 0x9a, 0x1b, 0xa6, 0x3d }}

class nsIDocShell : public nsIDocShellTreeItem {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCSHELL_IID)

  /* [noscript] void loadURI (in nsIURI uri, in nsDocShellLoadInfoPtr loadInfo, in unsigned long aLoadFlags, in boolean firstParty); */
  NS_IMETHOD LoadURI(nsIURI *uri, nsDocShellLoadInfo* loadInfo, uint32_t aLoadFlags, bool firstParty) = 0;

  enum {
    INTERNAL_LOAD_FLAGS_NONE = 0,
    INTERNAL_LOAD_FLAGS_INHERIT_PRINCIPAL = 1,
    INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2,
    INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 4,
    INTERNAL_LOAD_FLAGS_FIRST_LOAD = 8,
    INTERNAL_LOAD_FLAGS_BYPASS_CLASSIFIER = 16,
    INTERNAL_LOAD_FLAGS_FORCE_ALLOW_COOKIES = 32,
    INTERNAL_LOAD_FLAGS_IS_SRCDOC = 64,
    INTERNAL_LOAD_FLAGS_ORIGINAL_FRAME_SRC = 128,
    INTERNAL_LOAD_FLAGS_NO_OPENER = 256,
    INTERNAL_LOAD_FLAGS_FORCE_ALLOW_DATA_URI = 512,
    INTERNAL_LOAD_FLAGS_DELEGATES_CHECKED = 1024,
    INTERNAL_LOAD_FLAGS_IS_USER_TRIGGERED = 4096
  };

  /* [noscript] void internalLoad (in nsIURI aURI, in nsIURI aOriginalURI, [const] in MaybeURI aResultPrincipalURI, in bool aKeepResultPrincipalURIIfSet, in boolean aLoadReplace, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIPrincipal aTriggeringPrincipal, in nsIPrincipal aPrincipalToInherit, in uint32_t aFlags, in AString aWindowTarget, in string aTypeHint, in AString aFileName, in nsIInputStream aPostDataStream, in nsIInputStream aHeadersStream, in unsigned long aLoadFlags, in nsISHEntry aSHEntry, in boolean aFirstParty, in AString aSrcdoc, in nsIDocShell aSourceDocShell, in nsIURI aBaseURI, out nsIDocShell aDocShell, out nsIRequest aRequest); */
  NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aOriginalURI, const mozilla::Maybe<nsCOMPtr<nsIURI>> & aResultPrincipalURI, bool aKeepResultPrincipalURIIfSet, bool aLoadReplace, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aPrincipalToInherit, uint32_t aFlags, const nsAString& aWindowTarget, const char * aTypeHint, const nsAString& aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool aFirstParty, const nsAString& aSrcdoc, nsIDocShell *aSourceDocShell, nsIURI *aBaseURI, nsIDocShell **aDocShell, nsIRequest **aRequest) = 0;

  /* [implicit_jscontext] void addState (in jsval aData, in DOMString aTitle, in DOMString aURL, in boolean aReplace); */
  NS_IMETHOD AddState(JS::HandleValue aData, const nsAString& aTitle, const nsAString& aURL, bool aReplace, JSContext* cx) = 0;

  /* void prepareForNewContentModel (); */
  NS_IMETHOD PrepareForNewContentModel(void) = 0;

  /* void setCurrentURI (in nsIURI aURI); */
  NS_IMETHOD SetCurrentURI(nsIURI *aURI) = 0;

  /* [noscript] void firePageHideNotification (in boolean isUnload); */
  NS_IMETHOD FirePageHideNotification(bool isUnload) = 0;

  /* [noscript] readonly attribute nsPresContext presContext; */
  NS_IMETHOD GetPresContext(nsPresContext * * aPresContext) = 0;

  /* [noscript,notxpcom] nsIPresShell GetPresShell (); */
  NS_IMETHOD_(nsIPresShell *) GetPresShell(void) = 0;

  /* [noscript] readonly attribute nsIPresShell eldestPresShell; */
  NS_IMETHOD GetEldestPresShell(nsIPresShell * * aEldestPresShell) = 0;

  /* readonly attribute nsIContentViewer contentViewer; */
  NS_IMETHOD GetContentViewer(nsIContentViewer **aContentViewer) = 0;

  /* attribute EventTarget chromeEventHandler; */
  NS_IMETHOD GetChromeEventHandler(mozilla::dom::EventTarget **aChromeEventHandler) = 0;
  NS_IMETHOD SetChromeEventHandler(mozilla::dom::EventTarget *aChromeEventHandler) = 0;

  /* attribute DOMString customUserAgent; */
  NS_IMETHOD GetCustomUserAgent(nsAString& aCustomUserAgent) = 0;
  NS_IMETHOD SetCustomUserAgent(const nsAString& aCustomUserAgent) = 0;

  /* attribute boolean cssErrorReportingEnabled; */
  NS_IMETHOD GetCssErrorReportingEnabled(bool *aCssErrorReportingEnabled) = 0;
  NS_IMETHOD SetCssErrorReportingEnabled(bool aCssErrorReportingEnabled) = 0;

  /* attribute boolean allowPlugins; */
  NS_IMETHOD GetAllowPlugins(bool *aAllowPlugins) = 0;
  NS_IMETHOD SetAllowPlugins(bool aAllowPlugins) = 0;

  /* attribute boolean allowJavascript; */
  NS_IMETHOD GetAllowJavascript(bool *aAllowJavascript) = 0;
  NS_IMETHOD SetAllowJavascript(bool aAllowJavascript) = 0;

  /* attribute boolean allowMetaRedirects; */
  NS_IMETHOD GetAllowMetaRedirects(bool *aAllowMetaRedirects) = 0;
  NS_IMETHOD SetAllowMetaRedirects(bool aAllowMetaRedirects) = 0;

  /* attribute boolean allowSubframes; */
  NS_IMETHOD GetAllowSubframes(bool *aAllowSubframes) = 0;
  NS_IMETHOD SetAllowSubframes(bool aAllowSubframes) = 0;

  /* attribute boolean allowImages; */
  NS_IMETHOD GetAllowImages(bool *aAllowImages) = 0;
  NS_IMETHOD SetAllowImages(bool aAllowImages) = 0;

  /* [infallible] attribute boolean allowMedia; */
  NS_IMETHOD GetAllowMedia(bool *aAllowMedia) = 0;
  inline bool GetAllowMedia()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetAllowMedia(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetAllowMedia(bool aAllowMedia) = 0;

  /* attribute boolean allowDNSPrefetch; */
  NS_IMETHOD GetAllowDNSPrefetch(bool *aAllowDNSPrefetch) = 0;
  NS_IMETHOD SetAllowDNSPrefetch(bool aAllowDNSPrefetch) = 0;

  /* attribute boolean allowWindowControl; */
  NS_IMETHOD GetAllowWindowControl(bool *aAllowWindowControl) = 0;
  NS_IMETHOD SetAllowWindowControl(bool aAllowWindowControl) = 0;

  /* [infallible] attribute boolean allowContentRetargeting; */
  NS_IMETHOD GetAllowContentRetargeting(bool *aAllowContentRetargeting) = 0;
  inline bool GetAllowContentRetargeting()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetAllowContentRetargeting(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetAllowContentRetargeting(bool aAllowContentRetargeting) = 0;

  /* [infallible] attribute boolean allowContentRetargetingOnChildren; */
  NS_IMETHOD GetAllowContentRetargetingOnChildren(bool *aAllowContentRetargetingOnChildren) = 0;
  inline bool GetAllowContentRetargetingOnChildren()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetAllowContentRetargetingOnChildren(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren) = 0;

  /* [infallible] attribute boolean inheritPrivateBrowsingId; */
  NS_IMETHOD GetInheritPrivateBrowsingId(bool *aInheritPrivateBrowsingId) = 0;
  inline bool GetInheritPrivateBrowsingId()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetInheritPrivateBrowsingId(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetInheritPrivateBrowsingId(bool aInheritPrivateBrowsingId) = 0;

  enum {
    ENUMERATE_FORWARDS = 0,
    ENUMERATE_BACKWARDS = 1
  };

  /* nsISimpleEnumerator getDocShellEnumerator (in long aItemType, in long aDirection); */
  NS_IMETHOD GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval) = 0;

  enum {
    APP_TYPE_UNKNOWN = 0U,
    APP_TYPE_MAIL = 1U,
    APP_TYPE_EDITOR = 2U
  };

  /* attribute unsigned long appType; */
  NS_IMETHOD GetAppType(uint32_t *aAppType) = 0;
  NS_IMETHOD SetAppType(uint32_t aAppType) = 0;

  /* attribute boolean allowAuth; */
  NS_IMETHOD GetAllowAuth(bool *aAllowAuth) = 0;
  NS_IMETHOD SetAllowAuth(bool aAllowAuth) = 0;

  /* attribute float zoom; */
  NS_IMETHOD GetZoom(float *aZoom) = 0;
  NS_IMETHOD SetZoom(float aZoom) = 0;

  /* attribute long marginWidth; */
  NS_IMETHOD GetMarginWidth(int32_t *aMarginWidth) = 0;
  NS_IMETHOD SetMarginWidth(int32_t aMarginWidth) = 0;

  /* attribute long marginHeight; */
  NS_IMETHOD GetMarginHeight(int32_t *aMarginHeight) = 0;
  NS_IMETHOD SetMarginHeight(int32_t aMarginHeight) = 0;

  /* bool tabToTreeOwner (in boolean forward, in boolean forDocumentNavigation); */
  NS_IMETHOD TabToTreeOwner(bool forward, bool forDocumentNavigation, bool *_retval) = 0;

  enum {
    BUSY_FLAGS_NONE = 0U,
    BUSY_FLAGS_BUSY = 1U,
    BUSY_FLAGS_BEFORE_PAGE_LOAD = 2U,
    BUSY_FLAGS_PAGE_LOADING = 4U,
    LOAD_CMD_NORMAL = 1U,
    LOAD_CMD_RELOAD = 2U,
    LOAD_CMD_HISTORY = 4U,
    LOAD_CMD_PUSHSTATE = 8U
  };

  /* readonly attribute unsigned long busyFlags; */
  NS_IMETHOD GetBusyFlags(uint32_t *aBusyFlags) = 0;

  /* attribute unsigned long loadType; */
  NS_IMETHOD GetLoadType(uint32_t *aLoadType) = 0;
  NS_IMETHOD SetLoadType(uint32_t aLoadType) = 0;

  /* attribute nsLoadFlags defaultLoadFlags; */
  NS_IMETHOD GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags) = 0;
  NS_IMETHOD SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags) = 0;

  /* boolean isBeingDestroyed (); */
  NS_IMETHOD IsBeingDestroyed(bool *_retval) = 0;

  /* readonly attribute boolean isExecutingOnLoadHandler; */
  NS_IMETHOD GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler) = 0;

  /* attribute nsILayoutHistoryState layoutHistoryState; */
  NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState) = 0;
  NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState) = 0;

  /* readonly attribute boolean shouldSaveLayoutState; */
  NS_IMETHOD GetShouldSaveLayoutState(bool *aShouldSaveLayoutState) = 0;

  /* attribute nsISecureBrowserUI securityUI; */
  NS_IMETHOD GetSecurityUI(nsISecureBrowserUI **aSecurityUI) = 0;
  NS_IMETHOD SetSecurityUI(nsISecureBrowserUI *aSecurityUI) = 0;

  /* attribute nsILoadURIDelegate loadURIDelegate; */
  NS_IMETHOD GetLoadURIDelegate(nsILoadURIDelegate **aLoadURIDelegate) = 0;
  NS_IMETHOD SetLoadURIDelegate(nsILoadURIDelegate *aLoadURIDelegate) = 0;

  /* void suspendRefreshURIs (); */
  NS_IMETHOD SuspendRefreshURIs(void) = 0;

  /* void resumeRefreshURIs (); */
  NS_IMETHOD ResumeRefreshURIs(void) = 0;

  /* void beginRestore (in nsIContentViewer viewer, in boolean top); */
  NS_IMETHOD BeginRestore(nsIContentViewer *viewer, bool top) = 0;

  /* void finishRestore (); */
  NS_IMETHOD FinishRestore(void) = 0;

  /* readonly attribute boolean restoringDocument; */
  NS_IMETHOD GetRestoringDocument(bool *aRestoringDocument) = 0;

  /* attribute boolean useErrorPages; */
  NS_IMETHOD GetUseErrorPages(bool *aUseErrorPages) = 0;
  NS_IMETHOD SetUseErrorPages(bool aUseErrorPages) = 0;

  /* boolean displayLoadError (in nsresult aError, in nsIURI aURI, in wstring aURL, [optional] in nsIChannel aFailedChannel); */
  NS_IMETHOD DisplayLoadError(nsresult aError, nsIURI *aURI, const char16_t * aURL, nsIChannel *aFailedChannel, bool *_retval) = 0;

  /* readonly attribute nsIChannel failedChannel; */
  NS_IMETHOD GetFailedChannel(nsIChannel **aFailedChannel) = 0;

  /* readonly attribute long previousTransIndex; */
  NS_IMETHOD GetPreviousTransIndex(int32_t *aPreviousTransIndex) = 0;

  /* readonly attribute long loadedTransIndex; */
  NS_IMETHOD GetLoadedTransIndex(int32_t *aLoadedTransIndex) = 0;

  /* void historyPurged (in long numEntries); */
  NS_IMETHOD HistoryPurged(int32_t numEntries) = 0;

  /* readonly attribute nsIChannel currentDocumentChannel; */
  NS_IMETHOD GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel) = 0;

  /* [noscript] attribute long childOffset; */
  NS_IMETHOD GetChildOffset(int32_t *aChildOffset) = 0;
  NS_IMETHOD SetChildOffset(int32_t aChildOffset) = 0;

  /* readonly attribute boolean isInUnload; */
  NS_IMETHOD GetIsInUnload(bool *aIsInUnload) = 0;

  /* [infallible] readonly attribute boolean hasMixedActiveContentLoaded; */
  NS_IMETHOD GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded) = 0;
  inline bool GetHasMixedActiveContentLoaded()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasMixedActiveContentLoaded(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean hasMixedActiveContentBlocked; */
  NS_IMETHOD GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked) = 0;
  inline bool GetHasMixedActiveContentBlocked()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasMixedActiveContentBlocked(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean hasMixedDisplayContentLoaded; */
  NS_IMETHOD GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded) = 0;
  inline bool GetHasMixedDisplayContentLoaded()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasMixedDisplayContentLoaded(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean hasMixedDisplayContentBlocked; */
  NS_IMETHOD GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked) = 0;
  inline bool GetHasMixedDisplayContentBlocked()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasMixedDisplayContentBlocked(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean hasTrackingContentBlocked; */
  NS_IMETHOD GetHasTrackingContentBlocked(bool *aHasTrackingContentBlocked) = 0;
  inline bool GetHasTrackingContentBlocked()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasTrackingContentBlocked(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean hasTrackingContentLoaded; */
  NS_IMETHOD GetHasTrackingContentLoaded(bool *aHasTrackingContentLoaded) = 0;
  inline bool GetHasTrackingContentLoaded()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasTrackingContentLoaded(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [noscript,notxpcom] void DetachEditorFromWindow (); */
  NS_IMETHOD_(void) DetachEditorFromWindow(void) = 0;

  /* attribute boolean isOffScreenBrowser; */
  NS_IMETHOD GetIsOffScreenBrowser(bool *aIsOffScreenBrowser) = 0;
  NS_IMETHOD SetIsOffScreenBrowser(bool aIsOffScreenBrowser) = 0;

  /* void setIsPrinting (in boolean aIsPrinting); */
  NS_IMETHOD SetIsPrinting(bool aIsPrinting) = 0;

  /* readonly attribute nsIWebBrowserPrint printPreview; */
  NS_IMETHOD GetPrintPreview(nsIWebBrowserPrint **aPrintPreview) = 0;

  /* [infallible] readonly attribute boolean canExecuteScripts; */
  NS_IMETHOD GetCanExecuteScripts(bool *aCanExecuteScripts) = 0;
  inline bool GetCanExecuteScripts()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetCanExecuteScripts(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* attribute boolean isActive; */
  NS_IMETHOD GetIsActive(bool *aIsActive) = 0;
  NS_IMETHOD SetIsActive(bool aIsActive) = 0;

  /* readonly attribute nsIDPtr historyID; */
  NS_IMETHOD GetHistoryID(nsID * * aHistoryID) = 0;

  /* [noscript,notxpcom] nsID HistoryID (); */
  NS_IMETHOD_(const nsID) HistoryID(void) = 0;

  /* attribute boolean isAppTab; */
  NS_IMETHOD GetIsAppTab(bool *aIsAppTab) = 0;
  NS_IMETHOD SetIsAppTab(bool aIsAppTab) = 0;

  /* void createAboutBlankContentViewer (in nsIPrincipal aPrincipal); */
  NS_IMETHOD CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) = 0;

  /* [noscript] void forceCreateAboutBlankContentViewer (in nsIPrincipal aPrincipal); */
  NS_IMETHOD ForceCreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) = 0;

  /* attribute ACString charset; */
  NS_IMETHOD GetCharset(nsACString& aCharset) = 0;
  NS_IMETHOD SetCharset(const nsACString& aCharset) = 0;

  /* void gatherCharsetMenuTelemetry (); */
  NS_IMETHOD GatherCharsetMenuTelemetry(void) = 0;

  /* attribute ACString forcedCharset; */
  NS_IMETHOD GetForcedCharset(nsACString& aForcedCharset) = 0;
  NS_IMETHOD SetForcedCharset(const nsACString& aForcedCharset) = 0;

  /* [noscript,nostdcall,notxpcom] void setParentCharset (in Encoding parentCharset, in int32_t parentCharsetSource, in nsIPrincipal parentCharsetPrincipal); */
  virtual void SetParentCharset(const mozilla::Encoding* & parentCharset, int32_t parentCharsetSource, nsIPrincipal *parentCharsetPrincipal) = 0;

  /* [noscript,nostdcall,notxpcom] void getParentCharset (out Encoding parentCharset, out int32_t parentCharsetSource, out nsIPrincipal parentCharsetPrincipal); */
  virtual void GetParentCharset(const mozilla::Encoding* & parentCharset, int32_t *parentCharsetSource, nsIPrincipal **parentCharsetPrincipal) = 0;

  /* [infallible] attribute boolean recordProfileTimelineMarkers; */
  NS_IMETHOD GetRecordProfileTimelineMarkers(bool *aRecordProfileTimelineMarkers) = 0;
  inline bool GetRecordProfileTimelineMarkers()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetRecordProfileTimelineMarkers(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetRecordProfileTimelineMarkers(bool aRecordProfileTimelineMarkers) = 0;

  /* DOMHighResTimeStamp now (); */
  NS_IMETHOD Now(DOMHighResTimeStamp *_retval) = 0;

  /* [implicit_jscontext] jsval popProfileTimelineMarkers (); */
  NS_IMETHOD PopProfileTimelineMarkers(JSContext* cx, JS::MutableHandleValue _retval) = 0;

  /* void addWeakPrivacyTransitionObserver (in nsIPrivacyTransitionObserver obs); */
  NS_IMETHOD AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs) = 0;

  /* void addWeakReflowObserver (in nsIReflowObserver obs); */
  NS_IMETHOD AddWeakReflowObserver(nsIReflowObserver *obs) = 0;

  /* void removeWeakReflowObserver (in nsIReflowObserver obs); */
  NS_IMETHOD RemoveWeakReflowObserver(nsIReflowObserver *obs) = 0;

  /* [noscript] void notifyReflowObservers (in bool interruptible, in DOMHighResTimeStamp start, in DOMHighResTimeStamp end); */
  NS_IMETHOD NotifyReflowObservers(bool interruptible, DOMHighResTimeStamp start, DOMHighResTimeStamp end) = 0;

  /* [noscript] void addWeakScrollObserver (in nsIScrollObserver obs); */
  NS_IMETHOD AddWeakScrollObserver(nsIScrollObserver *obs) = 0;

  /* [noscript] void removeWeakScrollObserver (in nsIScrollObserver obs); */
  NS_IMETHOD RemoveWeakScrollObserver(nsIScrollObserver *obs) = 0;

  /* [noscript] void notifyScrollObservers (); */
  NS_IMETHOD NotifyScrollObservers(void) = 0;

  enum {
    FRAME_TYPE_REGULAR = 0U,
    FRAME_TYPE_BROWSER = 1U
  };

  /* [infallible] attribute unsigned long frameType; */
  NS_IMETHOD GetFrameType(uint32_t *aFrameType) = 0;
  inline uint32_t GetFrameType()
  {
    uint32_t result;
    mozilla::DebugOnly<nsresult> rv = GetFrameType(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetFrameType(uint32_t aFrameType) = 0;

  /* [infallible] readonly attribute boolean isMozBrowser; */
  NS_IMETHOD GetIsMozBrowser(bool *aIsMozBrowser) = 0;
  inline bool GetIsMozBrowser()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetIsMozBrowser(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean isIsolatedMozBrowserElement; */
  NS_IMETHOD GetIsIsolatedMozBrowserElement(bool *aIsIsolatedMozBrowserElement) = 0;
  inline bool GetIsIsolatedMozBrowserElement()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetIsIsolatedMozBrowserElement(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean isInIsolatedMozBrowserElement; */
  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool *aIsInIsolatedMozBrowserElement) = 0;
  inline bool GetIsInIsolatedMozBrowserElement()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetIsInIsolatedMozBrowserElement(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean isInMozBrowser; */
  NS_IMETHOD GetIsInMozBrowser(bool *aIsInMozBrowser) = 0;
  inline bool GetIsInMozBrowser()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetIsInMozBrowser(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean isTopLevelContentDocShell; */
  NS_IMETHOD GetIsTopLevelContentDocShell(bool *aIsTopLevelContentDocShell) = 0;
  inline bool GetIsTopLevelContentDocShell()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetIsTopLevelContentDocShell(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* nsIDocShell getSameTypeParentIgnoreBrowserBoundaries (); */
  NS_IMETHOD GetSameTypeParentIgnoreBrowserBoundaries(nsIDocShell **_retval) = 0;

  /* nsIDocShell getSameTypeRootTreeItemIgnoreBrowserBoundaries (); */
  NS_IMETHOD GetSameTypeRootTreeItemIgnoreBrowserBoundaries(nsIDocShell **_retval) = 0;

  /* readonly attribute bool asyncPanZoomEnabled; */
  NS_IMETHOD GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled) = 0;

  /* attribute unsigned long sandboxFlags; */
  NS_IMETHOD GetSandboxFlags(uint32_t *aSandboxFlags) = 0;
  NS_IMETHOD SetSandboxFlags(uint32_t aSandboxFlags) = 0;

  /* attribute nsIDocShell onePermittedSandboxedNavigator; */
  NS_IMETHOD GetOnePermittedSandboxedNavigator(nsIDocShell **aOnePermittedSandboxedNavigator) = 0;
  NS_IMETHOD SetOnePermittedSandboxedNavigator(nsIDocShell *aOnePermittedSandboxedNavigator) = 0;

  /* [noscript,nostdcall,notxpcom] bool isSandboxedFrom (in nsIDocShell aTargetDocShell); */
  virtual bool IsSandboxedFrom(nsIDocShell *aTargetDocShell) = 0;

  /* attribute nsIChannel mixedContentChannel; */
  NS_IMETHOD GetMixedContentChannel(nsIChannel **aMixedContentChannel) = 0;
  NS_IMETHOD SetMixedContentChannel(nsIChannel *aMixedContentChannel) = 0;

  /* void GetAllowMixedContentAndConnectionData (out boolean rootHasSecureConnection, out boolean allowMixedContent, out boolean isRootDocShell); */
  NS_IMETHOD GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell) = 0;

  /* [noscript,notxpcom] bool pluginsAllowedInCurrentDoc (); */
  NS_IMETHOD_(bool) PluginsAllowedInCurrentDoc(void) = 0;

  /* [infallible] readonly attribute boolean fullscreenAllowed; */
  NS_IMETHOD GetFullscreenAllowed(bool *aFullscreenAllowed) = 0;
  inline bool GetFullscreenAllowed()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetFullscreenAllowed(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* void setFullscreenAllowed (in boolean allowed); */
  NS_IMETHOD SetFullscreenAllowed(bool allowed) = 0;

  /* [notxpcom] uint32_t orientationLock (); */
  NS_IMETHOD_(uint32_t) OrientationLock(void) = 0;

  /* [notxpcom] void setOrientationLock (in uint32_t orientationLock); */
  NS_IMETHOD_(void) SetOrientationLock(uint32_t orientationLock) = 0;

  /* [infallible,noscript] attribute boolean affectPrivateSessionLifetime; */
  NS_IMETHOD GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime) = 0;
  inline bool GetAffectPrivateSessionLifetime()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetAffectPrivateSessionLifetime(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime) = 0;

  /* [infallible] readonly attribute boolean mayEnableCharacterEncodingMenu; */
  NS_IMETHOD GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu) = 0;
  inline bool GetMayEnableCharacterEncodingMenu()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetMayEnableCharacterEncodingMenu(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* attribute nsIEditor editor; */
  NS_IMETHOD GetEditor(nsIEditor **aEditor) = 0;
  NS_IMETHOD SetEditor(nsIEditor *aEditor) = 0;

  /* readonly attribute boolean editable; */
  NS_IMETHOD GetEditable(bool *aEditable) = 0;

  /* readonly attribute boolean hasEditingSession; */
  NS_IMETHOD GetHasEditingSession(bool *aHasEditingSession) = 0;

  /* void makeEditable (in boolean inWaitForUriLoad); */
  NS_IMETHOD MakeEditable(bool inWaitForUriLoad) = 0;

  /* nsISHEntry getChildSHEntry (in long aChildOffset); */
  NS_IMETHOD GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval) = 0;

  /* void addChildSHEntry (in nsISHEntry aCloneReference, in nsISHEntry aHistoryEntry, in long aChildOffset, in unsigned long aLoadType, in boolean aCloneChilden); */
  NS_IMETHOD AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChilden) = 0;

  /* attribute boolean useGlobalHistory; */
  NS_IMETHOD GetUseGlobalHistory(bool *aUseGlobalHistory) = 0;
  NS_IMETHOD SetUseGlobalHistory(bool aUseGlobalHistory) = 0;

  /* void removeFromSessionHistory (); */
  NS_IMETHOD RemoveFromSessionHistory(void) = 0;

  /* [infallible] attribute boolean createdDynamically; */
  NS_IMETHOD GetCreatedDynamically(bool *aCreatedDynamically) = 0;
  inline bool GetCreatedDynamically()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetCreatedDynamically(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetCreatedDynamically(bool aCreatedDynamically) = 0;

  /* boolean getCurrentSHEntry (out nsISHEntry aEntry); */
  NS_IMETHOD GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval) = 0;

  /* boolean isCommandEnabled (in string command); */
  NS_IMETHOD IsCommandEnabled(const char * command, bool *_retval) = 0;

  /* void doCommand (in string command); */
  NS_IMETHOD DoCommand(const char * command) = 0;

  /* void doCommandWithParams (in string command, in nsICommandParams aParams); */
  NS_IMETHOD DoCommandWithParams(const char * command, nsICommandParams *aParams) = 0;

  /* [noscript,notxpcom] bool IsInvisible (); */
  NS_IMETHOD_(bool) IsInvisible(void) = 0;

  /* [noscript,notxpcom] void SetInvisible (in bool aIsInvisibleDochsell); */
  NS_IMETHOD_(void) SetInvisible(bool aIsInvisibleDochsell) = 0;

  /* [noscript,nostdcall,notxpcom] nsIScriptGlobalObject GetScriptGlobalObject (); */
  virtual nsIScriptGlobalObject * GetScriptGlobalObject(void) = 0;

  /* [infallible] attribute boolean deviceSizeIsPageSize; */
  NS_IMETHOD GetDeviceSizeIsPageSize(bool *aDeviceSizeIsPageSize) = 0;
  inline bool GetDeviceSizeIsPageSize()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetDeviceSizeIsPageSize(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }
  NS_IMETHOD SetDeviceSizeIsPageSize(bool aDeviceSizeIsPageSize) = 0;

  /* [noscript,nostdcall,notxpcom] void setOpener (in nsITabParent aOpener); */
  virtual void SetOpener(nsITabParent *aOpener) = 0;

  /* [noscript,nostdcall,notxpcom] nsITabParent getOpener (); */
  virtual nsITabParent * GetOpener(void) = 0;

  /* [noscript,nostdcall,notxpcom] void notifyJSRunToCompletionStart (in string aReason, in wstring functionName, in wstring fileName, in unsigned long lineNumber, in jsval asyncStack, in string asyncCause); */
  virtual void NotifyJSRunToCompletionStart(const char * aReason, const char16_t * functionName, const char16_t * fileName, uint32_t lineNumber, JS::HandleValue asyncStack, const char * asyncCause) = 0;

  /* [noscript,nostdcall,notxpcom] void notifyJSRunToCompletionStop (); */
  virtual void NotifyJSRunToCompletionStop(void) = 0;

  /* [infallible] readonly attribute boolean hasLoadedNonBlankURI; */
  NS_IMETHOD GetHasLoadedNonBlankURI(bool *aHasLoadedNonBlankURI) = 0;
  inline bool GetHasLoadedNonBlankURI()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetHasLoadedNonBlankURI(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* attribute boolean windowDraggingAllowed; */
  NS_IMETHOD GetWindowDraggingAllowed(bool *aWindowDraggingAllowed) = 0;
  NS_IMETHOD SetWindowDraggingAllowed(bool aWindowDraggingAllowed) = 0;

  /* attribute boolean currentScrollRestorationIsManual; */
  NS_IMETHOD GetCurrentScrollRestorationIsManual(bool *aCurrentScrollRestorationIsManual) = 0;
  NS_IMETHOD SetCurrentScrollRestorationIsManual(bool aCurrentScrollRestorationIsManual) = 0;

  /* [implicit_jscontext] jsval getOriginAttributes (); */
  NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue _retval) = 0;

  /* [implicit_jscontext] void setOriginAttributes (in jsval aAttrs); */
  NS_IMETHOD SetOriginAttributes(JS::HandleValue aAttrs, JSContext* cx) = 0;

  /* readonly attribute nsIEditingSession editingSession; */
  NS_IMETHOD GetEditingSession(nsIEditingSession **aEditingSession) = 0;

  /* [binaryname(ScriptableTabChild)] readonly attribute nsITabChild tabChild; */
  NS_IMETHOD GetScriptableTabChild(nsITabChild **aTabChild) = 0;

  /* [noscript,nostdcall,notxpcom] TabChildRef GetTabChild (); */
  virtual already_AddRefed<nsITabChild> GetTabChild(void) = 0;

  /* [noscript,nostdcall,notxpcom] nsICommandManager GetCommandManager (); */
  virtual nsICommandManager * GetCommandManager(void) = 0;

  /* attribute unsigned long touchEventsOverride; */
  NS_IMETHOD GetTouchEventsOverride(uint32_t *aTouchEventsOverride) = 0;
  NS_IMETHOD SetTouchEventsOverride(uint32_t aTouchEventsOverride) = 0;

  enum {
    TOUCHEVENTS_OVERRIDE_DISABLED = 0U,
    TOUCHEVENTS_OVERRIDE_ENABLED = 1U,
    TOUCHEVENTS_OVERRIDE_NONE = 2U
  };

  /* [infallible] readonly attribute boolean isOnlyToplevelInTabGroup; */
  NS_IMETHOD GetIsOnlyToplevelInTabGroup(bool *aIsOnlyToplevelInTabGroup) = 0;
  inline bool GetIsOnlyToplevelInTabGroup()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetIsOnlyToplevelInTabGroup(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* [infallible] readonly attribute boolean awaitingLargeAlloc; */
  NS_IMETHOD GetAwaitingLargeAlloc(bool *aAwaitingLargeAlloc) = 0;
  inline bool GetAwaitingLargeAlloc()
  {
    bool result;
    mozilla::DebugOnly<nsresult> rv = GetAwaitingLargeAlloc(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return result;
  }

  /* attribute boolean useTrackingProtection; */
  NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) = 0;
  NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) = 0;

  /* [noscript] void dispatchLocationChangeEvent (); */
  NS_IMETHOD DispatchLocationChangeEvent(void) = 0;

  /* [noscript,nostdcall,notxpcom] UniqueClientSource TakeInitialClientSource (); */
  virtual mozilla::UniquePtr<mozilla::dom::ClientSource> TakeInitialClientSource(void) = 0;

  /* void setColorMatrix ([array, size_is (aMatrixLen)] in float aMatrix, [optional] in unsigned long aMatrixLen); */
  NS_IMETHOD SetColorMatrix(float *aMatrix, uint32_t aMatrixLen) = 0;

  /* void getColorMatrix ([optional] out unsigned long aMatrixLen, [array, size_is (aMatrixLen), retval] out float aMatrix); */
  NS_IMETHOD GetColorMatrix(uint32_t *aMatrixLen, float **aMatrix) = 0;

  /* void initSessionHistory (); */
  NS_IMETHOD InitSessionHistory(void) = 0;

   /**
   * These methods call nsDocShell::GetHTMLEditorInternal() and
   * nsDocShell::SetHTMLEditorInternal() with static_cast.
   */
  mozilla::HTMLEditor* GetHTMLEditor();
  nsresult SetHTMLEditor(mozilla::HTMLEditor* aHTMLEditor);
  void AttachBrowsingContext(nsIDocShell* aParentDocShell);
  void DetachBrowsingContext();
  enum {
    DISPLAY_MODE_BROWSER = 0U,
    DISPLAY_MODE_MINIMAL_UI = 1U,
    DISPLAY_MODE_STANDALONE = 2U,
    DISPLAY_MODE_FULLSCREEN = 3U
  };

  /* attribute unsigned long displayMode; */
  NS_IMETHOD GetDisplayMode(uint32_t *aDisplayMode) = 0;
  NS_IMETHOD SetDisplayMode(uint32_t aDisplayMode) = 0;

  /* [infallible] readonly attribute ContentFrameMessageManager messageManager; */
  NS_IMETHOD GetMessageManager(mozilla::dom::ContentFrameMessageManager **aMessageManager) = 0;
  inline already_AddRefed<mozilla::dom::ContentFrameMessageManager>GetMessageManager()
  {
    mozilla::dom::ContentFrameMessageManager* result = nullptr;
    mozilla::DebugOnly<nsresult> rv = GetMessageManager(&result);
    MOZ_ASSERT(NS_SUCCEEDED(rv));
    return already_AddRefed<mozilla::dom::ContentFrameMessageManager>(result);
  }

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocShell, NS_IDOCSHELL_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCSHELL \
  NS_IMETHOD LoadURI(nsIURI *uri, nsDocShellLoadInfo* loadInfo, uint32_t aLoadFlags, bool firstParty) override; \
  NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aOriginalURI, const mozilla::Maybe<nsCOMPtr<nsIURI>> & aResultPrincipalURI, bool aKeepResultPrincipalURIIfSet, bool aLoadReplace, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aPrincipalToInherit, uint32_t aFlags, const nsAString& aWindowTarget, const char * aTypeHint, const nsAString& aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool aFirstParty, const nsAString& aSrcdoc, nsIDocShell *aSourceDocShell, nsIURI *aBaseURI, nsIDocShell **aDocShell, nsIRequest **aRequest) override; \
  NS_IMETHOD AddState(JS::HandleValue aData, const nsAString& aTitle, const nsAString& aURL, bool aReplace, JSContext* cx) override; \
  NS_IMETHOD PrepareForNewContentModel(void) override; \
  NS_IMETHOD SetCurrentURI(nsIURI *aURI) override; \
  NS_IMETHOD FirePageHideNotification(bool isUnload) override; \
  NS_IMETHOD GetPresContext(nsPresContext * * aPresContext) override; \
  NS_IMETHOD_(nsIPresShell *) GetPresShell(void) override; \
  NS_IMETHOD GetEldestPresShell(nsIPresShell * * aEldestPresShell) override; \
  NS_IMETHOD GetContentViewer(nsIContentViewer **aContentViewer) override; \
  NS_IMETHOD GetChromeEventHandler(mozilla::dom::EventTarget **aChromeEventHandler) override; \
  NS_IMETHOD SetChromeEventHandler(mozilla::dom::EventTarget *aChromeEventHandler) override; \
  NS_IMETHOD GetCustomUserAgent(nsAString& aCustomUserAgent) override; \
  NS_IMETHOD SetCustomUserAgent(const nsAString& aCustomUserAgent) override; \
  NS_IMETHOD GetCssErrorReportingEnabled(bool *aCssErrorReportingEnabled) override; \
  NS_IMETHOD SetCssErrorReportingEnabled(bool aCssErrorReportingEnabled) override; \
  NS_IMETHOD GetAllowPlugins(bool *aAllowPlugins) override; \
  NS_IMETHOD SetAllowPlugins(bool aAllowPlugins) override; \
  NS_IMETHOD GetAllowJavascript(bool *aAllowJavascript) override; \
  NS_IMETHOD SetAllowJavascript(bool aAllowJavascript) override; \
  NS_IMETHOD GetAllowMetaRedirects(bool *aAllowMetaRedirects) override; \
  NS_IMETHOD SetAllowMetaRedirects(bool aAllowMetaRedirects) override; \
  NS_IMETHOD GetAllowSubframes(bool *aAllowSubframes) override; \
  NS_IMETHOD SetAllowSubframes(bool aAllowSubframes) override; \
  NS_IMETHOD GetAllowImages(bool *aAllowImages) override; \
  NS_IMETHOD SetAllowImages(bool aAllowImages) override; \
  using nsIDocShell::GetAllowMedia; \
  NS_IMETHOD GetAllowMedia(bool *aAllowMedia) override; \
  NS_IMETHOD SetAllowMedia(bool aAllowMedia) override; \
  NS_IMETHOD GetAllowDNSPrefetch(bool *aAllowDNSPrefetch) override; \
  NS_IMETHOD SetAllowDNSPrefetch(bool aAllowDNSPrefetch) override; \
  NS_IMETHOD GetAllowWindowControl(bool *aAllowWindowControl) override; \
  NS_IMETHOD SetAllowWindowControl(bool aAllowWindowControl) override; \
  using nsIDocShell::GetAllowContentRetargeting; \
  NS_IMETHOD GetAllowContentRetargeting(bool *aAllowContentRetargeting) override; \
  NS_IMETHOD SetAllowContentRetargeting(bool aAllowContentRetargeting) override; \
  using nsIDocShell::GetAllowContentRetargetingOnChildren; \
  NS_IMETHOD GetAllowContentRetargetingOnChildren(bool *aAllowContentRetargetingOnChildren) override; \
  NS_IMETHOD SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren) override; \
  using nsIDocShell::GetInheritPrivateBrowsingId; \
  NS_IMETHOD GetInheritPrivateBrowsingId(bool *aInheritPrivateBrowsingId) override; \
  NS_IMETHOD SetInheritPrivateBrowsingId(bool aInheritPrivateBrowsingId) override; \
  NS_IMETHOD GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval) override; \
  NS_IMETHOD GetAppType(uint32_t *aAppType) override; \
  NS_IMETHOD SetAppType(uint32_t aAppType) override; \
  NS_IMETHOD GetAllowAuth(bool *aAllowAuth) override; \
  NS_IMETHOD SetAllowAuth(bool aAllowAuth) override; \
  NS_IMETHOD GetZoom(float *aZoom) override; \
  NS_IMETHOD SetZoom(float aZoom) override; \
  NS_IMETHOD GetMarginWidth(int32_t *aMarginWidth) override; \
  NS_IMETHOD SetMarginWidth(int32_t aMarginWidth) override; \
  NS_IMETHOD GetMarginHeight(int32_t *aMarginHeight) override; \
  NS_IMETHOD SetMarginHeight(int32_t aMarginHeight) override; \
  NS_IMETHOD TabToTreeOwner(bool forward, bool forDocumentNavigation, bool *_retval) override; \
  NS_IMETHOD GetBusyFlags(uint32_t *aBusyFlags) override; \
  NS_IMETHOD GetLoadType(uint32_t *aLoadType) override; \
  NS_IMETHOD SetLoadType(uint32_t aLoadType) override; \
  NS_IMETHOD GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags) override; \
  NS_IMETHOD SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags) override; \
  NS_IMETHOD IsBeingDestroyed(bool *_retval) override; \
  NS_IMETHOD GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler) override; \
  NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState) override; \
  NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState) override; \
  NS_IMETHOD GetShouldSaveLayoutState(bool *aShouldSaveLayoutState) override; \
  NS_IMETHOD GetSecurityUI(nsISecureBrowserUI **aSecurityUI) override; \
  NS_IMETHOD SetSecurityUI(nsISecureBrowserUI *aSecurityUI) override; \
  NS_IMETHOD GetLoadURIDelegate(nsILoadURIDelegate **aLoadURIDelegate) override; \
  NS_IMETHOD SetLoadURIDelegate(nsILoadURIDelegate *aLoadURIDelegate) override; \
  NS_IMETHOD SuspendRefreshURIs(void) override; \
  NS_IMETHOD ResumeRefreshURIs(void) override; \
  NS_IMETHOD BeginRestore(nsIContentViewer *viewer, bool top) override; \
  NS_IMETHOD FinishRestore(void) override; \
  NS_IMETHOD GetRestoringDocument(bool *aRestoringDocument) override; \
  NS_IMETHOD GetUseErrorPages(bool *aUseErrorPages) override; \
  NS_IMETHOD SetUseErrorPages(bool aUseErrorPages) override; \
  NS_IMETHOD DisplayLoadError(nsresult aError, nsIURI *aURI, const char16_t * aURL, nsIChannel *aFailedChannel, bool *_retval) override; \
  NS_IMETHOD GetFailedChannel(nsIChannel **aFailedChannel) override; \
  NS_IMETHOD GetPreviousTransIndex(int32_t *aPreviousTransIndex) override; \
  NS_IMETHOD GetLoadedTransIndex(int32_t *aLoadedTransIndex) override; \
  NS_IMETHOD HistoryPurged(int32_t numEntries) override; \
  NS_IMETHOD GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel) override; \
  NS_IMETHOD GetChildOffset(int32_t *aChildOffset) override; \
  NS_IMETHOD SetChildOffset(int32_t aChildOffset) override; \
  NS_IMETHOD GetIsInUnload(bool *aIsInUnload) override; \
  using nsIDocShell::GetHasMixedActiveContentLoaded; \
  NS_IMETHOD GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded) override; \
  using nsIDocShell::GetHasMixedActiveContentBlocked; \
  NS_IMETHOD GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked) override; \
  using nsIDocShell::GetHasMixedDisplayContentLoaded; \
  NS_IMETHOD GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded) override; \
  using nsIDocShell::GetHasMixedDisplayContentBlocked; \
  NS_IMETHOD GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked) override; \
  using nsIDocShell::GetHasTrackingContentBlocked; \
  NS_IMETHOD GetHasTrackingContentBlocked(bool *aHasTrackingContentBlocked) override; \
  using nsIDocShell::GetHasTrackingContentLoaded; \
  NS_IMETHOD GetHasTrackingContentLoaded(bool *aHasTrackingContentLoaded) override; \
  NS_IMETHOD_(void) DetachEditorFromWindow(void) override; \
  NS_IMETHOD GetIsOffScreenBrowser(bool *aIsOffScreenBrowser) override; \
  NS_IMETHOD SetIsOffScreenBrowser(bool aIsOffScreenBrowser) override; \
  NS_IMETHOD SetIsPrinting(bool aIsPrinting) override; \
  NS_IMETHOD GetPrintPreview(nsIWebBrowserPrint **aPrintPreview) override; \
  using nsIDocShell::GetCanExecuteScripts; \
  NS_IMETHOD GetCanExecuteScripts(bool *aCanExecuteScripts) override; \
  NS_IMETHOD GetIsActive(bool *aIsActive) override; \
  NS_IMETHOD SetIsActive(bool aIsActive) override; \
  NS_IMETHOD GetHistoryID(nsID * * aHistoryID) override; \
  NS_IMETHOD_(const nsID) HistoryID(void) override; \
  NS_IMETHOD GetIsAppTab(bool *aIsAppTab) override; \
  NS_IMETHOD SetIsAppTab(bool aIsAppTab) override; \
  NS_IMETHOD CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) override; \
  NS_IMETHOD ForceCreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) override; \
  NS_IMETHOD GetCharset(nsACString& aCharset) override; \
  NS_IMETHOD SetCharset(const nsACString& aCharset) override; \
  NS_IMETHOD GatherCharsetMenuTelemetry(void) override; \
  NS_IMETHOD GetForcedCharset(nsACString& aForcedCharset) override; \
  NS_IMETHOD SetForcedCharset(const nsACString& aForcedCharset) override; \
  virtual void SetParentCharset(const mozilla::Encoding* & parentCharset, int32_t parentCharsetSource, nsIPrincipal *parentCharsetPrincipal) override; \
  virtual void GetParentCharset(const mozilla::Encoding* & parentCharset, int32_t *parentCharsetSource, nsIPrincipal **parentCharsetPrincipal) override; \
  using nsIDocShell::GetRecordProfileTimelineMarkers; \
  NS_IMETHOD GetRecordProfileTimelineMarkers(bool *aRecordProfileTimelineMarkers) override; \
  NS_IMETHOD SetRecordProfileTimelineMarkers(bool aRecordProfileTimelineMarkers) override; \
  NS_IMETHOD Now(DOMHighResTimeStamp *_retval) override; \
  NS_IMETHOD PopProfileTimelineMarkers(JSContext* cx, JS::MutableHandleValue _retval) override; \
  NS_IMETHOD AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs) override; \
  NS_IMETHOD AddWeakReflowObserver(nsIReflowObserver *obs) override; \
  NS_IMETHOD RemoveWeakReflowObserver(nsIReflowObserver *obs) override; \
  NS_IMETHOD NotifyReflowObservers(bool interruptible, DOMHighResTimeStamp start, DOMHighResTimeStamp end) override; \
  NS_IMETHOD AddWeakScrollObserver(nsIScrollObserver *obs) override; \
  NS_IMETHOD RemoveWeakScrollObserver(nsIScrollObserver *obs) override; \
  NS_IMETHOD NotifyScrollObservers(void) override; \
  using nsIDocShell::GetFrameType; \
  NS_IMETHOD GetFrameType(uint32_t *aFrameType) override; \
  NS_IMETHOD SetFrameType(uint32_t aFrameType) override; \
  using nsIDocShell::GetIsMozBrowser; \
  NS_IMETHOD GetIsMozBrowser(bool *aIsMozBrowser) override; \
  using nsIDocShell::GetIsIsolatedMozBrowserElement; \
  NS_IMETHOD GetIsIsolatedMozBrowserElement(bool *aIsIsolatedMozBrowserElement) override; \
  using nsIDocShell::GetIsInIsolatedMozBrowserElement; \
  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool *aIsInIsolatedMozBrowserElement) override; \
  using nsIDocShell::GetIsInMozBrowser; \
  NS_IMETHOD GetIsInMozBrowser(bool *aIsInMozBrowser) override; \
  using nsIDocShell::GetIsTopLevelContentDocShell; \
  NS_IMETHOD GetIsTopLevelContentDocShell(bool *aIsTopLevelContentDocShell) override; \
  NS_IMETHOD GetSameTypeParentIgnoreBrowserBoundaries(nsIDocShell **_retval) override; \
  NS_IMETHOD GetSameTypeRootTreeItemIgnoreBrowserBoundaries(nsIDocShell **_retval) override; \
  NS_IMETHOD GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled) override; \
  NS_IMETHOD GetSandboxFlags(uint32_t *aSandboxFlags) override; \
  NS_IMETHOD SetSandboxFlags(uint32_t aSandboxFlags) override; \
  NS_IMETHOD GetOnePermittedSandboxedNavigator(nsIDocShell **aOnePermittedSandboxedNavigator) override; \
  NS_IMETHOD SetOnePermittedSandboxedNavigator(nsIDocShell *aOnePermittedSandboxedNavigator) override; \
  virtual bool IsSandboxedFrom(nsIDocShell *aTargetDocShell) override; \
  NS_IMETHOD GetMixedContentChannel(nsIChannel **aMixedContentChannel) override; \
  NS_IMETHOD SetMixedContentChannel(nsIChannel *aMixedContentChannel) override; \
  NS_IMETHOD GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell) override; \
  NS_IMETHOD_(bool) PluginsAllowedInCurrentDoc(void) override; \
  using nsIDocShell::GetFullscreenAllowed; \
  NS_IMETHOD GetFullscreenAllowed(bool *aFullscreenAllowed) override; \
  NS_IMETHOD SetFullscreenAllowed(bool allowed) override; \
  NS_IMETHOD_(uint32_t) OrientationLock(void) override; \
  NS_IMETHOD_(void) SetOrientationLock(uint32_t orientationLock) override; \
  using nsIDocShell::GetAffectPrivateSessionLifetime; \
  NS_IMETHOD GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime) override; \
  NS_IMETHOD SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime) override; \
  using nsIDocShell::GetMayEnableCharacterEncodingMenu; \
  NS_IMETHOD GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu) override; \
  NS_IMETHOD GetEditor(nsIEditor **aEditor) override; \
  NS_IMETHOD SetEditor(nsIEditor *aEditor) override; \
  NS_IMETHOD GetEditable(bool *aEditable) override; \
  NS_IMETHOD GetHasEditingSession(bool *aHasEditingSession) override; \
  NS_IMETHOD MakeEditable(bool inWaitForUriLoad) override; \
  NS_IMETHOD GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval) override; \
  NS_IMETHOD AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChilden) override; \
  NS_IMETHOD GetUseGlobalHistory(bool *aUseGlobalHistory) override; \
  NS_IMETHOD SetUseGlobalHistory(bool aUseGlobalHistory) override; \
  NS_IMETHOD RemoveFromSessionHistory(void) override; \
  using nsIDocShell::GetCreatedDynamically; \
  NS_IMETHOD GetCreatedDynamically(bool *aCreatedDynamically) override; \
  NS_IMETHOD SetCreatedDynamically(bool aCreatedDynamically) override; \
  NS_IMETHOD GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval) override; \
  NS_IMETHOD IsCommandEnabled(const char * command, bool *_retval) override; \
  NS_IMETHOD DoCommand(const char * command) override; \
  NS_IMETHOD DoCommandWithParams(const char * command, nsICommandParams *aParams) override; \
  NS_IMETHOD_(bool) IsInvisible(void) override; \
  NS_IMETHOD_(void) SetInvisible(bool aIsInvisibleDochsell) override; \
  virtual nsIScriptGlobalObject * GetScriptGlobalObject(void) override; \
  using nsIDocShell::GetDeviceSizeIsPageSize; \
  NS_IMETHOD GetDeviceSizeIsPageSize(bool *aDeviceSizeIsPageSize) override; \
  NS_IMETHOD SetDeviceSizeIsPageSize(bool aDeviceSizeIsPageSize) override; \
  virtual void SetOpener(nsITabParent *aOpener) override; \
  virtual nsITabParent * GetOpener(void) override; \
  virtual void NotifyJSRunToCompletionStart(const char * aReason, const char16_t * functionName, const char16_t * fileName, uint32_t lineNumber, JS::HandleValue asyncStack, const char * asyncCause) override; \
  virtual void NotifyJSRunToCompletionStop(void) override; \
  using nsIDocShell::GetHasLoadedNonBlankURI; \
  NS_IMETHOD GetHasLoadedNonBlankURI(bool *aHasLoadedNonBlankURI) override; \
  NS_IMETHOD GetWindowDraggingAllowed(bool *aWindowDraggingAllowed) override; \
  NS_IMETHOD SetWindowDraggingAllowed(bool aWindowDraggingAllowed) override; \
  NS_IMETHOD GetCurrentScrollRestorationIsManual(bool *aCurrentScrollRestorationIsManual) override; \
  NS_IMETHOD SetCurrentScrollRestorationIsManual(bool aCurrentScrollRestorationIsManual) override; \
  NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue _retval) override; \
  NS_IMETHOD SetOriginAttributes(JS::HandleValue aAttrs, JSContext* cx) override; \
  NS_IMETHOD GetEditingSession(nsIEditingSession **aEditingSession) override; \
  NS_IMETHOD GetScriptableTabChild(nsITabChild **aTabChild) override; \
  virtual already_AddRefed<nsITabChild> GetTabChild(void) override; \
  virtual nsICommandManager * GetCommandManager(void) override; \
  NS_IMETHOD GetTouchEventsOverride(uint32_t *aTouchEventsOverride) override; \
  NS_IMETHOD SetTouchEventsOverride(uint32_t aTouchEventsOverride) override; \
  using nsIDocShell::GetIsOnlyToplevelInTabGroup; \
  NS_IMETHOD GetIsOnlyToplevelInTabGroup(bool *aIsOnlyToplevelInTabGroup) override; \
  using nsIDocShell::GetAwaitingLargeAlloc; \
  NS_IMETHOD GetAwaitingLargeAlloc(bool *aAwaitingLargeAlloc) override; \
  NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) override; \
  NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) override; \
  NS_IMETHOD DispatchLocationChangeEvent(void) override; \
  virtual mozilla::UniquePtr<mozilla::dom::ClientSource> TakeInitialClientSource(void) override; \
  NS_IMETHOD SetColorMatrix(float *aMatrix, uint32_t aMatrixLen) override; \
  NS_IMETHOD GetColorMatrix(uint32_t *aMatrixLen, float **aMatrix) override; \
  NS_IMETHOD InitSessionHistory(void) override; \
  NS_IMETHOD GetDisplayMode(uint32_t *aDisplayMode) override; \
  NS_IMETHOD SetDisplayMode(uint32_t aDisplayMode) override; \
  using nsIDocShell::GetMessageManager; \
  NS_IMETHOD GetMessageManager(mozilla::dom::ContentFrameMessageManager **aMessageManager) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIDOCSHELL \
  nsresult LoadURI(nsIURI *uri, nsDocShellLoadInfo* loadInfo, uint32_t aLoadFlags, bool firstParty); \
  nsresult InternalLoad(nsIURI *aURI, nsIURI *aOriginalURI, const mozilla::Maybe<nsCOMPtr<nsIURI>> & aResultPrincipalURI, bool aKeepResultPrincipalURIIfSet, bool aLoadReplace, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aPrincipalToInherit, uint32_t aFlags, const nsAString& aWindowTarget, const char * aTypeHint, const nsAString& aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool aFirstParty, const nsAString& aSrcdoc, nsIDocShell *aSourceDocShell, nsIURI *aBaseURI, nsIDocShell **aDocShell, nsIRequest **aRequest); \
  nsresult AddState(JS::HandleValue aData, const nsAString& aTitle, const nsAString& aURL, bool aReplace, JSContext* cx); \
  nsresult PrepareForNewContentModel(void); \
  nsresult SetCurrentURI(nsIURI *aURI); \
  nsresult FirePageHideNotification(bool isUnload); \
  nsresult GetPresContext(nsPresContext * * aPresContext); \
  nsresult_(nsIPresShell *) GetPresShell(void); \
  nsresult GetEldestPresShell(nsIPresShell * * aEldestPresShell); \
  nsresult GetContentViewer(nsIContentViewer **aContentViewer); \
  nsresult GetChromeEventHandler(mozilla::dom::EventTarget **aChromeEventHandler); \
  nsresult SetChromeEventHandler(mozilla::dom::EventTarget *aChromeEventHandler); \
  nsresult GetCustomUserAgent(nsAString& aCustomUserAgent); \
  nsresult SetCustomUserAgent(const nsAString& aCustomUserAgent); \
  nsresult GetCssErrorReportingEnabled(bool *aCssErrorReportingEnabled); \
  nsresult SetCssErrorReportingEnabled(bool aCssErrorReportingEnabled); \
  nsresult GetAllowPlugins(bool *aAllowPlugins); \
  nsresult SetAllowPlugins(bool aAllowPlugins); \
  nsresult GetAllowJavascript(bool *aAllowJavascript); \
  nsresult SetAllowJavascript(bool aAllowJavascript); \
  nsresult GetAllowMetaRedirects(bool *aAllowMetaRedirects); \
  nsresult SetAllowMetaRedirects(bool aAllowMetaRedirects); \
  nsresult GetAllowSubframes(bool *aAllowSubframes); \
  nsresult SetAllowSubframes(bool aAllowSubframes); \
  nsresult GetAllowImages(bool *aAllowImages); \
  nsresult SetAllowImages(bool aAllowImages); \
  using nsIDocShell::GetAllowMedia; \
  nsresult GetAllowMedia(bool *aAllowMedia); \
  nsresult SetAllowMedia(bool aAllowMedia); \
  nsresult GetAllowDNSPrefetch(bool *aAllowDNSPrefetch); \
  nsresult SetAllowDNSPrefetch(bool aAllowDNSPrefetch); \
  nsresult GetAllowWindowControl(bool *aAllowWindowControl); \
  nsresult SetAllowWindowControl(bool aAllowWindowControl); \
  using nsIDocShell::GetAllowContentRetargeting; \
  nsresult GetAllowContentRetargeting(bool *aAllowContentRetargeting); \
  nsresult SetAllowContentRetargeting(bool aAllowContentRetargeting); \
  using nsIDocShell::GetAllowContentRetargetingOnChildren; \
  nsresult GetAllowContentRetargetingOnChildren(bool *aAllowContentRetargetingOnChildren); \
  nsresult SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren); \
  using nsIDocShell::GetInheritPrivateBrowsingId; \
  nsresult GetInheritPrivateBrowsingId(bool *aInheritPrivateBrowsingId); \
  nsresult SetInheritPrivateBrowsingId(bool aInheritPrivateBrowsingId); \
  nsresult GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval); \
  nsresult GetAppType(uint32_t *aAppType); \
  nsresult SetAppType(uint32_t aAppType); \
  nsresult GetAllowAuth(bool *aAllowAuth); \
  nsresult SetAllowAuth(bool aAllowAuth); \
  nsresult GetZoom(float *aZoom); \
  nsresult SetZoom(float aZoom); \
  nsresult GetMarginWidth(int32_t *aMarginWidth); \
  nsresult SetMarginWidth(int32_t aMarginWidth); \
  nsresult GetMarginHeight(int32_t *aMarginHeight); \
  nsresult SetMarginHeight(int32_t aMarginHeight); \
  nsresult TabToTreeOwner(bool forward, bool forDocumentNavigation, bool *_retval); \
  nsresult GetBusyFlags(uint32_t *aBusyFlags); \
  nsresult GetLoadType(uint32_t *aLoadType); \
  nsresult SetLoadType(uint32_t aLoadType); \
  nsresult GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags); \
  nsresult SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags); \
  nsresult IsBeingDestroyed(bool *_retval); \
  nsresult GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler); \
  nsresult GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState); \
  nsresult SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState); \
  nsresult GetShouldSaveLayoutState(bool *aShouldSaveLayoutState); \
  nsresult GetSecurityUI(nsISecureBrowserUI **aSecurityUI); \
  nsresult SetSecurityUI(nsISecureBrowserUI *aSecurityUI); \
  nsresult GetLoadURIDelegate(nsILoadURIDelegate **aLoadURIDelegate); \
  nsresult SetLoadURIDelegate(nsILoadURIDelegate *aLoadURIDelegate); \
  nsresult SuspendRefreshURIs(void); \
  nsresult ResumeRefreshURIs(void); \
  nsresult BeginRestore(nsIContentViewer *viewer, bool top); \
  nsresult FinishRestore(void); \
  nsresult GetRestoringDocument(bool *aRestoringDocument); \
  nsresult GetUseErrorPages(bool *aUseErrorPages); \
  nsresult SetUseErrorPages(bool aUseErrorPages); \
  nsresult DisplayLoadError(nsresult aError, nsIURI *aURI, const char16_t * aURL, nsIChannel *aFailedChannel, bool *_retval); \
  nsresult GetFailedChannel(nsIChannel **aFailedChannel); \
  nsresult GetPreviousTransIndex(int32_t *aPreviousTransIndex); \
  nsresult GetLoadedTransIndex(int32_t *aLoadedTransIndex); \
  nsresult HistoryPurged(int32_t numEntries); \
  nsresult GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel); \
  nsresult GetChildOffset(int32_t *aChildOffset); \
  nsresult SetChildOffset(int32_t aChildOffset); \
  nsresult GetIsInUnload(bool *aIsInUnload); \
  using nsIDocShell::GetHasMixedActiveContentLoaded; \
  nsresult GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded); \
  using nsIDocShell::GetHasMixedActiveContentBlocked; \
  nsresult GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked); \
  using nsIDocShell::GetHasMixedDisplayContentLoaded; \
  nsresult GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded); \
  using nsIDocShell::GetHasMixedDisplayContentBlocked; \
  nsresult GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked); \
  using nsIDocShell::GetHasTrackingContentBlocked; \
  nsresult GetHasTrackingContentBlocked(bool *aHasTrackingContentBlocked); \
  using nsIDocShell::GetHasTrackingContentLoaded; \
  nsresult GetHasTrackingContentLoaded(bool *aHasTrackingContentLoaded); \
  nsresult_(void) DetachEditorFromWindow(void); \
  nsresult GetIsOffScreenBrowser(bool *aIsOffScreenBrowser); \
  nsresult SetIsOffScreenBrowser(bool aIsOffScreenBrowser); \
  nsresult SetIsPrinting(bool aIsPrinting); \
  nsresult GetPrintPreview(nsIWebBrowserPrint **aPrintPreview); \
  using nsIDocShell::GetCanExecuteScripts; \
  nsresult GetCanExecuteScripts(bool *aCanExecuteScripts); \
  nsresult GetIsActive(bool *aIsActive); \
  nsresult SetIsActive(bool aIsActive); \
  nsresult GetHistoryID(nsID * * aHistoryID); \
  nsresult_(const nsID) HistoryID(void); \
  nsresult GetIsAppTab(bool *aIsAppTab); \
  nsresult SetIsAppTab(bool aIsAppTab); \
  nsresult CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal); \
  nsresult ForceCreateAboutBlankContentViewer(nsIPrincipal *aPrincipal); \
  nsresult GetCharset(nsACString& aCharset); \
  nsresult SetCharset(const nsACString& aCharset); \
  nsresult GatherCharsetMenuTelemetry(void); \
  nsresult GetForcedCharset(nsACString& aForcedCharset); \
  nsresult SetForcedCharset(const nsACString& aForcedCharset); \
  void SetParentCharset(const mozilla::Encoding* & parentCharset, int32_t parentCharsetSource, nsIPrincipal *parentCharsetPrincipal); \
  void GetParentCharset(const mozilla::Encoding* & parentCharset, int32_t *parentCharsetSource, nsIPrincipal **parentCharsetPrincipal); \
  using nsIDocShell::GetRecordProfileTimelineMarkers; \
  nsresult GetRecordProfileTimelineMarkers(bool *aRecordProfileTimelineMarkers); \
  nsresult SetRecordProfileTimelineMarkers(bool aRecordProfileTimelineMarkers); \
  nsresult Now(DOMHighResTimeStamp *_retval); \
  nsresult PopProfileTimelineMarkers(JSContext* cx, JS::MutableHandleValue _retval); \
  nsresult AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs); \
  nsresult AddWeakReflowObserver(nsIReflowObserver *obs); \
  nsresult RemoveWeakReflowObserver(nsIReflowObserver *obs); \
  nsresult NotifyReflowObservers(bool interruptible, DOMHighResTimeStamp start, DOMHighResTimeStamp end); \
  nsresult AddWeakScrollObserver(nsIScrollObserver *obs); \
  nsresult RemoveWeakScrollObserver(nsIScrollObserver *obs); \
  nsresult NotifyScrollObservers(void); \
  using nsIDocShell::GetFrameType; \
  nsresult GetFrameType(uint32_t *aFrameType); \
  nsresult SetFrameType(uint32_t aFrameType); \
  using nsIDocShell::GetIsMozBrowser; \
  nsresult GetIsMozBrowser(bool *aIsMozBrowser); \
  using nsIDocShell::GetIsIsolatedMozBrowserElement; \
  nsresult GetIsIsolatedMozBrowserElement(bool *aIsIsolatedMozBrowserElement); \
  using nsIDocShell::GetIsInIsolatedMozBrowserElement; \
  nsresult GetIsInIsolatedMozBrowserElement(bool *aIsInIsolatedMozBrowserElement); \
  using nsIDocShell::GetIsInMozBrowser; \
  nsresult GetIsInMozBrowser(bool *aIsInMozBrowser); \
  using nsIDocShell::GetIsTopLevelContentDocShell; \
  nsresult GetIsTopLevelContentDocShell(bool *aIsTopLevelContentDocShell); \
  nsresult GetSameTypeParentIgnoreBrowserBoundaries(nsIDocShell **_retval); \
  nsresult GetSameTypeRootTreeItemIgnoreBrowserBoundaries(nsIDocShell **_retval); \
  nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled); \
  nsresult GetSandboxFlags(uint32_t *aSandboxFlags); \
  nsresult SetSandboxFlags(uint32_t aSandboxFlags); \
  nsresult GetOnePermittedSandboxedNavigator(nsIDocShell **aOnePermittedSandboxedNavigator); \
  nsresult SetOnePermittedSandboxedNavigator(nsIDocShell *aOnePermittedSandboxedNavigator); \
  bool IsSandboxedFrom(nsIDocShell *aTargetDocShell); \
  nsresult GetMixedContentChannel(nsIChannel **aMixedContentChannel); \
  nsresult SetMixedContentChannel(nsIChannel *aMixedContentChannel); \
  nsresult GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell); \
  nsresult_(bool) PluginsAllowedInCurrentDoc(void); \
  using nsIDocShell::GetFullscreenAllowed; \
  nsresult GetFullscreenAllowed(bool *aFullscreenAllowed); \
  nsresult SetFullscreenAllowed(bool allowed); \
  nsresult_(uint32_t) OrientationLock(void); \
  nsresult_(void) SetOrientationLock(uint32_t orientationLock); \
  using nsIDocShell::GetAffectPrivateSessionLifetime; \
  nsresult GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime); \
  nsresult SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime); \
  using nsIDocShell::GetMayEnableCharacterEncodingMenu; \
  nsresult GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu); \
  nsresult GetEditor(nsIEditor **aEditor); \
  nsresult SetEditor(nsIEditor *aEditor); \
  nsresult GetEditable(bool *aEditable); \
  nsresult GetHasEditingSession(bool *aHasEditingSession); \
  nsresult MakeEditable(bool inWaitForUriLoad); \
  nsresult GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval); \
  nsresult AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChilden); \
  nsresult GetUseGlobalHistory(bool *aUseGlobalHistory); \
  nsresult SetUseGlobalHistory(bool aUseGlobalHistory); \
  nsresult RemoveFromSessionHistory(void); \
  using nsIDocShell::GetCreatedDynamically; \
  nsresult GetCreatedDynamically(bool *aCreatedDynamically); \
  nsresult SetCreatedDynamically(bool aCreatedDynamically); \
  nsresult GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval); \
  nsresult IsCommandEnabled(const char * command, bool *_retval); \
  nsresult DoCommand(const char * command); \
  nsresult DoCommandWithParams(const char * command, nsICommandParams *aParams); \
  nsresult_(bool) IsInvisible(void); \
  nsresult_(void) SetInvisible(bool aIsInvisibleDochsell); \
  nsIScriptGlobalObject * GetScriptGlobalObject(void); \
  using nsIDocShell::GetDeviceSizeIsPageSize; \
  nsresult GetDeviceSizeIsPageSize(bool *aDeviceSizeIsPageSize); \
  nsresult SetDeviceSizeIsPageSize(bool aDeviceSizeIsPageSize); \
  void SetOpener(nsITabParent *aOpener); \
  nsITabParent * GetOpener(void); \
  void NotifyJSRunToCompletionStart(const char * aReason, const char16_t * functionName, const char16_t * fileName, uint32_t lineNumber, JS::HandleValue asyncStack, const char * asyncCause); \
  void NotifyJSRunToCompletionStop(void); \
  using nsIDocShell::GetHasLoadedNonBlankURI; \
  nsresult GetHasLoadedNonBlankURI(bool *aHasLoadedNonBlankURI); \
  nsresult GetWindowDraggingAllowed(bool *aWindowDraggingAllowed); \
  nsresult SetWindowDraggingAllowed(bool aWindowDraggingAllowed); \
  nsresult GetCurrentScrollRestorationIsManual(bool *aCurrentScrollRestorationIsManual); \
  nsresult SetCurrentScrollRestorationIsManual(bool aCurrentScrollRestorationIsManual); \
  nsresult GetOriginAttributes(JSContext* cx, JS::MutableHandleValue _retval); \
  nsresult SetOriginAttributes(JS::HandleValue aAttrs, JSContext* cx); \
  nsresult GetEditingSession(nsIEditingSession **aEditingSession); \
  nsresult GetScriptableTabChild(nsITabChild **aTabChild); \
  already_AddRefed<nsITabChild> GetTabChild(void); \
  nsICommandManager * GetCommandManager(void); \
  nsresult GetTouchEventsOverride(uint32_t *aTouchEventsOverride); \
  nsresult SetTouchEventsOverride(uint32_t aTouchEventsOverride); \
  using nsIDocShell::GetIsOnlyToplevelInTabGroup; \
  nsresult GetIsOnlyToplevelInTabGroup(bool *aIsOnlyToplevelInTabGroup); \
  using nsIDocShell::GetAwaitingLargeAlloc; \
  nsresult GetAwaitingLargeAlloc(bool *aAwaitingLargeAlloc); \
  nsresult GetUseTrackingProtection(bool *aUseTrackingProtection); \
  nsresult SetUseTrackingProtection(bool aUseTrackingProtection); \
  nsresult DispatchLocationChangeEvent(void); \
  mozilla::UniquePtr<mozilla::dom::ClientSource> TakeInitialClientSource(void); \
  nsresult SetColorMatrix(float *aMatrix, uint32_t aMatrixLen); \
  nsresult GetColorMatrix(uint32_t *aMatrixLen, float **aMatrix); \
  nsresult InitSessionHistory(void); \
  nsresult GetDisplayMode(uint32_t *aDisplayMode); \
  nsresult SetDisplayMode(uint32_t aDisplayMode); \
  using nsIDocShell::GetMessageManager; \
  nsresult GetMessageManager(mozilla::dom::ContentFrameMessageManager **aMessageManager); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOCSHELL(_to) \
  NS_IMETHOD LoadURI(nsIURI *uri, nsDocShellLoadInfo* loadInfo, uint32_t aLoadFlags, bool firstParty) override { return _to LoadURI(uri, loadInfo, aLoadFlags, firstParty); } \
  NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aOriginalURI, const mozilla::Maybe<nsCOMPtr<nsIURI>> & aResultPrincipalURI, bool aKeepResultPrincipalURIIfSet, bool aLoadReplace, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aPrincipalToInherit, uint32_t aFlags, const nsAString& aWindowTarget, const char * aTypeHint, const nsAString& aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool aFirstParty, const nsAString& aSrcdoc, nsIDocShell *aSourceDocShell, nsIURI *aBaseURI, nsIDocShell **aDocShell, nsIRequest **aRequest) override { return _to InternalLoad(aURI, aOriginalURI, aResultPrincipalURI, aKeepResultPrincipalURIIfSet, aLoadReplace, aReferrer, aReferrerPolicy, aTriggeringPrincipal, aPrincipalToInherit, aFlags, aWindowTarget, aTypeHint, aFileName, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, aFirstParty, aSrcdoc, aSourceDocShell, aBaseURI, aDocShell, aRequest); } \
  NS_IMETHOD AddState(JS::HandleValue aData, const nsAString& aTitle, const nsAString& aURL, bool aReplace, JSContext* cx) override { return _to AddState(aData, aTitle, aURL, aReplace, cx); } \
  NS_IMETHOD PrepareForNewContentModel(void) override { return _to PrepareForNewContentModel(); } \
  NS_IMETHOD SetCurrentURI(nsIURI *aURI) override { return _to SetCurrentURI(aURI); } \
  NS_IMETHOD FirePageHideNotification(bool isUnload) override { return _to FirePageHideNotification(isUnload); } \
  NS_IMETHOD GetPresContext(nsPresContext * * aPresContext) override { return _to GetPresContext(aPresContext); } \
  NS_IMETHOD_(nsIPresShell *) GetPresShell(void) override { return _to GetPresShell(); } \
  NS_IMETHOD GetEldestPresShell(nsIPresShell * * aEldestPresShell) override { return _to GetEldestPresShell(aEldestPresShell); } \
  NS_IMETHOD GetContentViewer(nsIContentViewer **aContentViewer) override { return _to GetContentViewer(aContentViewer); } \
  NS_IMETHOD GetChromeEventHandler(mozilla::dom::EventTarget **aChromeEventHandler) override { return _to GetChromeEventHandler(aChromeEventHandler); } \
  NS_IMETHOD SetChromeEventHandler(mozilla::dom::EventTarget *aChromeEventHandler) override { return _to SetChromeEventHandler(aChromeEventHandler); } \
  NS_IMETHOD GetCustomUserAgent(nsAString& aCustomUserAgent) override { return _to GetCustomUserAgent(aCustomUserAgent); } \
  NS_IMETHOD SetCustomUserAgent(const nsAString& aCustomUserAgent) override { return _to SetCustomUserAgent(aCustomUserAgent); } \
  NS_IMETHOD GetCssErrorReportingEnabled(bool *aCssErrorReportingEnabled) override { return _to GetCssErrorReportingEnabled(aCssErrorReportingEnabled); } \
  NS_IMETHOD SetCssErrorReportingEnabled(bool aCssErrorReportingEnabled) override { return _to SetCssErrorReportingEnabled(aCssErrorReportingEnabled); } \
  NS_IMETHOD GetAllowPlugins(bool *aAllowPlugins) override { return _to GetAllowPlugins(aAllowPlugins); } \
  NS_IMETHOD SetAllowPlugins(bool aAllowPlugins) override { return _to SetAllowPlugins(aAllowPlugins); } \
  NS_IMETHOD GetAllowJavascript(bool *aAllowJavascript) override { return _to GetAllowJavascript(aAllowJavascript); } \
  NS_IMETHOD SetAllowJavascript(bool aAllowJavascript) override { return _to SetAllowJavascript(aAllowJavascript); } \
  NS_IMETHOD GetAllowMetaRedirects(bool *aAllowMetaRedirects) override { return _to GetAllowMetaRedirects(aAllowMetaRedirects); } \
  NS_IMETHOD SetAllowMetaRedirects(bool aAllowMetaRedirects) override { return _to SetAllowMetaRedirects(aAllowMetaRedirects); } \
  NS_IMETHOD GetAllowSubframes(bool *aAllowSubframes) override { return _to GetAllowSubframes(aAllowSubframes); } \
  NS_IMETHOD SetAllowSubframes(bool aAllowSubframes) override { return _to SetAllowSubframes(aAllowSubframes); } \
  NS_IMETHOD GetAllowImages(bool *aAllowImages) override { return _to GetAllowImages(aAllowImages); } \
  NS_IMETHOD SetAllowImages(bool aAllowImages) override { return _to SetAllowImages(aAllowImages); } \
  using nsIDocShell::GetAllowMedia; \
  NS_IMETHOD GetAllowMedia(bool *aAllowMedia) override { return _to GetAllowMedia(aAllowMedia); } \
  NS_IMETHOD SetAllowMedia(bool aAllowMedia) override { return _to SetAllowMedia(aAllowMedia); } \
  NS_IMETHOD GetAllowDNSPrefetch(bool *aAllowDNSPrefetch) override { return _to GetAllowDNSPrefetch(aAllowDNSPrefetch); } \
  NS_IMETHOD SetAllowDNSPrefetch(bool aAllowDNSPrefetch) override { return _to SetAllowDNSPrefetch(aAllowDNSPrefetch); } \
  NS_IMETHOD GetAllowWindowControl(bool *aAllowWindowControl) override { return _to GetAllowWindowControl(aAllowWindowControl); } \
  NS_IMETHOD SetAllowWindowControl(bool aAllowWindowControl) override { return _to SetAllowWindowControl(aAllowWindowControl); } \
  using nsIDocShell::GetAllowContentRetargeting; \
  NS_IMETHOD GetAllowContentRetargeting(bool *aAllowContentRetargeting) override { return _to GetAllowContentRetargeting(aAllowContentRetargeting); } \
  NS_IMETHOD SetAllowContentRetargeting(bool aAllowContentRetargeting) override { return _to SetAllowContentRetargeting(aAllowContentRetargeting); } \
  using nsIDocShell::GetAllowContentRetargetingOnChildren; \
  NS_IMETHOD GetAllowContentRetargetingOnChildren(bool *aAllowContentRetargetingOnChildren) override { return _to GetAllowContentRetargetingOnChildren(aAllowContentRetargetingOnChildren); } \
  NS_IMETHOD SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren) override { return _to SetAllowContentRetargetingOnChildren(aAllowContentRetargetingOnChildren); } \
  using nsIDocShell::GetInheritPrivateBrowsingId; \
  NS_IMETHOD GetInheritPrivateBrowsingId(bool *aInheritPrivateBrowsingId) override { return _to GetInheritPrivateBrowsingId(aInheritPrivateBrowsingId); } \
  NS_IMETHOD SetInheritPrivateBrowsingId(bool aInheritPrivateBrowsingId) override { return _to SetInheritPrivateBrowsingId(aInheritPrivateBrowsingId); } \
  NS_IMETHOD GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval) override { return _to GetDocShellEnumerator(aItemType, aDirection, _retval); } \
  NS_IMETHOD GetAppType(uint32_t *aAppType) override { return _to GetAppType(aAppType); } \
  NS_IMETHOD SetAppType(uint32_t aAppType) override { return _to SetAppType(aAppType); } \
  NS_IMETHOD GetAllowAuth(bool *aAllowAuth) override { return _to GetAllowAuth(aAllowAuth); } \
  NS_IMETHOD SetAllowAuth(bool aAllowAuth) override { return _to SetAllowAuth(aAllowAuth); } \
  NS_IMETHOD GetZoom(float *aZoom) override { return _to GetZoom(aZoom); } \
  NS_IMETHOD SetZoom(float aZoom) override { return _to SetZoom(aZoom); } \
  NS_IMETHOD GetMarginWidth(int32_t *aMarginWidth) override { return _to GetMarginWidth(aMarginWidth); } \
  NS_IMETHOD SetMarginWidth(int32_t aMarginWidth) override { return _to SetMarginWidth(aMarginWidth); } \
  NS_IMETHOD GetMarginHeight(int32_t *aMarginHeight) override { return _to GetMarginHeight(aMarginHeight); } \
  NS_IMETHOD SetMarginHeight(int32_t aMarginHeight) override { return _to SetMarginHeight(aMarginHeight); } \
  NS_IMETHOD TabToTreeOwner(bool forward, bool forDocumentNavigation, bool *_retval) override { return _to TabToTreeOwner(forward, forDocumentNavigation, _retval); } \
  NS_IMETHOD GetBusyFlags(uint32_t *aBusyFlags) override { return _to GetBusyFlags(aBusyFlags); } \
  NS_IMETHOD GetLoadType(uint32_t *aLoadType) override { return _to GetLoadType(aLoadType); } \
  NS_IMETHOD SetLoadType(uint32_t aLoadType) override { return _to SetLoadType(aLoadType); } \
  NS_IMETHOD GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags) override { return _to GetDefaultLoadFlags(aDefaultLoadFlags); } \
  NS_IMETHOD SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags) override { return _to SetDefaultLoadFlags(aDefaultLoadFlags); } \
  NS_IMETHOD IsBeingDestroyed(bool *_retval) override { return _to IsBeingDestroyed(_retval); } \
  NS_IMETHOD GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler) override { return _to GetIsExecutingOnLoadHandler(aIsExecutingOnLoadHandler); } \
  NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState) override { return _to GetLayoutHistoryState(aLayoutHistoryState); } \
  NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState) override { return _to SetLayoutHistoryState(aLayoutHistoryState); } \
  NS_IMETHOD GetShouldSaveLayoutState(bool *aShouldSaveLayoutState) override { return _to GetShouldSaveLayoutState(aShouldSaveLayoutState); } \
  NS_IMETHOD GetSecurityUI(nsISecureBrowserUI **aSecurityUI) override { return _to GetSecurityUI(aSecurityUI); } \
  NS_IMETHOD SetSecurityUI(nsISecureBrowserUI *aSecurityUI) override { return _to SetSecurityUI(aSecurityUI); } \
  NS_IMETHOD GetLoadURIDelegate(nsILoadURIDelegate **aLoadURIDelegate) override { return _to GetLoadURIDelegate(aLoadURIDelegate); } \
  NS_IMETHOD SetLoadURIDelegate(nsILoadURIDelegate *aLoadURIDelegate) override { return _to SetLoadURIDelegate(aLoadURIDelegate); } \
  NS_IMETHOD SuspendRefreshURIs(void) override { return _to SuspendRefreshURIs(); } \
  NS_IMETHOD ResumeRefreshURIs(void) override { return _to ResumeRefreshURIs(); } \
  NS_IMETHOD BeginRestore(nsIContentViewer *viewer, bool top) override { return _to BeginRestore(viewer, top); } \
  NS_IMETHOD FinishRestore(void) override { return _to FinishRestore(); } \
  NS_IMETHOD GetRestoringDocument(bool *aRestoringDocument) override { return _to GetRestoringDocument(aRestoringDocument); } \
  NS_IMETHOD GetUseErrorPages(bool *aUseErrorPages) override { return _to GetUseErrorPages(aUseErrorPages); } \
  NS_IMETHOD SetUseErrorPages(bool aUseErrorPages) override { return _to SetUseErrorPages(aUseErrorPages); } \
  NS_IMETHOD DisplayLoadError(nsresult aError, nsIURI *aURI, const char16_t * aURL, nsIChannel *aFailedChannel, bool *_retval) override { return _to DisplayLoadError(aError, aURI, aURL, aFailedChannel, _retval); } \
  NS_IMETHOD GetFailedChannel(nsIChannel **aFailedChannel) override { return _to GetFailedChannel(aFailedChannel); } \
  NS_IMETHOD GetPreviousTransIndex(int32_t *aPreviousTransIndex) override { return _to GetPreviousTransIndex(aPreviousTransIndex); } \
  NS_IMETHOD GetLoadedTransIndex(int32_t *aLoadedTransIndex) override { return _to GetLoadedTransIndex(aLoadedTransIndex); } \
  NS_IMETHOD HistoryPurged(int32_t numEntries) override { return _to HistoryPurged(numEntries); } \
  NS_IMETHOD GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel) override { return _to GetCurrentDocumentChannel(aCurrentDocumentChannel); } \
  NS_IMETHOD GetChildOffset(int32_t *aChildOffset) override { return _to GetChildOffset(aChildOffset); } \
  NS_IMETHOD SetChildOffset(int32_t aChildOffset) override { return _to SetChildOffset(aChildOffset); } \
  NS_IMETHOD GetIsInUnload(bool *aIsInUnload) override { return _to GetIsInUnload(aIsInUnload); } \
  using nsIDocShell::GetHasMixedActiveContentLoaded; \
  NS_IMETHOD GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded) override { return _to GetHasMixedActiveContentLoaded(aHasMixedActiveContentLoaded); } \
  using nsIDocShell::GetHasMixedActiveContentBlocked; \
  NS_IMETHOD GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked) override { return _to GetHasMixedActiveContentBlocked(aHasMixedActiveContentBlocked); } \
  using nsIDocShell::GetHasMixedDisplayContentLoaded; \
  NS_IMETHOD GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded) override { return _to GetHasMixedDisplayContentLoaded(aHasMixedDisplayContentLoaded); } \
  using nsIDocShell::GetHasMixedDisplayContentBlocked; \
  NS_IMETHOD GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked) override { return _to GetHasMixedDisplayContentBlocked(aHasMixedDisplayContentBlocked); } \
  using nsIDocShell::GetHasTrackingContentBlocked; \
  NS_IMETHOD GetHasTrackingContentBlocked(bool *aHasTrackingContentBlocked) override { return _to GetHasTrackingContentBlocked(aHasTrackingContentBlocked); } \
  using nsIDocShell::GetHasTrackingContentLoaded; \
  NS_IMETHOD GetHasTrackingContentLoaded(bool *aHasTrackingContentLoaded) override { return _to GetHasTrackingContentLoaded(aHasTrackingContentLoaded); } \
  NS_IMETHOD_(void) DetachEditorFromWindow(void) override { return _to DetachEditorFromWindow(); } \
  NS_IMETHOD GetIsOffScreenBrowser(bool *aIsOffScreenBrowser) override { return _to GetIsOffScreenBrowser(aIsOffScreenBrowser); } \
  NS_IMETHOD SetIsOffScreenBrowser(bool aIsOffScreenBrowser) override { return _to SetIsOffScreenBrowser(aIsOffScreenBrowser); } \
  NS_IMETHOD SetIsPrinting(bool aIsPrinting) override { return _to SetIsPrinting(aIsPrinting); } \
  NS_IMETHOD GetPrintPreview(nsIWebBrowserPrint **aPrintPreview) override { return _to GetPrintPreview(aPrintPreview); } \
  using nsIDocShell::GetCanExecuteScripts; \
  NS_IMETHOD GetCanExecuteScripts(bool *aCanExecuteScripts) override { return _to GetCanExecuteScripts(aCanExecuteScripts); } \
  NS_IMETHOD GetIsActive(bool *aIsActive) override { return _to GetIsActive(aIsActive); } \
  NS_IMETHOD SetIsActive(bool aIsActive) override { return _to SetIsActive(aIsActive); } \
  NS_IMETHOD GetHistoryID(nsID * * aHistoryID) override { return _to GetHistoryID(aHistoryID); } \
  NS_IMETHOD_(const nsID) HistoryID(void) override { return _to HistoryID(); } \
  NS_IMETHOD GetIsAppTab(bool *aIsAppTab) override { return _to GetIsAppTab(aIsAppTab); } \
  NS_IMETHOD SetIsAppTab(bool aIsAppTab) override { return _to SetIsAppTab(aIsAppTab); } \
  NS_IMETHOD CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) override { return _to CreateAboutBlankContentViewer(aPrincipal); } \
  NS_IMETHOD ForceCreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) override { return _to ForceCreateAboutBlankContentViewer(aPrincipal); } \
  NS_IMETHOD GetCharset(nsACString& aCharset) override { return _to GetCharset(aCharset); } \
  NS_IMETHOD SetCharset(const nsACString& aCharset) override { return _to SetCharset(aCharset); } \
  NS_IMETHOD GatherCharsetMenuTelemetry(void) override { return _to GatherCharsetMenuTelemetry(); } \
  NS_IMETHOD GetForcedCharset(nsACString& aForcedCharset) override { return _to GetForcedCharset(aForcedCharset); } \
  NS_IMETHOD SetForcedCharset(const nsACString& aForcedCharset) override { return _to SetForcedCharset(aForcedCharset); } \
  virtual void SetParentCharset(const mozilla::Encoding* & parentCharset, int32_t parentCharsetSource, nsIPrincipal *parentCharsetPrincipal) override { return _to SetParentCharset(parentCharset, parentCharsetSource, parentCharsetPrincipal); } \
  virtual void GetParentCharset(const mozilla::Encoding* & parentCharset, int32_t *parentCharsetSource, nsIPrincipal **parentCharsetPrincipal) override { return _to GetParentCharset(parentCharset, parentCharsetSource, parentCharsetPrincipal); } \
  using nsIDocShell::GetRecordProfileTimelineMarkers; \
  NS_IMETHOD GetRecordProfileTimelineMarkers(bool *aRecordProfileTimelineMarkers) override { return _to GetRecordProfileTimelineMarkers(aRecordProfileTimelineMarkers); } \
  NS_IMETHOD SetRecordProfileTimelineMarkers(bool aRecordProfileTimelineMarkers) override { return _to SetRecordProfileTimelineMarkers(aRecordProfileTimelineMarkers); } \
  NS_IMETHOD Now(DOMHighResTimeStamp *_retval) override { return _to Now(_retval); } \
  NS_IMETHOD PopProfileTimelineMarkers(JSContext* cx, JS::MutableHandleValue _retval) override { return _to PopProfileTimelineMarkers(cx, _retval); } \
  NS_IMETHOD AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs) override { return _to AddWeakPrivacyTransitionObserver(obs); } \
  NS_IMETHOD AddWeakReflowObserver(nsIReflowObserver *obs) override { return _to AddWeakReflowObserver(obs); } \
  NS_IMETHOD RemoveWeakReflowObserver(nsIReflowObserver *obs) override { return _to RemoveWeakReflowObserver(obs); } \
  NS_IMETHOD NotifyReflowObservers(bool interruptible, DOMHighResTimeStamp start, DOMHighResTimeStamp end) override { return _to NotifyReflowObservers(interruptible, start, end); } \
  NS_IMETHOD AddWeakScrollObserver(nsIScrollObserver *obs) override { return _to AddWeakScrollObserver(obs); } \
  NS_IMETHOD RemoveWeakScrollObserver(nsIScrollObserver *obs) override { return _to RemoveWeakScrollObserver(obs); } \
  NS_IMETHOD NotifyScrollObservers(void) override { return _to NotifyScrollObservers(); } \
  using nsIDocShell::GetFrameType; \
  NS_IMETHOD GetFrameType(uint32_t *aFrameType) override { return _to GetFrameType(aFrameType); } \
  NS_IMETHOD SetFrameType(uint32_t aFrameType) override { return _to SetFrameType(aFrameType); } \
  using nsIDocShell::GetIsMozBrowser; \
  NS_IMETHOD GetIsMozBrowser(bool *aIsMozBrowser) override { return _to GetIsMozBrowser(aIsMozBrowser); } \
  using nsIDocShell::GetIsIsolatedMozBrowserElement; \
  NS_IMETHOD GetIsIsolatedMozBrowserElement(bool *aIsIsolatedMozBrowserElement) override { return _to GetIsIsolatedMozBrowserElement(aIsIsolatedMozBrowserElement); } \
  using nsIDocShell::GetIsInIsolatedMozBrowserElement; \
  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool *aIsInIsolatedMozBrowserElement) override { return _to GetIsInIsolatedMozBrowserElement(aIsInIsolatedMozBrowserElement); } \
  using nsIDocShell::GetIsInMozBrowser; \
  NS_IMETHOD GetIsInMozBrowser(bool *aIsInMozBrowser) override { return _to GetIsInMozBrowser(aIsInMozBrowser); } \
  using nsIDocShell::GetIsTopLevelContentDocShell; \
  NS_IMETHOD GetIsTopLevelContentDocShell(bool *aIsTopLevelContentDocShell) override { return _to GetIsTopLevelContentDocShell(aIsTopLevelContentDocShell); } \
  NS_IMETHOD GetSameTypeParentIgnoreBrowserBoundaries(nsIDocShell **_retval) override { return _to GetSameTypeParentIgnoreBrowserBoundaries(_retval); } \
  NS_IMETHOD GetSameTypeRootTreeItemIgnoreBrowserBoundaries(nsIDocShell **_retval) override { return _to GetSameTypeRootTreeItemIgnoreBrowserBoundaries(_retval); } \
  NS_IMETHOD GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled) override { return _to GetAsyncPanZoomEnabled(aAsyncPanZoomEnabled); } \
  NS_IMETHOD GetSandboxFlags(uint32_t *aSandboxFlags) override { return _to GetSandboxFlags(aSandboxFlags); } \
  NS_IMETHOD SetSandboxFlags(uint32_t aSandboxFlags) override { return _to SetSandboxFlags(aSandboxFlags); } \
  NS_IMETHOD GetOnePermittedSandboxedNavigator(nsIDocShell **aOnePermittedSandboxedNavigator) override { return _to GetOnePermittedSandboxedNavigator(aOnePermittedSandboxedNavigator); } \
  NS_IMETHOD SetOnePermittedSandboxedNavigator(nsIDocShell *aOnePermittedSandboxedNavigator) override { return _to SetOnePermittedSandboxedNavigator(aOnePermittedSandboxedNavigator); } \
  virtual bool IsSandboxedFrom(nsIDocShell *aTargetDocShell) override { return _to IsSandboxedFrom(aTargetDocShell); } \
  NS_IMETHOD GetMixedContentChannel(nsIChannel **aMixedContentChannel) override { return _to GetMixedContentChannel(aMixedContentChannel); } \
  NS_IMETHOD SetMixedContentChannel(nsIChannel *aMixedContentChannel) override { return _to SetMixedContentChannel(aMixedContentChannel); } \
  NS_IMETHOD GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell) override { return _to GetAllowMixedContentAndConnectionData(rootHasSecureConnection, allowMixedContent, isRootDocShell); } \
  NS_IMETHOD_(bool) PluginsAllowedInCurrentDoc(void) override { return _to PluginsAllowedInCurrentDoc(); } \
  using nsIDocShell::GetFullscreenAllowed; \
  NS_IMETHOD GetFullscreenAllowed(bool *aFullscreenAllowed) override { return _to GetFullscreenAllowed(aFullscreenAllowed); } \
  NS_IMETHOD SetFullscreenAllowed(bool allowed) override { return _to SetFullscreenAllowed(allowed); } \
  NS_IMETHOD_(uint32_t) OrientationLock(void) override { return _to OrientationLock(); } \
  NS_IMETHOD_(void) SetOrientationLock(uint32_t orientationLock) override { return _to SetOrientationLock(orientationLock); } \
  using nsIDocShell::GetAffectPrivateSessionLifetime; \
  NS_IMETHOD GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime) override { return _to GetAffectPrivateSessionLifetime(aAffectPrivateSessionLifetime); } \
  NS_IMETHOD SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime) override { return _to SetAffectPrivateSessionLifetime(aAffectPrivateSessionLifetime); } \
  using nsIDocShell::GetMayEnableCharacterEncodingMenu; \
  NS_IMETHOD GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu) override { return _to GetMayEnableCharacterEncodingMenu(aMayEnableCharacterEncodingMenu); } \
  NS_IMETHOD GetEditor(nsIEditor **aEditor) override { return _to GetEditor(aEditor); } \
  NS_IMETHOD SetEditor(nsIEditor *aEditor) override { return _to SetEditor(aEditor); } \
  NS_IMETHOD GetEditable(bool *aEditable) override { return _to GetEditable(aEditable); } \
  NS_IMETHOD GetHasEditingSession(bool *aHasEditingSession) override { return _to GetHasEditingSession(aHasEditingSession); } \
  NS_IMETHOD MakeEditable(bool inWaitForUriLoad) override { return _to MakeEditable(inWaitForUriLoad); } \
  NS_IMETHOD GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval) override { return _to GetChildSHEntry(aChildOffset, _retval); } \
  NS_IMETHOD AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChilden) override { return _to AddChildSHEntry(aCloneReference, aHistoryEntry, aChildOffset, aLoadType, aCloneChilden); } \
  NS_IMETHOD GetUseGlobalHistory(bool *aUseGlobalHistory) override { return _to GetUseGlobalHistory(aUseGlobalHistory); } \
  NS_IMETHOD SetUseGlobalHistory(bool aUseGlobalHistory) override { return _to SetUseGlobalHistory(aUseGlobalHistory); } \
  NS_IMETHOD RemoveFromSessionHistory(void) override { return _to RemoveFromSessionHistory(); } \
  using nsIDocShell::GetCreatedDynamically; \
  NS_IMETHOD GetCreatedDynamically(bool *aCreatedDynamically) override { return _to GetCreatedDynamically(aCreatedDynamically); } \
  NS_IMETHOD SetCreatedDynamically(bool aCreatedDynamically) override { return _to SetCreatedDynamically(aCreatedDynamically); } \
  NS_IMETHOD GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval) override { return _to GetCurrentSHEntry(aEntry, _retval); } \
  NS_IMETHOD IsCommandEnabled(const char * command, bool *_retval) override { return _to IsCommandEnabled(command, _retval); } \
  NS_IMETHOD DoCommand(const char * command) override { return _to DoCommand(command); } \
  NS_IMETHOD DoCommandWithParams(const char * command, nsICommandParams *aParams) override { return _to DoCommandWithParams(command, aParams); } \
  NS_IMETHOD_(bool) IsInvisible(void) override { return _to IsInvisible(); } \
  NS_IMETHOD_(void) SetInvisible(bool aIsInvisibleDochsell) override { return _to SetInvisible(aIsInvisibleDochsell); } \
  virtual nsIScriptGlobalObject * GetScriptGlobalObject(void) override { return _to GetScriptGlobalObject(); } \
  using nsIDocShell::GetDeviceSizeIsPageSize; \
  NS_IMETHOD GetDeviceSizeIsPageSize(bool *aDeviceSizeIsPageSize) override { return _to GetDeviceSizeIsPageSize(aDeviceSizeIsPageSize); } \
  NS_IMETHOD SetDeviceSizeIsPageSize(bool aDeviceSizeIsPageSize) override { return _to SetDeviceSizeIsPageSize(aDeviceSizeIsPageSize); } \
  virtual void SetOpener(nsITabParent *aOpener) override { return _to SetOpener(aOpener); } \
  virtual nsITabParent * GetOpener(void) override { return _to GetOpener(); } \
  virtual void NotifyJSRunToCompletionStart(const char * aReason, const char16_t * functionName, const char16_t * fileName, uint32_t lineNumber, JS::HandleValue asyncStack, const char * asyncCause) override { return _to NotifyJSRunToCompletionStart(aReason, functionName, fileName, lineNumber, asyncStack, asyncCause); } \
  virtual void NotifyJSRunToCompletionStop(void) override { return _to NotifyJSRunToCompletionStop(); } \
  using nsIDocShell::GetHasLoadedNonBlankURI; \
  NS_IMETHOD GetHasLoadedNonBlankURI(bool *aHasLoadedNonBlankURI) override { return _to GetHasLoadedNonBlankURI(aHasLoadedNonBlankURI); } \
  NS_IMETHOD GetWindowDraggingAllowed(bool *aWindowDraggingAllowed) override { return _to GetWindowDraggingAllowed(aWindowDraggingAllowed); } \
  NS_IMETHOD SetWindowDraggingAllowed(bool aWindowDraggingAllowed) override { return _to SetWindowDraggingAllowed(aWindowDraggingAllowed); } \
  NS_IMETHOD GetCurrentScrollRestorationIsManual(bool *aCurrentScrollRestorationIsManual) override { return _to GetCurrentScrollRestorationIsManual(aCurrentScrollRestorationIsManual); } \
  NS_IMETHOD SetCurrentScrollRestorationIsManual(bool aCurrentScrollRestorationIsManual) override { return _to SetCurrentScrollRestorationIsManual(aCurrentScrollRestorationIsManual); } \
  NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue _retval) override { return _to GetOriginAttributes(cx, _retval); } \
  NS_IMETHOD SetOriginAttributes(JS::HandleValue aAttrs, JSContext* cx) override { return _to SetOriginAttributes(aAttrs, cx); } \
  NS_IMETHOD GetEditingSession(nsIEditingSession **aEditingSession) override { return _to GetEditingSession(aEditingSession); } \
  NS_IMETHOD GetScriptableTabChild(nsITabChild **aTabChild) override { return _to GetScriptableTabChild(aTabChild); } \
  virtual already_AddRefed<nsITabChild> GetTabChild(void) override { return _to GetTabChild(); } \
  virtual nsICommandManager * GetCommandManager(void) override { return _to GetCommandManager(); } \
  NS_IMETHOD GetTouchEventsOverride(uint32_t *aTouchEventsOverride) override { return _to GetTouchEventsOverride(aTouchEventsOverride); } \
  NS_IMETHOD SetTouchEventsOverride(uint32_t aTouchEventsOverride) override { return _to SetTouchEventsOverride(aTouchEventsOverride); } \
  using nsIDocShell::GetIsOnlyToplevelInTabGroup; \
  NS_IMETHOD GetIsOnlyToplevelInTabGroup(bool *aIsOnlyToplevelInTabGroup) override { return _to GetIsOnlyToplevelInTabGroup(aIsOnlyToplevelInTabGroup); } \
  using nsIDocShell::GetAwaitingLargeAlloc; \
  NS_IMETHOD GetAwaitingLargeAlloc(bool *aAwaitingLargeAlloc) override { return _to GetAwaitingLargeAlloc(aAwaitingLargeAlloc); } \
  NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) override { return _to GetUseTrackingProtection(aUseTrackingProtection); } \
  NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) override { return _to SetUseTrackingProtection(aUseTrackingProtection); } \
  NS_IMETHOD DispatchLocationChangeEvent(void) override { return _to DispatchLocationChangeEvent(); } \
  virtual mozilla::UniquePtr<mozilla::dom::ClientSource> TakeInitialClientSource(void) override { return _to TakeInitialClientSource(); } \
  NS_IMETHOD SetColorMatrix(float *aMatrix, uint32_t aMatrixLen) override { return _to SetColorMatrix(aMatrix, aMatrixLen); } \
  NS_IMETHOD GetColorMatrix(uint32_t *aMatrixLen, float **aMatrix) override { return _to GetColorMatrix(aMatrixLen, aMatrix); } \
  NS_IMETHOD InitSessionHistory(void) override { return _to InitSessionHistory(); } \
  NS_IMETHOD GetDisplayMode(uint32_t *aDisplayMode) override { return _to GetDisplayMode(aDisplayMode); } \
  NS_IMETHOD SetDisplayMode(uint32_t aDisplayMode) override { return _to SetDisplayMode(aDisplayMode); } \
  using nsIDocShell::GetMessageManager; \
  NS_IMETHOD GetMessageManager(mozilla::dom::ContentFrameMessageManager **aMessageManager) override { return _to GetMessageManager(aMessageManager); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOCSHELL(_to) \
  NS_IMETHOD LoadURI(nsIURI *uri, nsDocShellLoadInfo* loadInfo, uint32_t aLoadFlags, bool firstParty) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURI(uri, loadInfo, aLoadFlags, firstParty); } \
  NS_IMETHOD InternalLoad(nsIURI *aURI, nsIURI *aOriginalURI, const mozilla::Maybe<nsCOMPtr<nsIURI>> & aResultPrincipalURI, bool aKeepResultPrincipalURIIfSet, bool aLoadReplace, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIPrincipal *aTriggeringPrincipal, nsIPrincipal *aPrincipalToInherit, uint32_t aFlags, const nsAString& aWindowTarget, const char * aTypeHint, const nsAString& aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool aFirstParty, const nsAString& aSrcdoc, nsIDocShell *aSourceDocShell, nsIURI *aBaseURI, nsIDocShell **aDocShell, nsIRequest **aRequest) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InternalLoad(aURI, aOriginalURI, aResultPrincipalURI, aKeepResultPrincipalURIIfSet, aLoadReplace, aReferrer, aReferrerPolicy, aTriggeringPrincipal, aPrincipalToInherit, aFlags, aWindowTarget, aTypeHint, aFileName, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, aFirstParty, aSrcdoc, aSourceDocShell, aBaseURI, aDocShell, aRequest); } \
  NS_IMETHOD AddState(JS::HandleValue aData, const nsAString& aTitle, const nsAString& aURL, bool aReplace, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddState(aData, aTitle, aURL, aReplace, cx); } \
  NS_IMETHOD PrepareForNewContentModel(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PrepareForNewContentModel(); } \
  NS_IMETHOD SetCurrentURI(nsIURI *aURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentURI(aURI); } \
  NS_IMETHOD FirePageHideNotification(bool isUnload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FirePageHideNotification(isUnload); } \
  NS_IMETHOD GetPresContext(nsPresContext * * aPresContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPresContext(aPresContext); } \
  NS_IMETHOD_(nsIPresShell *) GetPresShell(void) override; \
  NS_IMETHOD GetEldestPresShell(nsIPresShell * * aEldestPresShell) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEldestPresShell(aEldestPresShell); } \
  NS_IMETHOD GetContentViewer(nsIContentViewer **aContentViewer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentViewer(aContentViewer); } \
  NS_IMETHOD GetChromeEventHandler(mozilla::dom::EventTarget **aChromeEventHandler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeEventHandler(aChromeEventHandler); } \
  NS_IMETHOD SetChromeEventHandler(mozilla::dom::EventTarget *aChromeEventHandler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChromeEventHandler(aChromeEventHandler); } \
  NS_IMETHOD GetCustomUserAgent(nsAString& aCustomUserAgent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCustomUserAgent(aCustomUserAgent); } \
  NS_IMETHOD SetCustomUserAgent(const nsAString& aCustomUserAgent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCustomUserAgent(aCustomUserAgent); } \
  NS_IMETHOD GetCssErrorReportingEnabled(bool *aCssErrorReportingEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCssErrorReportingEnabled(aCssErrorReportingEnabled); } \
  NS_IMETHOD SetCssErrorReportingEnabled(bool aCssErrorReportingEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCssErrorReportingEnabled(aCssErrorReportingEnabled); } \
  NS_IMETHOD GetAllowPlugins(bool *aAllowPlugins) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowPlugins(aAllowPlugins); } \
  NS_IMETHOD SetAllowPlugins(bool aAllowPlugins) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowPlugins(aAllowPlugins); } \
  NS_IMETHOD GetAllowJavascript(bool *aAllowJavascript) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowJavascript(aAllowJavascript); } \
  NS_IMETHOD SetAllowJavascript(bool aAllowJavascript) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowJavascript(aAllowJavascript); } \
  NS_IMETHOD GetAllowMetaRedirects(bool *aAllowMetaRedirects) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowMetaRedirects(aAllowMetaRedirects); } \
  NS_IMETHOD SetAllowMetaRedirects(bool aAllowMetaRedirects) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowMetaRedirects(aAllowMetaRedirects); } \
  NS_IMETHOD GetAllowSubframes(bool *aAllowSubframes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowSubframes(aAllowSubframes); } \
  NS_IMETHOD SetAllowSubframes(bool aAllowSubframes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowSubframes(aAllowSubframes); } \
  NS_IMETHOD GetAllowImages(bool *aAllowImages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowImages(aAllowImages); } \
  NS_IMETHOD SetAllowImages(bool aAllowImages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowImages(aAllowImages); } \
  NS_IMETHOD GetAllowMedia(bool *aAllowMedia) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowMedia(aAllowMedia); } \
  NS_IMETHOD SetAllowMedia(bool aAllowMedia) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowMedia(aAllowMedia); } \
  NS_IMETHOD GetAllowDNSPrefetch(bool *aAllowDNSPrefetch) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowDNSPrefetch(aAllowDNSPrefetch); } \
  NS_IMETHOD SetAllowDNSPrefetch(bool aAllowDNSPrefetch) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowDNSPrefetch(aAllowDNSPrefetch); } \
  NS_IMETHOD GetAllowWindowControl(bool *aAllowWindowControl) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowWindowControl(aAllowWindowControl); } \
  NS_IMETHOD SetAllowWindowControl(bool aAllowWindowControl) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowWindowControl(aAllowWindowControl); } \
  NS_IMETHOD GetAllowContentRetargeting(bool *aAllowContentRetargeting) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowContentRetargeting(aAllowContentRetargeting); } \
  NS_IMETHOD SetAllowContentRetargeting(bool aAllowContentRetargeting) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowContentRetargeting(aAllowContentRetargeting); } \
  NS_IMETHOD GetAllowContentRetargetingOnChildren(bool *aAllowContentRetargetingOnChildren) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowContentRetargetingOnChildren(aAllowContentRetargetingOnChildren); } \
  NS_IMETHOD SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowContentRetargetingOnChildren(aAllowContentRetargetingOnChildren); } \
  NS_IMETHOD GetInheritPrivateBrowsingId(bool *aInheritPrivateBrowsingId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInheritPrivateBrowsingId(aInheritPrivateBrowsingId); } \
  NS_IMETHOD SetInheritPrivateBrowsingId(bool aInheritPrivateBrowsingId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetInheritPrivateBrowsingId(aInheritPrivateBrowsingId); } \
  NS_IMETHOD GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocShellEnumerator(aItemType, aDirection, _retval); } \
  NS_IMETHOD GetAppType(uint32_t *aAppType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppType(aAppType); } \
  NS_IMETHOD SetAppType(uint32_t aAppType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAppType(aAppType); } \
  NS_IMETHOD GetAllowAuth(bool *aAllowAuth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowAuth(aAllowAuth); } \
  NS_IMETHOD SetAllowAuth(bool aAllowAuth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowAuth(aAllowAuth); } \
  NS_IMETHOD GetZoom(float *aZoom) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetZoom(aZoom); } \
  NS_IMETHOD SetZoom(float aZoom) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetZoom(aZoom); } \
  NS_IMETHOD GetMarginWidth(int32_t *aMarginWidth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginWidth(aMarginWidth); } \
  NS_IMETHOD SetMarginWidth(int32_t aMarginWidth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginWidth(aMarginWidth); } \
  NS_IMETHOD GetMarginHeight(int32_t *aMarginHeight) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMarginHeight(aMarginHeight); } \
  NS_IMETHOD SetMarginHeight(int32_t aMarginHeight) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMarginHeight(aMarginHeight); } \
  NS_IMETHOD TabToTreeOwner(bool forward, bool forDocumentNavigation, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TabToTreeOwner(forward, forDocumentNavigation, _retval); } \
  NS_IMETHOD GetBusyFlags(uint32_t *aBusyFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBusyFlags(aBusyFlags); } \
  NS_IMETHOD GetLoadType(uint32_t *aLoadType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadType(aLoadType); } \
  NS_IMETHOD SetLoadType(uint32_t aLoadType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadType(aLoadType); } \
  NS_IMETHOD GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultLoadFlags(aDefaultLoadFlags); } \
  NS_IMETHOD SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultLoadFlags(aDefaultLoadFlags); } \
  NS_IMETHOD IsBeingDestroyed(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsBeingDestroyed(_retval); } \
  NS_IMETHOD GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsExecutingOnLoadHandler(aIsExecutingOnLoadHandler); } \
  NS_IMETHOD GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLayoutHistoryState(aLayoutHistoryState); } \
  NS_IMETHOD SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLayoutHistoryState(aLayoutHistoryState); } \
  NS_IMETHOD GetShouldSaveLayoutState(bool *aShouldSaveLayoutState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShouldSaveLayoutState(aShouldSaveLayoutState); } \
  NS_IMETHOD GetSecurityUI(nsISecureBrowserUI **aSecurityUI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityUI(aSecurityUI); } \
  NS_IMETHOD SetSecurityUI(nsISecureBrowserUI *aSecurityUI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecurityUI(aSecurityUI); } \
  NS_IMETHOD GetLoadURIDelegate(nsILoadURIDelegate **aLoadURIDelegate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadURIDelegate(aLoadURIDelegate); } \
  NS_IMETHOD SetLoadURIDelegate(nsILoadURIDelegate *aLoadURIDelegate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadURIDelegate(aLoadURIDelegate); } \
  NS_IMETHOD SuspendRefreshURIs(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SuspendRefreshURIs(); } \
  NS_IMETHOD ResumeRefreshURIs(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResumeRefreshURIs(); } \
  NS_IMETHOD BeginRestore(nsIContentViewer *viewer, bool top) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginRestore(viewer, top); } \
  NS_IMETHOD FinishRestore(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishRestore(); } \
  NS_IMETHOD GetRestoringDocument(bool *aRestoringDocument) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRestoringDocument(aRestoringDocument); } \
  NS_IMETHOD GetUseErrorPages(bool *aUseErrorPages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseErrorPages(aUseErrorPages); } \
  NS_IMETHOD SetUseErrorPages(bool aUseErrorPages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseErrorPages(aUseErrorPages); } \
  NS_IMETHOD DisplayLoadError(nsresult aError, nsIURI *aURI, const char16_t * aURL, nsIChannel *aFailedChannel, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DisplayLoadError(aError, aURI, aURL, aFailedChannel, _retval); } \
  NS_IMETHOD GetFailedChannel(nsIChannel **aFailedChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailedChannel(aFailedChannel); } \
  NS_IMETHOD GetPreviousTransIndex(int32_t *aPreviousTransIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreviousTransIndex(aPreviousTransIndex); } \
  NS_IMETHOD GetLoadedTransIndex(int32_t *aLoadedTransIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadedTransIndex(aLoadedTransIndex); } \
  NS_IMETHOD HistoryPurged(int32_t numEntries) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HistoryPurged(numEntries); } \
  NS_IMETHOD GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentDocumentChannel(aCurrentDocumentChannel); } \
  NS_IMETHOD GetChildOffset(int32_t *aChildOffset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildOffset(aChildOffset); } \
  NS_IMETHOD SetChildOffset(int32_t aChildOffset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChildOffset(aChildOffset); } \
  NS_IMETHOD GetIsInUnload(bool *aIsInUnload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsInUnload(aIsInUnload); } \
  NS_IMETHOD GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasMixedActiveContentLoaded(aHasMixedActiveContentLoaded); } \
  NS_IMETHOD GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasMixedActiveContentBlocked(aHasMixedActiveContentBlocked); } \
  NS_IMETHOD GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasMixedDisplayContentLoaded(aHasMixedDisplayContentLoaded); } \
  NS_IMETHOD GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasMixedDisplayContentBlocked(aHasMixedDisplayContentBlocked); } \
  NS_IMETHOD GetHasTrackingContentBlocked(bool *aHasTrackingContentBlocked) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasTrackingContentBlocked(aHasTrackingContentBlocked); } \
  NS_IMETHOD GetHasTrackingContentLoaded(bool *aHasTrackingContentLoaded) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasTrackingContentLoaded(aHasTrackingContentLoaded); } \
  NS_IMETHOD_(void) DetachEditorFromWindow(void) override; \
  NS_IMETHOD GetIsOffScreenBrowser(bool *aIsOffScreenBrowser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsOffScreenBrowser(aIsOffScreenBrowser); } \
  NS_IMETHOD SetIsOffScreenBrowser(bool aIsOffScreenBrowser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsOffScreenBrowser(aIsOffScreenBrowser); } \
  NS_IMETHOD SetIsPrinting(bool aIsPrinting) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsPrinting(aIsPrinting); } \
  NS_IMETHOD GetPrintPreview(nsIWebBrowserPrint **aPrintPreview) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrintPreview(aPrintPreview); } \
  NS_IMETHOD GetCanExecuteScripts(bool *aCanExecuteScripts) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanExecuteScripts(aCanExecuteScripts); } \
  NS_IMETHOD GetIsActive(bool *aIsActive) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsActive(aIsActive); } \
  NS_IMETHOD SetIsActive(bool aIsActive) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsActive(aIsActive); } \
  NS_IMETHOD GetHistoryID(nsID * * aHistoryID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHistoryID(aHistoryID); } \
  NS_IMETHOD_(const nsID) HistoryID(void) override; \
  NS_IMETHOD GetIsAppTab(bool *aIsAppTab) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsAppTab(aIsAppTab); } \
  NS_IMETHOD SetIsAppTab(bool aIsAppTab) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsAppTab(aIsAppTab); } \
  NS_IMETHOD CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAboutBlankContentViewer(aPrincipal); } \
  NS_IMETHOD ForceCreateAboutBlankContentViewer(nsIPrincipal *aPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceCreateAboutBlankContentViewer(aPrincipal); } \
  NS_IMETHOD GetCharset(nsACString& aCharset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCharset(aCharset); } \
  NS_IMETHOD SetCharset(const nsACString& aCharset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCharset(aCharset); } \
  NS_IMETHOD GatherCharsetMenuTelemetry(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GatherCharsetMenuTelemetry(); } \
  NS_IMETHOD GetForcedCharset(nsACString& aForcedCharset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetForcedCharset(aForcedCharset); } \
  NS_IMETHOD SetForcedCharset(const nsACString& aForcedCharset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetForcedCharset(aForcedCharset); } \
  virtual void SetParentCharset(const mozilla::Encoding* & parentCharset, int32_t parentCharsetSource, nsIPrincipal *parentCharsetPrincipal) override; \
  virtual void GetParentCharset(const mozilla::Encoding* & parentCharset, int32_t *parentCharsetSource, nsIPrincipal **parentCharsetPrincipal) override; \
  NS_IMETHOD GetRecordProfileTimelineMarkers(bool *aRecordProfileTimelineMarkers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRecordProfileTimelineMarkers(aRecordProfileTimelineMarkers); } \
  NS_IMETHOD SetRecordProfileTimelineMarkers(bool aRecordProfileTimelineMarkers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRecordProfileTimelineMarkers(aRecordProfileTimelineMarkers); } \
  NS_IMETHOD Now(DOMHighResTimeStamp *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Now(_retval); } \
  NS_IMETHOD PopProfileTimelineMarkers(JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PopProfileTimelineMarkers(cx, _retval); } \
  NS_IMETHOD AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWeakPrivacyTransitionObserver(obs); } \
  NS_IMETHOD AddWeakReflowObserver(nsIReflowObserver *obs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWeakReflowObserver(obs); } \
  NS_IMETHOD RemoveWeakReflowObserver(nsIReflowObserver *obs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWeakReflowObserver(obs); } \
  NS_IMETHOD NotifyReflowObservers(bool interruptible, DOMHighResTimeStamp start, DOMHighResTimeStamp end) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyReflowObservers(interruptible, start, end); } \
  NS_IMETHOD AddWeakScrollObserver(nsIScrollObserver *obs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWeakScrollObserver(obs); } \
  NS_IMETHOD RemoveWeakScrollObserver(nsIScrollObserver *obs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWeakScrollObserver(obs); } \
  NS_IMETHOD NotifyScrollObservers(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyScrollObservers(); } \
  NS_IMETHOD GetFrameType(uint32_t *aFrameType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrameType(aFrameType); } \
  NS_IMETHOD SetFrameType(uint32_t aFrameType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFrameType(aFrameType); } \
  NS_IMETHOD GetIsMozBrowser(bool *aIsMozBrowser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMozBrowser(aIsMozBrowser); } \
  NS_IMETHOD GetIsIsolatedMozBrowserElement(bool *aIsIsolatedMozBrowserElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsIsolatedMozBrowserElement(aIsIsolatedMozBrowserElement); } \
  NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool *aIsInIsolatedMozBrowserElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsInIsolatedMozBrowserElement(aIsInIsolatedMozBrowserElement); } \
  NS_IMETHOD GetIsInMozBrowser(bool *aIsInMozBrowser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsInMozBrowser(aIsInMozBrowser); } \
  NS_IMETHOD GetIsTopLevelContentDocShell(bool *aIsTopLevelContentDocShell) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsTopLevelContentDocShell(aIsTopLevelContentDocShell); } \
  NS_IMETHOD GetSameTypeParentIgnoreBrowserBoundaries(nsIDocShell **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSameTypeParentIgnoreBrowserBoundaries(_retval); } \
  NS_IMETHOD GetSameTypeRootTreeItemIgnoreBrowserBoundaries(nsIDocShell **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSameTypeRootTreeItemIgnoreBrowserBoundaries(_retval); } \
  NS_IMETHOD GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsyncPanZoomEnabled(aAsyncPanZoomEnabled); } \
  NS_IMETHOD GetSandboxFlags(uint32_t *aSandboxFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSandboxFlags(aSandboxFlags); } \
  NS_IMETHOD SetSandboxFlags(uint32_t aSandboxFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSandboxFlags(aSandboxFlags); } \
  NS_IMETHOD GetOnePermittedSandboxedNavigator(nsIDocShell **aOnePermittedSandboxedNavigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnePermittedSandboxedNavigator(aOnePermittedSandboxedNavigator); } \
  NS_IMETHOD SetOnePermittedSandboxedNavigator(nsIDocShell *aOnePermittedSandboxedNavigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnePermittedSandboxedNavigator(aOnePermittedSandboxedNavigator); } \
  virtual bool IsSandboxedFrom(nsIDocShell *aTargetDocShell) override; \
  NS_IMETHOD GetMixedContentChannel(nsIChannel **aMixedContentChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMixedContentChannel(aMixedContentChannel); } \
  NS_IMETHOD SetMixedContentChannel(nsIChannel *aMixedContentChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMixedContentChannel(aMixedContentChannel); } \
  NS_IMETHOD GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowMixedContentAndConnectionData(rootHasSecureConnection, allowMixedContent, isRootDocShell); } \
  NS_IMETHOD_(bool) PluginsAllowedInCurrentDoc(void) override; \
  NS_IMETHOD GetFullscreenAllowed(bool *aFullscreenAllowed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFullscreenAllowed(aFullscreenAllowed); } \
  NS_IMETHOD SetFullscreenAllowed(bool allowed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFullscreenAllowed(allowed); } \
  NS_IMETHOD_(uint32_t) OrientationLock(void) override; \
  NS_IMETHOD_(void) SetOrientationLock(uint32_t orientationLock) override; \
  NS_IMETHOD GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAffectPrivateSessionLifetime(aAffectPrivateSessionLifetime); } \
  NS_IMETHOD SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAffectPrivateSessionLifetime(aAffectPrivateSessionLifetime); } \
  NS_IMETHOD GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMayEnableCharacterEncodingMenu(aMayEnableCharacterEncodingMenu); } \
  NS_IMETHOD GetEditor(nsIEditor **aEditor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditor(aEditor); } \
  NS_IMETHOD SetEditor(nsIEditor *aEditor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEditor(aEditor); } \
  NS_IMETHOD GetEditable(bool *aEditable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditable(aEditable); } \
  NS_IMETHOD GetHasEditingSession(bool *aHasEditingSession) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasEditingSession(aHasEditingSession); } \
  NS_IMETHOD MakeEditable(bool inWaitForUriLoad) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeEditable(inWaitForUriLoad); } \
  NS_IMETHOD GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChildSHEntry(aChildOffset, _retval); } \
  NS_IMETHOD AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChilden) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddChildSHEntry(aCloneReference, aHistoryEntry, aChildOffset, aLoadType, aCloneChilden); } \
  NS_IMETHOD GetUseGlobalHistory(bool *aUseGlobalHistory) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseGlobalHistory(aUseGlobalHistory); } \
  NS_IMETHOD SetUseGlobalHistory(bool aUseGlobalHistory) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseGlobalHistory(aUseGlobalHistory); } \
  NS_IMETHOD RemoveFromSessionHistory(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveFromSessionHistory(); } \
  NS_IMETHOD GetCreatedDynamically(bool *aCreatedDynamically) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCreatedDynamically(aCreatedDynamically); } \
  NS_IMETHOD SetCreatedDynamically(bool aCreatedDynamically) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCreatedDynamically(aCreatedDynamically); } \
  NS_IMETHOD GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentSHEntry(aEntry, _retval); } \
  NS_IMETHOD IsCommandEnabled(const char * command, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCommandEnabled(command, _retval); } \
  NS_IMETHOD DoCommand(const char * command) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommand(command); } \
  NS_IMETHOD DoCommandWithParams(const char * command, nsICommandParams *aParams) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DoCommandWithParams(command, aParams); } \
  NS_IMETHOD_(bool) IsInvisible(void) override; \
  NS_IMETHOD_(void) SetInvisible(bool aIsInvisibleDochsell) override; \
  virtual nsIScriptGlobalObject * GetScriptGlobalObject(void) override; \
  NS_IMETHOD GetDeviceSizeIsPageSize(bool *aDeviceSizeIsPageSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDeviceSizeIsPageSize(aDeviceSizeIsPageSize); } \
  NS_IMETHOD SetDeviceSizeIsPageSize(bool aDeviceSizeIsPageSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDeviceSizeIsPageSize(aDeviceSizeIsPageSize); } \
  virtual void SetOpener(nsITabParent *aOpener) override; \
  virtual nsITabParent * GetOpener(void) override; \
  virtual void NotifyJSRunToCompletionStart(const char * aReason, const char16_t * functionName, const char16_t * fileName, uint32_t lineNumber, JS::HandleValue asyncStack, const char * asyncCause) override; \
  virtual void NotifyJSRunToCompletionStop(void) override; \
  NS_IMETHOD GetHasLoadedNonBlankURI(bool *aHasLoadedNonBlankURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasLoadedNonBlankURI(aHasLoadedNonBlankURI); } \
  NS_IMETHOD GetWindowDraggingAllowed(bool *aWindowDraggingAllowed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowDraggingAllowed(aWindowDraggingAllowed); } \
  NS_IMETHOD SetWindowDraggingAllowed(bool aWindowDraggingAllowed) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowDraggingAllowed(aWindowDraggingAllowed); } \
  NS_IMETHOD GetCurrentScrollRestorationIsManual(bool *aCurrentScrollRestorationIsManual) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentScrollRestorationIsManual(aCurrentScrollRestorationIsManual); } \
  NS_IMETHOD SetCurrentScrollRestorationIsManual(bool aCurrentScrollRestorationIsManual) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCurrentScrollRestorationIsManual(aCurrentScrollRestorationIsManual); } \
  NS_IMETHOD GetOriginAttributes(JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginAttributes(cx, _retval); } \
  NS_IMETHOD SetOriginAttributes(JS::HandleValue aAttrs, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOriginAttributes(aAttrs, cx); } \
  NS_IMETHOD GetEditingSession(nsIEditingSession **aEditingSession) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditingSession(aEditingSession); } \
  NS_IMETHOD GetScriptableTabChild(nsITabChild **aTabChild) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptableTabChild(aTabChild); } \
  virtual already_AddRefed<nsITabChild> GetTabChild(void) override; \
  virtual nsICommandManager * GetCommandManager(void) override; \
  NS_IMETHOD GetTouchEventsOverride(uint32_t *aTouchEventsOverride) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTouchEventsOverride(aTouchEventsOverride); } \
  NS_IMETHOD SetTouchEventsOverride(uint32_t aTouchEventsOverride) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTouchEventsOverride(aTouchEventsOverride); } \
  NS_IMETHOD GetIsOnlyToplevelInTabGroup(bool *aIsOnlyToplevelInTabGroup) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsOnlyToplevelInTabGroup(aIsOnlyToplevelInTabGroup); } \
  NS_IMETHOD GetAwaitingLargeAlloc(bool *aAwaitingLargeAlloc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAwaitingLargeAlloc(aAwaitingLargeAlloc); } \
  NS_IMETHOD GetUseTrackingProtection(bool *aUseTrackingProtection) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseTrackingProtection(aUseTrackingProtection); } \
  NS_IMETHOD SetUseTrackingProtection(bool aUseTrackingProtection) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseTrackingProtection(aUseTrackingProtection); } \
  NS_IMETHOD DispatchLocationChangeEvent(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DispatchLocationChangeEvent(); } \
  virtual mozilla::UniquePtr<mozilla::dom::ClientSource> TakeInitialClientSource(void) override; \
  NS_IMETHOD SetColorMatrix(float *aMatrix, uint32_t aMatrixLen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetColorMatrix(aMatrix, aMatrixLen); } \
  NS_IMETHOD GetColorMatrix(uint32_t *aMatrixLen, float **aMatrix) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetColorMatrix(aMatrixLen, aMatrix); } \
  NS_IMETHOD InitSessionHistory(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitSessionHistory(); } \
  NS_IMETHOD GetDisplayMode(uint32_t *aDisplayMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayMode(aDisplayMode); } \
  NS_IMETHOD SetDisplayMode(uint32_t aDisplayMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayMode(aDisplayMode); } \
  NS_IMETHOD GetMessageManager(mozilla::dom::ContentFrameMessageManager **aMessageManager) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMessageManager(aMessageManager); } 


#endif /* __gen_nsIDocShell_h__ */