[webkit-dev] virtual functions in ChromeClient and other clients

Yong Li yong.li at torchmobile.com
Thu Oct 22 12:28:55 PDT 2009

Usually, those clients call WebPage or WebFrame to access the data members.

For example:



----- Original Message ----- 
From: "Adam Barth" <abarth at webkit.org>
To: "Yong Li" <yong.li at torchmobile.com>
Cc: "WebKit Development" <webkit-dev at lists.webkit.org>
Sent: Thursday, October 22, 2009 3:25 PM
Subject: Re: [webkit-dev] virtual functions in ChromeClient and other 

How would the class implementing ChromeClient hold any data members?
I guess we could use pimpl...


On Thu, Oct 22, 2009 at 12:20 PM, Yong Li <yong.li at torchmobile.com> wrote:
> Hi All,
> ChromeClient and other clients defined in webkit are using a lot of 
> WebCore
> objects. So it seems impossible to provide a ChromeClient from another
> binary other than webkit itself. In other words, ChromeClient is almost
> always implemented in a static lib that's linked with WebCore together.
> If that's true, why do we need those "virtual" functions? One reason might
> be for this case:
> class WebPage: public ChromeClient, public EditorClient, public ..... {
> };
> But I see most ports implement these clients with single classes. If we 
> can
> make this mandatory, then we can remove these "virtual" words from these
> client interface, and then the compilers could make those functions 
> "inline"
> whenever suitable. I guess this could boost performance a little bit.
> Best regards,
> Yong Li
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

More information about the webkit-dev mailing list