ActiveX wrap for Chrome Frame

3,489 views
Skip to first unread message

jfc

unread,
Jan 6, 2011, 7:42:09 AM1/6/11
to Google-chrome-frame
Has anyone been able to succesfully wrap Google Chrome Frame with an
ActiveX type control for use as a replacement for the WebBrowser
Control?

I have seen many articles on the fact that Chrome Frame cannot be used
in the WebBrowser control (only within IE itself). Based on my
research it sounded like if Chrome Frame was wrapped in an ActiveX
control, applications written in VB.net or C# could then use it.

Many people have point people to this code:

http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/test/perf/chrome_frame_perftest.cc?view=markup

This is test code that is part of Chrome Frame, but it's done in C++.

Can this same work be done using C#?



Thanks,
Joe

Alex Russell

unread,
Jan 6, 2011, 5:06:05 PM1/6/11
to google-ch...@googlegroups.com
On Thu, Jan 6, 2011 at 4:42 AM, jfc <jfcek...@gmail.com> wrote:
> Has anyone been able to succesfully wrap Google Chrome Frame with an
> ActiveX type control for use as a replacement for the WebBrowser
> Control?

Chrome Frame *is* an ActiveX control in addition to being an
ActiveDocument and a BHO. You can use it directly from script for C++.

The reason we say it's not a replacement for the WebBrowser control is
that, due to the multi-process nature of Chrome and the async RPCs
involved in connecting to it, we don't provide (many) synchronous
interfaces to the contents of a document (e.g., the DOM). That means
we're not implementing IWebBrowser2 (e.g.). If you use the APIs we
provide, you can indeed embed GCF to host a document, but remember
that you won't have the same API as the IE control.

> I have seen many articles on the fact that Chrome Frame cannot be used
> in the WebBrowser control (only within IE itself).  Based on my
> research it sounded like if Chrome Frame was wrapped in an ActiveX
> control, applications written in VB.net or C# could then use it.
>
> Many people have point people to this code:
>
> http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/test/perf/chrome_frame_perftest.cc?view=markup
>
> This is test code that is part of Chrome Frame, but it's done in C++.
>
> Can this same work be done using C#?
>
>
>
> Thanks,
> Joe
>

> --
> You received this message because you are subscribed to the Google Groups "Google-chrome-frame" group.
> To post to this group, send email to google-ch...@googlegroups.com.
> To unsubscribe from this group, send email to google-chrome-f...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-chrome-frame?hl=en.
>
>

Amit Joshi

unread,
Jan 6, 2011, 5:20:23 PM1/6/11
to google-ch...@googlegroups.com
On Thu, Jan 6, 2011 at 2:06 PM, Alex Russell <sligh...@chromium.org> wrote:
On Thu, Jan 6, 2011 at 4:42 AM, jfc <jfcek...@gmail.com> wrote:
> Has anyone been able to succesfully wrap Google Chrome Frame with an
> ActiveX type control for use as a replacement for the WebBrowser
> Control?

Chrome Frame *is* an ActiveX control in addition to being an
ActiveDocument and a BHO. You can use it directly from script for C++.

The reason we say it's not a replacement for the WebBrowser control is
that, due to the multi-process nature of Chrome and the async RPCs
involved in connecting to it, we don't provide (many) synchronous
interfaces to the contents of a document (e.g., the DOM). That means
we're not implementing IWebBrowser2 (e.g.). If you use the APIs we
provide, you can indeed embed GCF to host a document, but remember
that you won't have the same API as the IE control.

> I have seen many articles on the fact that Chrome Frame cannot be used
> in the WebBrowser control (only within IE itself).  Based on my
> research it sounded like if Chrome Frame was wrapped in an ActiveX
> control, applications written in VB.net or C# could then use it.
>
> Many people have point people to this code:
>
> http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/test/perf/chrome_frame_perftest.cc?view=markup
>
> This is test code that is part of Chrome Frame, but it's done in C++.
>
> Can this same work be done using C#?
Since Chrome Frame is a generic ActiveX control it should be usable by VB, C# etc. So in theory yes but we do not test it for such embedding and I haven't heard from anyone who has done this.

jfc

unread,
Jan 7, 2011, 8:50:25 AM1/7/11
to Google-chrome-frame
Do you or does anyone have any examples (very basic) as to how to use
Chrome Frame
as an ActiveX control?



On Jan 6, 5:06 pm, Alex Russell <slightly...@chromium.org> wrote:
> On Thu, Jan 6, 2011 at 4:42 AM, jfc <jfceklo...@gmail.com> wrote:
> > Has anyone been able to succesfully wrap Google Chrome Frame with an
> > ActiveX type control for use as a replacement for the WebBrowser
> > Control?
>
> Chrome Frame *is* an ActiveX control in addition to being an
> ActiveDocument and a BHO. You can use it directly from script for C++.
>
> The reason we say it's not a replacement for the WebBrowser control is
> that, due to the multi-process nature of Chrome and the async RPCs
> involved in connecting to it, we don't provide (many) synchronous
> interfaces to the contents of a document (e.g., the DOM). That means
> we're not implementing IWebBrowser2 (e.g.). If you use the APIs we
> provide, you can indeed embed GCF to host a document, but remember
> that you won't have the same API as the IE control.
>
>
>
> > I have seen many articles on the fact that Chrome Frame cannot be used
> > in the WebBrowser control (only within IE itself).  Based on my
> > research it sounded like if Chrome Frame was wrapped in an ActiveX
> > control, applications written in VB.net or C# could then use it.
>
> > Many people have point people to this code:
>
> >http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/test/per...
>
> > This is test code that is part of Chrome Frame, but it's done in C++.
>
> > Can this same work be done using C#?
>
> > Thanks,
> > Joe
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google-chrome-frame" group.
> > To post to this group, send email to google-ch...@googlegroups.com.
> > To unsubscribe from this group, send email to google-chrome-f...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/google-chrome-frame?hl=en.- Hide quoted text -
>
> - Show quoted text -

jfc

unread,
Jan 7, 2011, 4:34:32 PM1/7/11
to Google-chrome-frame
How would a user use the Active X control in HTML?
The classID is correct for Chrome Frame.

<html>
<head><title>Test</title></head>

<body>

<OBJECT CLASSID="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A"
ID="chrome" >
</OBJECT>

</body>

</html>

Embedding this in an HTML document does work, but the Aw,Swap message
comes up.
I think it's expecting some named parameter or what?
> > > For more options, visit this group athttp://groups.google.com/group/google-chrome-frame?hl=en.-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Tommi

unread,
Jan 7, 2011, 4:58:58 PM1/7/11
to google-ch...@googlegroups.com

Amit Joshi

unread,
Jan 7, 2011, 6:23:35 PM1/7/11
to google-ch...@googlegroups.com
Also check out: http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/CFInstance.js?view=markup  a JS wrapper over ActiveX and related samples here: http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/test/data/ (for e.g. http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/test/data/CFInstance_basic_host.html?revision=27042&view=markup)

Note that this JS code is available as is and not actively supported. Patches are welcome however :)

jfc

unread,
Jan 7, 2011, 10:26:33 PM1/7/11
to Google-chrome-frame
Thanks!

This was exactly what I was looking for!



On Jan 7, 4:58 pm, Tommi <to...@chromium.org> wrote:
> Does this work for you?
>
> http://src.chromium.org/viewvc/chrome/trunk/src/chrome_frame/host.html
>
> Cheers,
> Tommi
>
> > google-chrome-f...@googlegroups.com<google-chrome-frame%2Bunsu...@googlegroups.com>
> > .
> > > > > For more options, visit this group athttp://
> > groups.google.com/group/google-chrome-frame?hl=en.-Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google-chrome-frame" group.
> > To post to this group, send email to google-ch...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-chrome-f...@googlegroups.com<google-chrome-frame%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages