nsIWebBrowserChrome
From MDC
nsIWebBrowserChrome corresponds to the top-level, outermost window containing an embedded Gecko web browser.
Contents |
nsIWebBrowserChrome is defined in embedding/browser/webBrowser/nsIWebBrowserChrome.idl. It is scriptable and
has been frozen since Mozilla 0.9.6.
Inherits from: nsISupports
[edit] Method overview
void setStatus(in unsigned long statusType, in wstring status);
|
void destroyBrowserWindow();
|
void sizeBrowserTo(in long aCX, in long aCY);
|
void showAsModal();
|
boolean isWindowModal();
|
void exitModalEventLoop(in nsresult aStatus);
|
[edit] 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
| Note: 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. |
[edit] Attributes
| Attribute | Type | Description |
webBrowser
|
| 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. |
chromeFlags
| long
| The chrome flags for this browser chrome. The implementation should reflect the value of this attribute by hiding or showing its chrome appropriately. |
[edit] Methods
[edit] setStatus()
Called when the status text in the chrome needs to be updated.
void setStatus(in unsigned long statusType, in wstring status);
[edit] Parameters
- statusType
- Indicates what is setting the status text.
- status
- Status string.
nullis an acceptable value meaning no status.
[edit] destroyBrowserWindow()
Asks the implementer to destroy the window associated with this WebBrowser object.
void destroyBrowserWindow();
[edit] Parameters
None.
[edit] sizeBrowserTo()
Tells the chrome to size itself such that the browser will be the specified size.
void sizeBrowserTo(in long aCX, in long aCY);
[edit] Parameters
- aCX
- New width of the browser.
- aCY
- New height of the browser.
[edit] showAsModal()
Shows the window as a modal window.
void showAsModal();
[edit] Parameters
None.
[edit] Return Value
exitModalEventLoop().[edit] isWindowModal()
Is the window modal (that is, currently executing a modal loop)?
boolean isWindowModal();
[edit] Parameters
None.
[edit] Return Value
true if it's a modal window.
[edit] 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 );
[edit] Parameters
- aStatus
- The result code to return from
showAsModal().