Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
In the below code i use aWebProgress to and then GetDOMWindow on that, however GetDOMWindow only allows nsIDOMWindow, would the QueryInterface accommodate for this for this NS_IMETHODIMP WebBrowserChrome::OnLocationChange(nsIWebProgress* aWebProgress, nsIRequest* aRequest, nsIURI

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
I am using it from c++ On Wed, Feb 10, 2016 at 7:38 PM, Kyle Huey wrote: > Are you using it from JS or C++? If you're using it from JS, nothing has > changed. > > - Kyle > > On Wed, Feb 10, 2016 at 4:32 PM, Devan Shah > wrote: > >> Hello >> >>

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
I was using the xulrunner SDK, but that is no longer created any more so using the firefox SDK. I am using it to create a plugin which can be used to launch a web browser which communicates with a proxy server which can be used to capture all the http traffic.

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
Do you happen to have a QueryInterface example, Would something like the following work: void test(nsIDOMWindow* aDOMWindow, nsIBaseWindow** aBaseWindow) { nsPIDOMWindow* window = 0; nsresult status = aDOMWindow->QueryInterface(NS_GET_IID(nsPIDOMWindow), (void**)); nsIDocShell* docShell =

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
Currently I just want to get it up and running again on FF 45 again, with out making too much changes because we plan to deprecate this feature mid this year or so. Just need to get it working on Firefox 45, currently works perfectly on Firefox 38. ___

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
I tried to use nsPIDOMWindow, but issues is that functions like: Function GetContentDOMWindow in nsIWebBrowser is expecting: NS_IMETHOD GetContentDOMWindow(nsIDOMWindow * *aContentDOMWindow) = 0; (firefox-45.0b4\firefox-sdk\include\nsIWebBrowser.h) Function: NS_IMETHOD GetPrompt(nsIDOMWindow

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
So Something like: NS_IMETHODIMP WebBrowserChrome::OnLocationChange(nsIWebProgress* aWebProgress, nsIRequest* aRequest, nsIURI *location, uint32_t aFlags) { PRBool isSubFrameLoad = PR_FALSE; // Is this a subframe load if (aWebProgress) { nsCOMPtr domWindow;

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
yep This is how I was using nsIDOMWindow before: NS_IMETHODIMP WebBrowserChrome::OnLocationChange(nsIWebProgress* aWebProgress, nsIRequest* aRequest, nsIURI *location, uint32_t aFlags) { PRBool isSubFrameLoad = PR_FALSE; // Is this a subframe load if (aWebProgress) {

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-11 Thread Devan Shah
Version 45, I am using the SDK from https://ftp.mozilla.org/pub/firefox/releases/45.0b4/win32/en-US/firefox-45.0b4.sdk.zip. Which I still see the nsIPromptFactory has /* void getPrompt (in nsIDOMWindow aParent, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ NS_IMETHOD

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Are you using it from JS or C++? If you're using it from JS, nothing has changed. - Kyle On Wed, Feb 10, 2016 at 4:32 PM, Devan Shah wrote: > Hello > > nsIDOMWindow is deprecated now according to: >

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Ok ... ignoring the question of how you're using it from C++ since binary addons are gone, many of the methods on nsIDOMWindow moved to nsPIDOMWindow and then to nsPIDOMWindowInner/Outer, depending on what version of Gecko you're using. Today on trunk nsIPromptFactory takes a mozIDOMWindowProxy,

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Yes, you need to QueryInterface between nsIDOMWindow and nsPIDOMWindow. What are you actually doing with the Firefox SDK? - Kyle On Wed, Feb 10, 2016 at 5:03 PM, Devan Shah wrote: > I tried to use nsPIDOMWindow, but issues is that functions like: > > Function

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Right, that will work, although you could nsCOMPtr to make it a lot prettier: void test(nsIDOMWindow* aDOMWindow, nsIBaseWindow** aBaseWindow) { nsCOMPtr window = do_QueryInterface(aDOMWindow); nsCOMPtr docShell; if (window) window->GetDocShell(getter_AddRefs(docShell)); nsIWebShell*

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Dave Townsend
Yeah, Firefox 41 and later don't support binary XPCOM components in extensions. ctypes is still supported and so are binary plugins. On Wed, Feb 10, 2016 at 5:12 PM, Kyle Huey wrote: > Ok. I thought we killed binary components in extensions ... > > There will be a lot of

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Yeah, ok, nsPIDOMWindow then. - Kyle On Wed, Feb 10, 2016 at 4:49 PM, Devan Shah wrote: > Version 45, I am using the SDK from > https://ftp.mozilla.org/pub/firefox/releases/45.0b4/win32/en-US/firefox-45.0b4.sdk.zip. > Which I still see the nsIPromptFactory has > > /*

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Ok. I thought we killed binary components in extensions ... There will be a lot of changes around windows and their XPIDL interfaces in Gecko over the next while so you should expect to have to update this code fairly frequently if you're actually calling methods on nsIDOMWindow. - Kyle On

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
Alright, just QueryInterface between nsIDOMWindow and nsPIDOMWindow when you have one and need the other and you should be fine. - Kyle On Wed, Feb 10, 2016 at 5:15 PM, Devan Shah wrote: > Currently I just want to get it up and running again on FF 45 again, with > out

Re: nsIDOMWindow is deprecated now is there an alternative?

2016-02-10 Thread Kyle Huey
You get the nsIDOMWindow, and then QueryInterface to nsPIDOMWindow to call GetTop on it. - Kyle On Wed, Feb 10, 2016 at 5:35 PM, Devan Shah wrote: > In the below code i use aWebProgress to and then GetDOMWindow on that, > however GetDOMWindow only allows nsIDOMWindow,