Re: Newbie question...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question...

Philipp Wagner-4
Hi Jürgen,

first: "Mozilla Developer Network" is just the name of the online
documentation at developer.mozilla.org.

second: don't try to embed Gecko into your application. Many have tried
before and failed sooner or later. If you want to embed a browser, use
Webkit or IE (depending on how you developed your application, e.g. in
Qt it's really easy to embed Webkit).

third: for your use case I don't think you even need to embed a web
browser into your application. You could use a simple XULRunner
application or even a regular Firefox with a (to-be-developed) special
Add-On.

Philipp


Am 19.07.2012 11:42, schrieb Jürgen Keser:

> Hi All,
>
> I am an absolutely newbie at the Mozilla Developer Network and I have
> a few questions. I don't know if  it's possible to realize the project I will
> do here with all the great stuff you provide. But let me explain what I will do:
>
> 1.
> We have an application(cross platform Macintosh + Windows) that is running. Out of
> this application we will show now an present Homepage of a partner of us. This should
> happen in an separate window but I think this must be possible with the stuff from here?
> https://developer.mozilla.org/en/The_Joy_of_XUL
>
>
> 2.
> If this Homepage is opened in the separate window the user could choose out of a few download links
> that are on this page.
> If he now click on one of the download links, normally the download window of the web browser will
> come up to show where the file will be saved.
> But what we want is to download the file at a separate place we could define without the dialog where
> it should be saved and close the separate window that shows the Homepage.
>
> 3.
> Now when the browser window is closed we need a message or anything else in the main application that
> a file was downloaded. Now we could load the downloaded file in the main application that is running.
>
>
> I know this is just a very short description of the things we will do. But maybe someone of you did something
> similar and could give me some hints, how this project could be realized? Maybe it's not possible to
> realize with the Mozilla Developer Network? Maybe I need to search for another Developer Network?
>
>
> Thanks for any help!!!
>
> Regards,
>
> Jürgen
>


_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question...

steve lu
Hi,

The best solution is to register your own nsIWebContentPolicy XPCOM
component
in an embedded Gecko application.
This would allow you to reject or approve each outbound HTTP request
based on its URL or Content Type.
You can then spawn your own download from the callback.

The second solution is to set your own window creator in an XULRunner app.
You will get a callback whenever a window opens.  You can then block the
default download manager
from opening in the callback.  This would also prevent the original
download from commencing.
However, you do need to add a "click" listener to trigger your own download.
Also, This approach does not block the outbound http request.

Steve






On 7/26/2012 10:09 AM, Philipp Wagner wrote:

> Hi Jürgen,
>
> first: "Mozilla Developer Network" is just the name of the online
> documentation at developer.mozilla.org.
>
> second: don't try to embed Gecko into your application. Many have tried
> before and failed sooner or later. If you want to embed a browser, use
> Webkit or IE (depending on how you developed your application, e.g. in
> Qt it's really easy to embed Webkit).
>
> third: for your use case I don't think you even need to embed a web
> browser into your application. You could use a simple XULRunner
> application or even a regular Firefox with a (to-be-developed) special
> Add-On.
>
> Philipp
>
>
> Am 19.07.2012 11:42, schrieb Jürgen Keser:
>> Hi All,
>>
>> I am an absolutely newbie at the Mozilla Developer Network and I have
>> a few questions. I don't know if  it's possible to realize the project I will
>> do here with all the great stuff you provide. But let me explain what I will do:
>>
>> 1.
>> We have an application(cross platform Macintosh + Windows) that is running. Out of
>> this application we will show now an present Homepage of a partner of us. This should
>> happen in an separate window but I think this must be possible with the stuff from here?
>> https://developer.mozilla.org/en/The_Joy_of_XUL
>>
>>
>> 2.
>> If this Homepage is opened in the separate window the user could choose out of a few download links
>> that are on this page.
>> If he now click on one of the download links, normally the download window of the web browser will
>> come up to show where the file will be saved.
>> But what we want is to download the file at a separate place we could define without the dialog where
>> it should be saved and close the separate window that shows the Homepage.
>>
>> 3.
>> Now when the browser window is closed we need a message or anything else in the main application that
>> a file was downloaded. Now we could load the downloaded file in the main application that is running.
>>
>>
>> I know this is just a very short description of the things we will do. But maybe someone of you did something
>> similar and could give me some hints, how this project could be realized? Maybe it's not possible to
>> realize with the Mozilla Developer Network? Maybe I need to search for another Developer Network?
>>
>>
>> Thanks for any help!!!
>>
>> Regards,
>>
>> Jürgen
>>
>
> _______________________________________________
> dev-embedding mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-embedding
>

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