Re: Change location of pluginreg.dat and registry.dat
You need to implement nsIDirectoryServiceProvider class and pass it in when you call InitEmbedding(). MfcEmbed does this, so you can use it as an example.JOn Dec 1, 2005, at 12:44 PM, Aleksandar Vasilev wrote:How do I change tle location of pluginreg.dat and registry.dat, so that the embedding app uses its own private instances of these files?___mozilla-embedding mailing listmozilla-embedding@mozilla.orghttp://mail.mozilla.org/listinfo/mozilla-embedding
Change location of pluginreg.dat and registry.dat
How do I change tle location of pluginreg.dat and registry.dat, so that the embedding app uses its own private instances of these files? ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: What's wrong with this small code - getting the DOM
The process crashes on the last line nsresult nres = mEndParent->GetChildNodes(getter_AddRefs(children)); I can see in my vstudio debugger that I am getting an object with this structure: nsIDOMDocument nsISupports __vptr (**some expression which can't be evaluated) (**some expression which can't be evaluated) (**some expression which can't be evaluated) Thanks, Vijay ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: What's wrong with this small code - getting the DOM
Vijay wrote: Here is the GetDOM function implementation as well... NS_IMETHODIMP CBrowserImpl::GetDOM(nsIDOMDocument* doc) { nsCOMPtr window; nsCOMPtr ndoc = (nsCOMPtr)doc; Er... what? That doesn't look to me like it should do anything sane at all. In particular, after this code runs in your example as: nsCOMPtr doc; pBrowserFrame->GetBrowserImpl()->GetDOM(doc); |doc| will be null as far as I can tell. -Boris ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: Embedded browser...having issues with "modal" popups and launching files from Download Manager
Niky Williams wrote: Niky Williams wrote: Window 2000 using Visual Studio 2003 and C++ Let me see if I can explain this. I've got a pretty basic skeleton embedded browser and it seems to work okay browsing to various pages. I next tried to install the Macromedia Flash plugin. When I click on the file to download, the box that asks if I want to "open it with" or "Save it to disk" pops up. I tell it to save it to disk. Then the default download manager comes up and it shows the file "install_flash_player.exe" has successfully downloaded. I then click on "Launch File" and it gives me the warning about executable files...I click the "Don't ask me again." and then click the "OK" button. Nothing happens after that. I checked the about:plugins page and it does not show it installed. Another thing I noticed is that if I install it via the XPI package (http://plugindoc.mozdev.org/windows.html#Flash), it tells me a web site is wanting to install "flashplayer-win.xpi". I click install on the default chrome that comes up and again, nothing happens. If I open up firefox and install the XPI package through that, it installs and I can use the flash plug-in in my embedded app. So, what am I missing here? I'm guessing it has something to do with nsIWebBrowserChrome::DestroyBrowserWindow () as that is what is called when you click the buttons on the popup modal windows. In the DestoryBrowserWindow () function I Destroy () the nsIBaseWindow of the nsIWebBrowser then I DestroyWindow () on my HWND. Pretty straight forward. Any help is greatly appreciated! Niky Williams Just came across something else... Tried to install a different plug-in from http://player.virtools.com/downloads/playernetscape3.5.asp. The popup for if I wanted to "install or cancel" came up...then RIGHT after it without clicking ANYTHING, another popup came up saying "Installation stopped by user. Aborting setup.". S...why does it think I'm aborting the install? It works like it should in FireFox. Some return value in one of my functions maybe? I'm not sure where to look from here, any and all help will be greatly appreciated! Niky Williams Okay, one more thing to add to this. When I'm at www.google.com and I am tring to search for something, it brings up the "The information you have entered is to be sent over an unencrypted..." box. If I click "Continue", the box closes out but my browser does NOT go anywhere...so it seems that my Gecko class is not getting the "go ahead" event from clicking the "Continue" button on the modal pop up warning box. The link between the two seems to be brokennow, how to fix? Niky Williams ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: Embedded browser...having issues with "modal" popups and launching files from Download Manager
Niky Williams wrote: Window 2000 using Visual Studio 2003 and C++ Let me see if I can explain this. I've got a pretty basic skeleton embedded browser and it seems to work okay browsing to various pages. I next tried to install the Macromedia Flash plugin. When I click on the file to download, the box that asks if I want to "open it with" or "Save it to disk" pops up. I tell it to save it to disk. Then the default download manager comes up and it shows the file "install_flash_player.exe" has successfully downloaded. I then click on "Launch File" and it gives me the warning about executable files...I click the "Don't ask me again." and then click the "OK" button. Nothing happens after that. I checked the about:plugins page and it does not show it installed. Another thing I noticed is that if I install it via the XPI package (http://plugindoc.mozdev.org/windows.html#Flash), it tells me a web site is wanting to install "flashplayer-win.xpi". I click install on the default chrome that comes up and again, nothing happens. If I open up firefox and install the XPI package through that, it installs and I can use the flash plug-in in my embedded app. So, what am I missing here? I'm guessing it has something to do with nsIWebBrowserChrome::DestroyBrowserWindow () as that is what is called when you click the buttons on the popup modal windows. In the DestoryBrowserWindow () function I Destroy () the nsIBaseWindow of the nsIWebBrowser then I DestroyWindow () on my HWND. Pretty straight forward. Any help is greatly appreciated! Niky Williams Just came across something else... Tried to install a different plug-in from http://player.virtools.com/downloads/playernetscape3.5.asp. The popup for if I wanted to "install or cancel" came up...then RIGHT after it without clicking ANYTHING, another popup came up saying "Installation stopped by user. Aborting setup.". S...why does it think I'm aborting the install? It works like it should in FireFox. Some return value in one of my functions maybe? I'm not sure where to look from here, any and all help will be greatly appreciated! Niky Williams ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: What's wrong with this small code - getting the DOM
Vijay wrote: Hi All, In the original code of mfcembed, I have changed this method - void CMfcEmbedApp::OnNewBrowser() { CBrowserFrame *pBrowserFrame = CreateNewBrowserFrame(); //Load the HomePage into the browser view //if(pBrowserFrame && (GetStartupPageMode() == 1)) //pBrowserFrame->m_wndBrowserView.LoadHomePage(); if(pBrowserFrame) { pBrowserFrame->m_wndBrowserView.OpenURL("http://www.google.co.in";); //Sleep here for sometime to wait for document to load nsCOMPtr doc; pBrowserFrame->GetBrowserImpl()->GetDOM(doc); nsIDOMNode* mEndParent = (nsIDOMNode*)doc; nsCOMPtr children; nsresult nres = mEndParent->GetChildNodes(getter_AddRefs(children)); } } In the last line, the exe crashes stating Access Code Violation. Please tell what's wrong with this code? Many thanks, Vijay Can you verify that this line: pBrowserFrame->GetBrowserImpl()->GetDOM(doc); is actually getting the nsIDOMDocument? Also, if you are successfully getting the nsIDOMDocument, can you verify this this line: nsIDOMNode* mEndParent = (nsIDOMNode*)doc; is also getting something and not just failing? Niky Williams ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
Re: What's wrong with this small code - getting the DOM
Here is the GetDOM function implementation as well... NS_IMETHODIMP CBrowserImpl::GetDOM(nsIDOMDocument* doc) { nsCOMPtr window; nsCOMPtr ndoc = (nsCOMPtr)doc; mWebBrowser->GetContentDOMWindow(getter_AddRefs(window)); if (window) { window->GetDocument(getter_AddRefs(ndoc)); } return NS_OK; } ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding
What's wrong with this small code - getting the DOM
Hi All, In the original code of mfcembed, I have changed this method - void CMfcEmbedApp::OnNewBrowser() { CBrowserFrame *pBrowserFrame = CreateNewBrowserFrame(); //Load the HomePage into the browser view //if(pBrowserFrame && (GetStartupPageMode() == 1)) //pBrowserFrame->m_wndBrowserView.LoadHomePage(); if(pBrowserFrame) { pBrowserFrame->m_wndBrowserView.OpenURL("http://www.google.co.in";); //Sleep here for sometime to wait for document to load nsCOMPtr doc; pBrowserFrame->GetBrowserImpl()->GetDOM(doc); nsIDOMNode* mEndParent = (nsIDOMNode*)doc; nsCOMPtr children; nsresult nres = mEndParent->GetChildNodes(getter_AddRefs(children)); } } In the last line, the exe crashes stating Access Code Violation. Please tell what's wrong with this code? Many thanks, Vijay ___ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding