[webkit-gtk] Confusion about web extensions

Niranjan Rao nhrdls at gmail.com
Thu Dec 19 12:43:13 PST 2013


Greetings,

Trying my best to understand concept of web extensions and processes. I 
am mostly following blog entry by Carlos Garcia Campo at 
http://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/ 
and example he pointed from epiphany browser at 
https://git.gnome.org/browse/epiphany/tree/embed/web-extension/ephy-web-extension.c

1. The concept process separation - are these actually separate 
processes with different process ids?
2. Web extensions - do extensions get any initialization information 
from parent process. If I want to follow epiphany example which opens a 
bus, how does it work with multiple epiphany processes? I suppose I can 
setup environment variable like the example does when root process 
starts. Is this the recommended way.
3. Can extension call webkit_web_view_load_uri  or similar method that 
will cause view to navigate?
4. What happens when a new tab is opened? Does plugin gets loaded again? 
My guess is yes since it will be one more process.

Typical work flow example in our case is  as follows. There will be 
multiple processes at same time - visiting various sites with different 
sessions. I am just trying to figure out how it fits in new paradigm.

A Driver code starts UI which displays webkit window
Load requested page.
Check for existence/value of some element using DOM access code.
Driver decides what needs to be done - click something, visit different 
page etc.

 From drivers perspective some of the interesting methods are in one 
process example webkit_web_view_load_uri  and other goodies. But 
information it needs to make decisions (that is DOM access) are in 
another process and it needs to communicate using some sort of IPC 
mechanism.  I can move most of my driver code to extension side to 
reduce complications of IPC. At this moment it looks like only thing it 
needs is ability to navigate to given location.

Is my understanding correct so far?

Regards,

Niranjan






More information about the webkit-gtk mailing list