embedding/browser/webBrowser/nsIWebBrowserSetup.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/embedding/browser/webBrowser/nsIWebBrowserSetup.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,109 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#include "nsISupports.idl"
    1.11 +
    1.12 +/**
    1.13 + * The nsIWebBrowserSetup interface lets you set properties on a browser
    1.14 + * object; you can do so at any time during the life cycle of the browser.
    1.15 + *
    1.16 + * @note Unless stated otherwise, settings are presumed to be enabled by
    1.17 + *       default.
    1.18 + */
    1.19 +[scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)]
    1.20 +interface nsIWebBrowserSetup : nsISupports
    1.21 +{
    1.22 +    /**
    1.23 +     * Boolean. Enables/disables plugin support for this browser.
    1.24 +     *
    1.25 +     * @see setProperty
    1.26 +     */
    1.27 +    const unsigned long SETUP_ALLOW_PLUGINS         = 1;
    1.28 +
    1.29 +    /**
    1.30 +     * Boolean. Enables/disables Javascript support for this browser.
    1.31 +     *
    1.32 +     * @see setProperty
    1.33 +     */
    1.34 +    const unsigned long SETUP_ALLOW_JAVASCRIPT      = 2;
    1.35 +
    1.36 +    /**
    1.37 +     * Boolean. Enables/disables meta redirect support for this browser.
    1.38 +     * Meta redirect timers will be ignored if this option is disabled.
    1.39 +     *
    1.40 +     * @see setProperty
    1.41 +     */
    1.42 +    const unsigned long SETUP_ALLOW_META_REDIRECTS  = 3;
    1.43 +
    1.44 +    /**
    1.45 +     * Boolean. Enables/disables subframes within the browser
    1.46 +     *
    1.47 +     * @see setProperty
    1.48 +     */
    1.49 +    const unsigned long SETUP_ALLOW_SUBFRAMES       = 4;
    1.50 +
    1.51 +    /**
    1.52 +     * Boolean. Enables/disables image loading for this browser
    1.53 +     * window. If you disable the images, load a page, then enable the images,
    1.54 +     * the page will *not* automatically load the images for the previously
    1.55 +     * loaded page. This flag controls the state of a webBrowser at load time 
    1.56 +     * and does not automatically re-load a page when the state is toggled. 
    1.57 +     * Reloading must be done by hand, or by walking through the DOM tree and 
    1.58 +     * re-setting the src attributes.
    1.59 +     *
    1.60 +     * @see setProperty
    1.61 +     */
    1.62 +    const unsigned long SETUP_ALLOW_IMAGES          = 5;
    1.63 +
    1.64 +    /**
    1.65 +     * Boolean. Enables/disables whether the document as a whole gets focus before
    1.66 +     * traversing the document's content, or after traversing its content.
    1.67 +     *
    1.68 +     * NOTE: this property is obsolete and now has no effect
    1.69 +     *
    1.70 +     * @see setProperty
    1.71 +     */
    1.72 +    const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6;
    1.73 +
    1.74 +    /**
    1.75 +     * Boolean. Enables/disables the use of global history in the browser. Visited
    1.76 +     * URLs will not be recorded in the global history when it is disabled.
    1.77 +     *
    1.78 +     * @see setProperty
    1.79 +     */
    1.80 +    const unsigned long SETUP_USE_GLOBAL_HISTORY    = 256;
    1.81 +
    1.82 +    /**
    1.83 +     * Boolean. A value of PR_TRUE makes the browser a chrome wrapper.
    1.84 +     * Default is PR_FALSE.
    1.85 +     *
    1.86 +     * @since mozilla1.0
    1.87 +     *
    1.88 +     * @see setProperty
    1.89 +     */
    1.90 +    const unsigned long SETUP_IS_CHROME_WRAPPER     = 7;
    1.91 +
    1.92 +
    1.93 +    /**
    1.94 +     * Boolean. Enables/disables DNS prefetch for HTML anchors in this browser.
    1.95 +     * This takes effect starting with the next pageload after the property is
    1.96 +     * set.  The default is to not allow DNS prefetch, for backwards
    1.97 +     * compatibility.
    1.98 +     *
    1.99 +     * @see setProperty
   1.100 +     */
   1.101 +    const unsigned long SETUP_ALLOW_DNS_PREFETCH    = 8;
   1.102 +
   1.103 +    /**
   1.104 +     * Sets an integer or boolean property on the new web browser object.
   1.105 +     * Only PR_TRUE and PR_FALSE are legal boolean values.
   1.106 +     *
   1.107 +     * @param aId The identifier of the property to be set.
   1.108 +     * @param aValue The value of the property.
   1.109 +     */
   1.110 +    void setProperty(in unsigned long aId, in unsigned long aValue);
   1.111 +};
   1.112 +

mercurial