Re: opening multiple windows with Mozilla Embedding
Christopher Rued <[email protected]> Wed, 07 Jan 2009 17:56:33 -0500
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | XSB, Inc. |
| Message-ID | <[email protected]> |
Hi, I don't suppose you had any luck with this? I'm also looking to open new windows (in response to JavaScript window.open() ) but it just doesn't seem to work properly.... Thanks, --Chris [email protected] wrote: > Hi, Am trying to open a Browser window using Mozilla Interfaces. I > could achieve opening one window. But now I want to open Multiple > windows ( Child windows). tags may also Do. > Below is the code that I used to open a window. > mozilla.initEmbedding(grePath, grePath, locProvider); > serviceManager = mozilla.getServiceManager(); > appStartup = (nsIAppStartup) > serviceManager.getServiceByContractID( "@mozilla.org/toolkit/app- > startup;1",nsIAppStartup.NS_IAPPSTARTUP_IID); > windowCreator = (nsIWindowCreator) > appStartup.queryInterface(nsIWindowCreator.NS_IWINDOWCREATOR_IID); > windowWatcher = (nsIWindowWatcher) > serviceManager.getServiceByContractID("@mozilla.org/embedcomp/window- > watcher;1", nsIWindowWatcher.NS_IWINDOWWATCHER_IID); > windowWatcher.setWindowCreator(windowCreator); > > domWindow = windowWatcher.openWindow(null, url,"mywindow", > "resizable,centerscreen", null); > windowWatcher.setActiveWindow(thinClient_popup_Window); > nsIDOMWindowInternal winint = (nsIDOMWindowInternal) > thinClient_popup_Window.queryInterface(nsIDOMWindowInternal.NS_IDOMWINDOWINTERNAL_IID); > winint.setInnerHeight(950); > winint.setInnerWidth(1260); > appStartup.run(); > > > > at this point the Window opens, but I am not able to open another > window after this, > Am really stuck how to proceed further. > > I am actually running a socket. every request to the socket will > replace the URL in this window. > > servSock = (nsIServerSocket) > serviceManager.getServiceByContractID("@mozilla.org/network/server- > socket;1",nsIServerSocket.NS_ISERVERSOCKET_IID); > transService = (nsISocketTransportService) > serviceManager.getServiceByContractID("@mozilla.org/network/socket- > transport-service;1", > nsISocketTransportService.NS_ISOCKETTRANSPORTSERVICE_IID); > sockTrans = transService.createTransport(null, 0,"localhost", 7055, > null); > servSock.init(7055, false, -1); > listener = new SockListener(servSock, sockTrans, > serviceManager,thinClient_popup_Window); > servSock.asyncListen(listener); > > Now am in need of opening multiple windows.... > Any help will be appreciated. Thanks in Advance. > _______________________________________________ > dev-tech-java mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-java > > _______________________________________________ dev-tech-java mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-java
smime.p7s
(application/x-pkcs7-signature, 3.1 KB) - not displayed