Dear All,
I have embedded gecko in my java application and it works perfectly.
After certain point of time i would like to do termEmbedding and again
initEmbedding.
But after termEmbedding is called all my windows quit , and when I try
to do embedding again baseWindow.create call hangs.
mozilla = Mozilla.getInstance();
mozilla.initialize(grePath);
try
{
mozilla.initEmbedding(grePath, grePath,
locProvider);
}catch (XPCOMException e)
{
logger.log(Level.INFO,"GeckoEmbed:
XPCOMException");
}
componentManager =mozilla.getComponentManager();
AppShell = (nsIAppShell)
componentManager.createInstance(NS_APPSHELL_CID, null,
nsIAppShell.NS_IAPPSHELL_IID);
AppShell.create(null, null);
AppShell.spinup();
serviceManager = mozilla.getServiceManager();
appStartup
=(nsIAppStartup)serviceManager.getServiceByContractID("@mozilla.org/
toolkit/app-startup;1",nsIAppStartup.NS_IAPPSTARTUP_IID);
windowWatcher =
(nsIWindowWatcher)serviceManager.getServiceByContractID("@mozilla.org/
embedcomp/window-watcher;1", nsIWindowWatcher.NS_IWINDOWWATCHER_IID);
browser =
(nsIWebBrowser)componentManager.createInstanceByContractID("@mozilla.org/
embedding/browser/nsWebBrowser;
1",null,nsIWebBrowser.NS_IWEBBROWSER_IID);
baseWindow = (nsIBaseWindow)
browser.queryInterface(nsIBaseWindow.NS_IBASEWINDOW_IID);
hwnd = NativeWindow.getNativeWindowHandle();
baseWindow.initWindow(hwnd, 0, 0, 0, 1024, 768);
baseWindow.create();
baseWindow.setVisibility(true);
What Iam missing?.
Thanks in Advance,
Krithika
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding