PageRenderTime 44ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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