nsIWebBrowserChrome corresponds to the top-level, outermost window containing an embedded Gecko web browser. @status FROZEN
[scriptable, uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)]
interface nsIWebBrowserChrome : nsISupports
Constants
const
unsigned long
STATUS_SCRIPT = 1
const
unsigned long
STATUS_SCRIPT_DEFAULT = 2
const
unsigned long
STATUS_LINK = 3
Definitions for the chrome flags
const
unsigned long
CHROME_DEFAULT = 1
const
unsigned long
CHROME_WINDOW_BORDERS = 2
const
unsigned long
CHROME_WINDOW_CLOSE = 4
const
unsigned long
CHROME_WINDOW_RESIZE = 8
const
unsigned long
CHROME_MENUBAR = 16
const
unsigned long
CHROME_TOOLBAR = 32
const
unsigned long
CHROME_LOCATIONBAR = 64
const
unsigned long
CHROME_STATUSBAR = 128
const
unsigned long
CHROME_PERSONAL_TOOLBAR = 256
const
unsigned long
CHROME_SCROLLBARS = 512
const
unsigned long
CHROME_TITLEBAR = 1024
const
unsigned long
CHROME_EXTRA = 2048
const
unsigned long
CHROME_WITH_SIZE = 4096
const
unsigned long
CHROME_WITH_POSITION = 8192
const
unsigned long
CHROME_WINDOW_MIN = 16384
const
unsigned long
CHROME_WINDOW_POPUP = 32768
const
unsigned long
CHROME_WINDOW_RAISED = 33554432
const
unsigned long
CHROME_WINDOW_LOWERED = 67108864
const
unsigned long
CHROME_CENTER_SCREEN = 134217728
const
unsigned long
CHROME_DEPENDENT = 268435456
const
unsigned long
CHROME_MODAL = 536870912
const
unsigned long
CHROME_OPENAS_DIALOG = 1073741824
const
unsigned long
CHROME_OPENAS_CHROME = 2147483648
const
unsigned long
CHROME_ALL = 4094
Attributes
The chrome flags for this browser chrome. The implementation should reflect the value of this attribute by hiding or showing its chrome appropriately.
attribute
unsigned long
chromeFlags
The currently loaded WebBrowser. The browser chrome may be told to set the WebBrowser object to a new object by setting this attribute. In this case the implementer is responsible for taking the new WebBrowser object and doing any necessary initialization or setup as if it had created the WebBrowser itself. This includes positioning setting up listeners etc.
attribute
nsIWebBrowser
webBrowser
Methods
Asks the implementer to destroy the window associated with this WebBrowser object.
void
destroyBrowserWindow()
Exit a modal event loop if we're in one. The implementation should also exit out of the loop if the window is destroyed. @param aStatus - the result code to return from showAsModal
void
exitModalEventLoop(in nsresult aStatus)
Is the window modal (that is, currently executing a modal loop)? @return true if it's a modal window
boolean
isWindowModal()
Called when the status text in the chrome needs to be updated.
@param statusType indicates what is setting the text
@param status status string. null is an acceptable value meaning
no status.
void
setStatus(in unsigned long statusType, in wstring status)
Shows the window as a modal window.
@return (the function error code) the status value specified by
in exitModalEventLoop.
void
showAsModal()
Tells the chrome to size itself such that the browser will be the specified size. @param aCX new width of the browser @param aCY new height of the browser
void
sizeBrowserTo(in long aCX, in long aCY)
Compare to: