Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser and IE Extensions
SWT Browser and IE Extensions [message #835949] Tue, 03 April 2012 22:13 Go to next message
Bruno Leroux is currently offline Bruno LerouxFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,
in the SWT FAQ I didn't find an entry answering the following question : on windows, does the SWT Browser is able to run any Internet Explorer Extensions ?

I did some testings on Windows 7, IE 9 and SWT 3.8M6. Flash and java applets run nicely but I didn't succeed to run extensions (for instance speckie) and it looks like the GWT Team hit some limitations on the SWT Browser : "Due to the way SWT embeds the browser, many plugins/extensions do not work." (from code.google.com/p/google-web-toolkit/wiki/DesignOOPHM)

Is there a document describing which extensions should work ?

Thanks





-
Re: SWT Browser and IE Extensions [message #836479 is a reply to message #835949] Wed, 04 April 2012 14:28 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

IE plug-ins that render custom content like Flash will work because they
are referenced by the IE WebBrowser control, which is what the Browser
embeds. However IE _extensions_, such a BHOs, are not referenced by the
IE WebBrowser control, but by IE "the application" (one level higher).
This is why they don't work in the Browser. I've seen a reference from
MS (which I can't find it at the moment) indicating that this is
expected behaviour when the IE WebBrowser control is embedded.

Grant


On 4/3/2012 6:13 PM, Bruno Leroux wrote:
> Hi,
> in the SWT FAQ I didn't find an entry answering the following question :
> on windows, does the SWT Browser is able to run any Internet Explorer
> Extensions ?
>
> I did some testings on Windows 7, IE 9 and SWT 3.8M6. Flash and java
> applets run nicely but I didn't succeed to run extensions (for instance
> speckie) and it looks like the GWT Team hit some limitations on the SWT
> Browser : "Due to the way SWT embeds the browser, many
> plugins/extensions do not work." (from
> code.google.com/p/google-web-toolkit/wiki/DesignOOPHM)
>
> Is there a document describing which extensions should work ?
>
> Thanks
Re: SWT Browser and IE Extensions [message #836513 is a reply to message #836479] Wed, 04 April 2012 15:27 Go to previous messageGo to next message
Bruno Leroux is currently offline Bruno LerouxFriend
Messages: 4
Registered: July 2009
Junior Member
Hi Grant,

It's a real pleasure for me to get an answer from such a long-time SWT contributor, especially when this one come from the Smalltalk world Wink

I thought that SWT Browser embeds MSHTML instead of the IE WebBrowser Control. That's a very interesting information, thank you. I will extend my investigation on BHOs, WebBrowser Control and SWT Browser, first I have to read this : msdn.microsoft.com/en-us/library/ms976373.aspx and then I will look at GWT tooling as it looks like they found a way to load some BHO in SWT Browser. I will get back after this.

Many thanks
Bruno
Re: SWT Browser and IE Extensions [message #837531 is a reply to message #836513] Thu, 05 April 2012 19:58 Go to previous messageGo to next message
Bruno Leroux is currently offline Bruno LerouxFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

good news, i succeeded in running a BHO in the SWT Browser. This extension is named Speckie, I will soon try with another BHO. The key point is too load the extension and register it to IE WebBrowser Control.

What really helps me was a piece of code from the GWT tooling team. Several years ago they released a patch for the SWT Browser, this patch make SWT Browser able to load Google gears extension (Gears was a BHO).

The code is available here :
code.google.com/p/google-web-toolkit/source/detail?spec=svn1233&r=1233

It's not a huge piece of code, but a good knowledge of OLE was surely required.
The key points are :
- add an interface named IObjectWithSite which is the OLE interface implemented by BHOs
- call COM.CoCreateInstance to instanciate the BHO
- call IObjectWithSite.SetSite to associate the BHO instance to the IE WebBrowser control

Those calls have to be located in WebSite class as a reference to the protected variable named objIUnknown is required.

I don't know if some of this code could became a new API in the SWT Browser, maybe the IObjectWithSite interface could be commited to org.eclipse.swt.internal.ole.win32 as is. Adding several accessors to protected variable would make possible to run this code outside the SWT fragment, but it's a little weird.
(Accessors needed : Browser.getWebBrowser(), IE.getSite(), OleClientSite.getObjIUnknown() )

Grant, thank you for telling me if filling a bug request is the way to go to have this discussed by SWT commiters

Bruno



Re: SWT Browser and IE Extensions [message #837572 is a reply to message #837531] Thu, 05 April 2012 21:03 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Bruno,

Yes, logging a report is the best way to capture this info. It's not
something that can be considered until after 3.8/4.2 is released.

I'm familiar with IObjectWithSite from another project I work on, and
I'm guessing that stand-alone IE just enumerates the BHOs from the
Windows registry and invokes CoCreateInstance() then
IObjectWithSite.SetSite() on each. I'm not sure if this makes sense or
not in the context of the Browser, some further thought is needed.

Grant


On 4/5/2012 3:58 PM, Bruno Leroux wrote:
> Hi,
>
> good news, i succeeded in running a BHO in the SWT Browser. This
> extension is named Speckie, I will soon try with another BHO. The key
> point is too load the extension and register it to IE WebBrowser Control.
>
> What really helps me was a piece of code from the GWT tooling team.
> Several years ago they released a patch for the SWT Browser, this patch
> make SWT Browser able to load Google gears extension (Gears was a BHO).
>
> The code is available here :
> code.google.com/p/google-web-toolkit/source/detail?spec=svn1233&r=1233
>
> It's not a huge piece of code, but a good knowledge of OLE was surely
> required.
> The key points are :
> - add an interface named IObjectWithSite which is the OLE interface
> implemented by BHOs
> - call COM.CoCreateInstance to instanciate the BHO
> - call IObjectWithSite.SetSite to associate the BHO instance to the IE
> WebBrowser control
>
> Those calls have to be located in WebSite class as a reference to the
> protected variable named objIUnknown is required.
>
> I don't know if some of this code could became a new API in the SWT
> Browser, maybe the IObjectWithSite interface could be commited to
> org.eclipse.swt.internal.ole.win32 as is. Adding several accessors to
> protected variable would make possible to run this code outside the SWT
> fragment, but it's a little weird.
> (Accessors needed : Browser.getWebBrowser(), IE.getSite(),
> OleClientSite.getObjIUnknown() )
>
> Grant, thank you for telling me if filling a bug request is the way to
> go to have this discussed by SWT commiters
>
> Bruno
>
>
>
>
Previous Topic:How to select all files of a particular type in the included jar using Eclipse SWT
Next Topic:How to handle unsupported data type when calling java script function using SWT Browser
Goto Forum:
  


Current Time: Fri Apr 26 17:51:38 GMT 2024

Powered by FUDForum. Page generated in 0.03691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top