michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * The nsIWebBrowserSetup interface lets you set properties on a browser michael@0: * object; you can do so at any time during the life cycle of the browser. michael@0: * michael@0: * @note Unless stated otherwise, settings are presumed to be enabled by michael@0: * default. michael@0: */ michael@0: [scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)] michael@0: interface nsIWebBrowserSetup : nsISupports michael@0: { michael@0: /** michael@0: * Boolean. Enables/disables plugin support for this browser. michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_ALLOW_PLUGINS = 1; michael@0: michael@0: /** michael@0: * Boolean. Enables/disables Javascript support for this browser. michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_ALLOW_JAVASCRIPT = 2; michael@0: michael@0: /** michael@0: * Boolean. Enables/disables meta redirect support for this browser. michael@0: * Meta redirect timers will be ignored if this option is disabled. michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_ALLOW_META_REDIRECTS = 3; michael@0: michael@0: /** michael@0: * Boolean. Enables/disables subframes within the browser michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_ALLOW_SUBFRAMES = 4; michael@0: michael@0: /** michael@0: * Boolean. Enables/disables image loading for this browser michael@0: * window. If you disable the images, load a page, then enable the images, michael@0: * the page will *not* automatically load the images for the previously michael@0: * loaded page. This flag controls the state of a webBrowser at load time michael@0: * and does not automatically re-load a page when the state is toggled. michael@0: * Reloading must be done by hand, or by walking through the DOM tree and michael@0: * re-setting the src attributes. michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_ALLOW_IMAGES = 5; michael@0: michael@0: /** michael@0: * Boolean. Enables/disables whether the document as a whole gets focus before michael@0: * traversing the document's content, or after traversing its content. michael@0: * michael@0: * NOTE: this property is obsolete and now has no effect michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6; michael@0: michael@0: /** michael@0: * Boolean. Enables/disables the use of global history in the browser. Visited michael@0: * URLs will not be recorded in the global history when it is disabled. michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_USE_GLOBAL_HISTORY = 256; michael@0: michael@0: /** michael@0: * Boolean. A value of PR_TRUE makes the browser a chrome wrapper. michael@0: * Default is PR_FALSE. michael@0: * michael@0: * @since mozilla1.0 michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_IS_CHROME_WRAPPER = 7; michael@0: michael@0: michael@0: /** michael@0: * Boolean. Enables/disables DNS prefetch for HTML anchors in this browser. michael@0: * This takes effect starting with the next pageload after the property is michael@0: * set. The default is to not allow DNS prefetch, for backwards michael@0: * compatibility. michael@0: * michael@0: * @see setProperty michael@0: */ michael@0: const unsigned long SETUP_ALLOW_DNS_PREFETCH = 8; michael@0: michael@0: /** michael@0: * Sets an integer or boolean property on the new web browser object. michael@0: * Only PR_TRUE and PR_FALSE are legal boolean values. michael@0: * michael@0: * @param aId The identifier of the property to be set. michael@0: * @param aValue The value of the property. michael@0: */ michael@0: void setProperty(in unsigned long aId, in unsigned long aValue); michael@0: }; michael@0: