Concept of embedding
How is embedding!?
Constituents of embedding
In the world of embedding, various objects work in cooperation. The most important object is nsWebBrowser and this is the central element of embedding. This nsWebBrowser holds multiple nsDocShells in tree structure. Each nsDocShell is instanciated one by one according to the HTML frame.
[Constituent objects of embedding]
I show main objects used in embedding below.
The most important object of embedding. Embedding application creates instances of this class and uses them.
nsWebBrowser is XPCOM object and its functions are divided into each interface according to their usages.
The interfaces of nsWebBrowser are such as
And embedding application should create WebBrowser Site Objects as a proxy for each nsWebbrowser object he instanciated. These WebBrowser Site Objects implement some of XPCOM interfaces to themselves and mediate between nsWebBrowser and embedding application by receiving callbacks from nsWebBrowser.
XPCOM object that manages documents (HTML, XML) corresponding to one HTML frame. This object is responsible for loading documents, and has the feature of traversing tree structure of the document.
Because this nsDocShell is in charge of core fuctions, embedding application can do almost all things he want by dealing with upper level nsWebBrowser.
The interfaces of nsDocShell are such as
WebBrowser Site Object
XPCOM object that embedding application must implement.
Embedding application must create this object in one-to-one correspondence to nsWebBrowser that he created.
By being in close relations with nsWebBrowser and by being called its interfaces from nsWebBrowser at various timings, this object acts as a go-between for nsWebBrowser and application (i.e. Browser Shell Object).
The interfaces are divided into what must be implemented and what is implemented optionaly according to the functions of application.
Candidates of interfaces that WebBrowser Site Object implements are such as
This WebBrowser Site Object is equal to what PPBrowser and marbrow calls chrome class.
Neither essential to embedding nor XPCOM object. This is just a C++ object for management of browser-visual parts on embedding application side.
But, if embedding application itself is created as object-oriented, this will be implemented inevitably.
This object creates and manages nsWebBrowser and WebBrowser Site Object.
This BrowserShell Object is equal to below classes in PPBrowser and marbrow.
Copyright (C) 2000-2002 Symphony, Inc. All Rights Reserved.