/embedding/browser/webBrowser/nsIWebBrowserSetup.idl

http://github.com/zpao/v8monkey · IDL · 142 lines · 15 code · 13 blank · 114 comment · 0 complexity · c3273d2c3f93989082b435ebd43ecd2e MD5 · raw file

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  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 <travis@netscape.com>
  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 lets you set properties on a browser
  42. * object; you can do so at any time during the life cycle of the browser.
  43. *
  44. * @note Unless stated otherwise, settings are presumed to be enabled by
  45. * default.
  46. */
  47. [scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)]
  48. interface nsIWebBrowserSetup : nsISupports
  49. {
  50. /**
  51. * Boolean. Enables/disables plugin support for this browser.
  52. *
  53. * @see setProperty
  54. */
  55. const unsigned long SETUP_ALLOW_PLUGINS = 1;
  56. /**
  57. * Boolean. Enables/disables Javascript support for this browser.
  58. *
  59. * @see setProperty
  60. */
  61. const unsigned long SETUP_ALLOW_JAVASCRIPT = 2;
  62. /**
  63. * Boolean. Enables/disables meta redirect support for this browser.
  64. * Meta redirect timers will be ignored if this option is disabled.
  65. *
  66. * @see setProperty
  67. */
  68. const unsigned long SETUP_ALLOW_META_REDIRECTS = 3;
  69. /**
  70. * Boolean. Enables/disables subframes within the browser
  71. *
  72. * @see setProperty
  73. */
  74. const unsigned long SETUP_ALLOW_SUBFRAMES = 4;
  75. /**
  76. * Boolean. Enables/disables image loading for this browser
  77. * window. If you disable the images, load a page, then enable the images,
  78. * the page will *not* automatically load the images for the previously
  79. * loaded page. This flag controls the state of a webBrowser at load time
  80. * and does not automatically re-load a page when the state is toggled.
  81. * Reloading must be done by hand, or by walking through the DOM tree and
  82. * re-setting the src attributes.
  83. *
  84. * @see setProperty
  85. */
  86. const unsigned long SETUP_ALLOW_IMAGES = 5;
  87. /**
  88. * Boolean. Enables/disables whether the document as a whole gets focus before
  89. * traversing the document's content, or after traversing its content.
  90. *
  91. * NOTE: this property is obsolete and now has no effect
  92. *
  93. * @see setProperty
  94. */
  95. const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6;
  96. /**
  97. * Boolean. Enables/disables the use of global history in the browser. Visited
  98. * URLs will not be recorded in the global history when it is disabled.
  99. *
  100. * @see setProperty
  101. */
  102. const unsigned long SETUP_USE_GLOBAL_HISTORY = 256;
  103. /**
  104. * Boolean. A value of PR_TRUE makes the browser a chrome wrapper.
  105. * Default is PR_FALSE.
  106. *
  107. * @since mozilla1.0
  108. *
  109. * @see setProperty
  110. */
  111. const unsigned long SETUP_IS_CHROME_WRAPPER = 7;
  112. /**
  113. * Boolean. Enables/disables DNS prefetch for HTML anchors in this browser.
  114. * This takes effect starting with the next pageload after the property is
  115. * set. The default is to not allow DNS prefetch, for backwards
  116. * compatibility.
  117. *
  118. * @see setProperty
  119. */
  120. const unsigned long SETUP_ALLOW_DNS_PREFETCH = 8;
  121. /**
  122. * Sets an integer or boolean property on the new web browser object.
  123. * Only PR_TRUE and PR_FALSE are legal boolean values.
  124. *
  125. * @param aId The identifier of the property to be set.
  126. * @param aValue The value of the property.
  127. */
  128. void setProperty(in unsigned long aId, in unsigned long aValue);
  129. };