|
Re: SWT Browser and IE Extensions [message #836479 is a reply to message #835949] |
Wed, 04 April 2012 14:28 |
Grant Gayed 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 #837531 is a reply to message #836513] |
Thu, 05 April 2012 19:58 |
Bruno Leroux 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 |
Grant Gayed 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
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.27728 seconds