[webkit-dev] Does any port implements Navigator.registerProtocolHandler and Navigator.registerContentHandler?

Gustavo Sverzut Barbieri barbieri at profusion.mobi
Fri Jul 23 09:42:21 PDT 2010


On Thu, Jul 22, 2010 at 11:07 PM, Darin Adler <darin at apple.com> wrote:
> On Jul 22, 2010, at 2:12 PM, Gustavo Sverzut Barbieri wrote:
>
>> Sorry to disturb this already dead thread, but we're (webkit-efl) thinking of letting applications/browsers register new protocol handlers to provide contents themselves. A co-worker, Flávio Ceolin, will send more details in another thread, but do you have any idea on the path to have them generically in WebCore?
>
> WebKit on Mac OS X already supports this and most other ports as well. Adding it to a platform does not require any changes to WebCore.
>
> The frame policy functions in FrameLoaderClient are the hook for this sort of thing, specifically dispatchDecidePolicyForNavigationAction. WebKit looks at the URL and decides it’s something an application can handle based on the OS-specific system for handling such things. Then if it does want to handle it, it calls the frame policy function with the action "ignore", which prevents WebCore from doing anything with the link, and then passes the URL on to the other application.

Hi Darin,

Thanks! But not what I actually need... maybe I lacked an use case,
but my usage is not just to handle an URL, rather to provide actual
data to webkit based on them.

For instance, if I want to access an web archive in tar/zip/rar
without uncompressing, I'd like to be able, from my app, to load some
data with the base uri being "tar://" or maybe something that
identifies that file (tar://bla.tar.gz), and then all the relative
paths would be prepended "tar://", so I could trap it, access the file
inside the tar and then feed it back to webkit so the images are
shown, css are used, etc...

Maybe it is something else completely different? Ideas?

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbieri at gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202


More information about the webkit-dev mailing list