Sandesh Sethia wrote:
Let me ellaborate on what I want to achieve - I simply want to accept a URL
from a user at the prompt and load the corresponding document into a browser myself.

OK.  So you have an nsIWebBrowser, right?

For which I considered the design would be (and please correct me if I m
wrong):
1. Invoke a method in nsIDocumentLoader with the URL to get back the content
type and the
   DocumentLoaderFactory that would handle that content type
2. Invoke the CreateInstance method on this Factory to get the Content
Viewer and Stream Listener
3. And finally embed this Content Viewer in a ContentViewerContainer to load
the document.

Er... if you really want to make yourself work hard, then maybe. The right way to do what you want is to just get the nsIWebNavigation for your browser and tell it to load the URI.

So, for Boris's first question I would need
    1. getService() call on nsIDocumentLoader (and I guess it would be on
the root window because I
                                                                    am
interested in only a single window)

No, if you getService a docloader it'll be the root docloader. Root window docloaders would be kids of it.

    3. The assumption I made here is that a document embedded in a Content
Viewer is as good as
        the one that gets displayed ....... in other terms it is the window
itself....

Not unless the content viewer is embedded in a docshell...

-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to