Dorian B. wrote:
Since 1.8.1 windows diversion is handled differently. I suppose it has to do with the new nsIWindowProvider interface but how can I implement this in my embed app? The docshelltreeowner doesn't implement this.

Gecko just needs to be able to GetInterface the nsIWindowProvider off the docshelltreeowner. If you look at nsDocShellTreeOwner::GetInterface, it will call GetInterface on its mWebBrowserChrome if it has one, and on its mOwnerRequestor otherwise.

So the easiest thing to do if you already call SetWebBrowserChrome on the tree owner is to just implement nsIInterfaceRequestor on that object and have its GetInterface impl return an nsIWindowProvider (which can just be the web browser chrome object itself if you want).

You can see an example in http://lxr.mozilla.org/mozilla/source/camino/src/embedding/CHBrowserListener.h and http://lxr.mozilla.org/mozilla/source/camino/src/embedding/CHBrowserListener.mm

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

Reply via email to