[webkit-dev] Client-based Geolocation

John Knottenbelt jknotten at chromium.org
Fri Dec 10 06:45:31 PST 2010


I've been working on getting Chromium's WebKit layer to support client-based
Geolocation. This means that a class in the Chromium WebKit layer implements
the WebCore interface GeolocationClient, and an instance of this class is
provided to the Page constructor (by means of PageClients). This is a neat
way of keeping the platform specific code in the WebKit layer (rather than
in WebCore, where the existing GeolocationService and platform code is). The
design of client-based geolocation feels very clean and I think it is easier
to understand as it follows a similar pattern to other existing client-based
designs (e.g. speech, device orientation, device motion).

It would be great if, ultimately, we could remove the non-client-based
geolocation code from WebCore (I already have plans to do this for
Chromium's WebKit layer). Such a removal would make the WebCore code more
readable because the #if ENABLE(CLIENT_BASED_GEOLOCATION) preprocessor
directives would go away, more understandable because there would be less
code, and more maintainable because we would only need to fix bugs in one
code path, rather than two.

It seems that Android, Qt and GTK currently implement the non-client-based
design. Is anybody working, or interested in working, on migrating these
platforms to the client-based design?

Thanks

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101210/4e87a9e9/attachment.html>


More information about the webkit-dev mailing list