Difference between revisions of "Chrome"

From CDOT Wiki
Jump to: navigation, search
(What is Chrome?)
(Chrome URLs)
Line 16: Line 16:
 
=Chrome in depth=
 
=Chrome in depth=
 
==Chrome URLs==
 
==Chrome URLs==
To maximize the flexibility, Mozilla introduces a new technology called "Configurable Chrome". A XUL file can be written in such a fashion that its chrome description comes from a mixture of physical sources, either locally, remotely, or a combination of both. An end user may customize her/his configuration to pick up any of the source type from his favor chrome providers.
+
To maximize the flexibility, Mozilla introduces a new technology called "Configurable Chrome" (Refer to [http://www.mozilla.org/xpfe/ConfigChromeSpec.html Configurable Chrome] by Benjamin Smedberg <benjamin@smedbergs.us>). A XUL file can be written in such a fashion that its chrome description comes from a mixture of physical sources, either locally, remotely, or a combination of both. An end user may customize her/his configuration to pick up any of the source type from his favor chrome providers.
  
 
To achieve this, chrome type URLs must be used to reference external sources; such as CSS files and JavaScript files. The general form of chrome URLs look like this:
 
To achieve this, chrome type URLs must be used to reference external sources; such as CSS files and JavaScript files. The general form of chrome URLs look like this:

Revision as of 02:35, 6 October 2006

What is Chrome?

In a nutshell, Chrome is the user interface of Mozilla products. The user interface is composed mostly of XUL, XBL, CSS, and JS files. Extensions are (usually) chrome applets. 90% of an extension, typically is chrome.

In the XUL world, Chrome is the top level window which contains groups of UI elements of various types. Example of chrome are the browser window and dialog window. The chrome obtains its UI description from four types of providers:

  • Content provider
Provides the skeleton, i.e., the menus, command buttons
  • Skin provider
Supplies the look-and-feel of the chrome
  • Platform provider
Gives platform dependent UI description
  • Locale provider
Offers the language and culture sensitive resources


Chrome in depth

Chrome URLs

To maximize the flexibility, Mozilla introduces a new technology called "Configurable Chrome" (Refer to Configurable Chrome by Benjamin Smedberg <benjamin@smedbergs.us>). A XUL file can be written in such a fashion that its chrome description comes from a mixture of physical sources, either locally, remotely, or a combination of both. An end user may customize her/his configuration to pick up any of the source type from his favor chrome providers.

To achieve this, chrome type URLs must be used to reference external sources; such as CSS files and JavaScript files. The general form of chrome URLs look like this:

chrome://WindowType/ProviderType/[ProviderName/]

What you can do with Chrome

Here are the following examples of what you can do with Chrome:

Resources

Configurable Chrome    by Benjamin Smedberg <benjamin@smedbergs.us>

http://www.mozilla.org/support/firefox/tips

http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code

http://developer.mozilla.org/en/docs/Chrome_Registration

http://www.xulplanet.com/tutorials/xultu/chromeurl.html