nsIWebBrowserSetup.idl 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2. *
  3. * ***** BEGIN LICENSE BLOCK *****
  4. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5. *
  6. * The contents of this file are subject to the Mozilla Public License Version
  7. * 1.1 (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. * http://www.mozilla.org/MPL/
  10. *
  11. * Software distributed under the License is distributed on an "AS IS" basis,
  12. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13. * for the specific language governing rights and limitations under the
  14. * License.
  15. *
  16. * The Original Code is the Mozilla browser.
  17. *
  18. * The Initial Developer of the Original Code is
  19. * Netscape Communications, Inc.
  20. * Portions created by the Initial Developer are Copyright (C) 1999
  21. * the Initial Developer. All Rights Reserved.
  22. *
  23. * Contributor(s):
  24. * Travis Bogard <[email protected]>
  25. *
  26. * Alternatively, the contents of this file may be used under the terms of
  27. * either the GNU General Public License Version 2 or later (the "GPL"), or
  28. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29. * in which case the provisions of the GPL or the LGPL are applicable instead
  30. * of those above. If you wish to allow use of your version of this file only
  31. * under the terms of either the GPL or the LGPL, and not to allow others to
  32. * use your version of this file under the terms of the MPL, indicate your
  33. * decision by deleting the provisions above and replace them with the notice
  34. * and other provisions required by the GPL or the LGPL. If you do not delete
  35. * the provisions above, a recipient may use your version of this file under
  36. * the terms of any one of the MPL, the GPL or the LGPL.
  37. *
  38. * ***** END LICENSE BLOCK ***** */
  39. #include "nsISupports.idl"
  40. /**
  41. * The nsIWebBrowserSetup interface allows certain properties of a new browser
  42. * object to set before the browser window is opened.
  43. *
  44. * @note Unless stated otherwise, settings are presumed to be enabled by
  45. * default.
  46. *
  47. * @status FROZEN
  48. */
  49. [scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)]
  50. interface nsIWebBrowserSetup : nsISupports
  51. {
  52. /**
  53. * Boolean. Enables/disables plugin support for this browser.
  54. *
  55. * @see setProperty
  56. */
  57. const unsigned long SETUP_ALLOW_PLUGINS = 1;
  58. /**
  59. * Boolean. Enables/disables Javascript support for this browser.
  60. *
  61. * @see setProperty
  62. */
  63. const unsigned long SETUP_ALLOW_JAVASCRIPT = 2;
  64. /**
  65. * Boolean. Enables/disables meta redirect support for this browser.
  66. * Meta redirect timers will be ignored if this option is disabled.
  67. *
  68. * @see setProperty
  69. */
  70. const unsigned long SETUP_ALLOW_META_REDIRECTS = 3;
  71. /**
  72. * Boolean. Enables/disables subframes within the browser
  73. *
  74. * @see setProperty
  75. */
  76. const unsigned long SETUP_ALLOW_SUBFRAMES = 4;
  77. /**
  78. * Boolean. Enables/disables image loading for this browser
  79. * window. If you disable the images, load a page, then enable the images,
  80. * the page will *not* automatically load the images for the previously
  81. * loaded page. This flag controls the state of a webBrowser at load time
  82. * and does not automatically re-load a page when the state is toggled.
  83. * Reloading must be done by hand, or by walking through the DOM tree and
  84. * re-setting the src attributes.
  85. *
  86. * @see setProperty
  87. */
  88. const unsigned long SETUP_ALLOW_IMAGES = 5;
  89. /**
  90. * Boolean. Enables/disables whether the document as a whole gets focus before
  91. * traversing the document's content, or after traversing its content.
  92. *
  93. * NOTE: this property is obsolete and now has no effect
  94. *
  95. * @see setProperty
  96. */
  97. const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6;
  98. /**
  99. * Boolean. Enables/disables the use of global history in the browser. Visited
  100. * URLs will not be recorded in the global history when it is disabled.
  101. *
  102. * @see setProperty
  103. */
  104. const unsigned long SETUP_USE_GLOBAL_HISTORY = 256;
  105. /**
  106. * Boolean. A value of PR_TRUE makes the browser a chrome wrapper.
  107. * Default is PR_FALSE.
  108. *
  109. * @since mozilla1.0
  110. *
  111. * @see setProperty
  112. */
  113. const unsigned long SETUP_IS_CHROME_WRAPPER = 7;
  114. /**
  115. * Sets an integer or boolean property on the new web browser object.
  116. * Only PR_TRUE and PR_FALSE are legal boolean values.
  117. *
  118. * @param aId The identifier of the property to be set.
  119. * @param aValue The value of the property.
  120. */
  121. void setProperty(in unsigned long aId, in unsigned long aValue);
  122. };