embedding/browser/webBrowser/nsIWebBrowserChrome.idlScriptable
Corresponds to the top-level, outermost window containing an embedded Gecko web browser.
Inherits from: nsISupports Last changed in Gecko 0.9.6

Method overview

void destroyBrowserWindow();
void exitModalEventLoop(in nsresult aStatus);
boolean isWindowModal();
void setStatus(in unsigned long statusType, in wstring status);
void showAsModal();
void sizeBrowserTo(in long aCX, in long aCY);

Attributes

Attribute Type Description
chromeFlags unsigned long The chrome flags for this browser chrome. The implementation should reflect the value of this attribute by hiding or showing its chrome appropriately.
webBrowser nsIWebBrowser 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.

Constants

Constant Value Description
STATUS_SCRIPT 1 Flag for SetStatus()
STATUS_SCRIPT_DEFAULT 2 Flag for SetStatus()
STATUS_LINK 3 Flag for SetStatus()
CHROME_DEFAULT 1 Value for the chromeFlags attribute.
CHROME_WINDOW_BORDERS 2 Value for the chromeFlags attribute.
CHROME_WINDOW_CLOSE 4 Value for the chromeFlags attribute.
CHROME_WINDOW_RESIZE 8 Value for the chromeFlags attribute.
CHROME_MENUBAR 16 Value for the chromeFlags attribute.
CHROME_TOOLBAR 32 Value for the chromeFlags attribute.
CHROME_LOCATIONBAR 64 Value for the chromeFlags attribute.
CHROME_STATUSBAR 128 Value for the chromeFlags attribute.
CHROME_PERSONAL_TOOLBAR 256 Value for the chromeFlags attribute.
CHROME_SCROLLBARS 512 Value for the chromeFlags attribute.
CHROME_TITLEBAR 1024 Value for the chromeFlags attribute.
CHROME_EXTRA 2048 Value for the chromeFlags attribute.
CHROME_WITH_SIZE 4096 Specifically for use with nsIWindowCreator.
CHROME_WITH_POSITION 8192 Specifically for use with nsIWindowCreator.
CHROME_WINDOW_MIN 16384 Represent special cases.
CHROME_WINDOW_POPUP 32768 Represent special cases.
CHROME_WINDOW_RAISED 33554432 Represent special cases.
CHROME_WINDOW_LOWERED 67108864 Represent special cases.
CHROME_CENTER_SCREEN 134217728 Represent special cases.
CHROME_DEPENDENT 268435456 Make the new window dependent on the parent. This flag is only meaningful if CHROME_OPENAS_CHROME is set; content windows should not be dependent.
CHROME_MODAL 536870912 The modal style bit just affects the way the window looks and does not mean it's actually modal.
CHROME_OPENAS_DIALOG 1073741824 Represent special cases.
CHROME_OPENAS_CHROME 2147483648 Represent special cases.
CHROME_ALL 4094 Represent special cases.
CHROME_REMOTE_WINDOW 1048576 Whether this window should use remote (out-of-process) tabs.

Methods

destroyBrowserWindow()

Asks the implementer to destroy the window associated with this WebBrowser object.

void destroyBrowserWindow();
Parameters

None.

exitModalEventLoop()

Exit a modal event loop if we're in one. The implementation should also exit out of the loop if the window is destroyed.

void exitModalEventLoop(
  in nsresult aStatus
);
Parameters
aStatus
The result code to return from showAsModal().

isWindowModal()

Is the window modal (that is, currently executing a modal loop)?

boolean isWindowModal();
Parameters

None.

Return value

true if it's a modal window.

setStatus()

Called when the status text in the chrome needs to be updated.

void setStatus(
  in unsigned long statusType,
  in wstring status
);
Parameters
statusType
Indicates what is setting the text.
status
Status string. null is an acceptable value meaning no status.

showAsModal()

Shows the window as a modal window.

void showAsModal();
Parameters

None.

Return Value

Note: The function error code returned by this corresponds to the status value specified in exitModalEventLoop.

sizeBrowserTo()

Tells the chrome to size itself such that the browser will be the specified size.

void sizeBrowserTo(
  in long aCX,
  in long aCY
);
Parameters
aCX
New width of the browser.
aCY
New height of the browser.