Bug 123553 - [RFE] Communication channel between extension and browser
Summary: [RFE] Communication channel between extension and browser
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-30 20:35 PDT by Ben Boeckel
Modified: 2017-03-11 10:47 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Boeckel 2013-10-30 20:35:44 PDT
I'm having an issue with making an extension part of uzbl. There's no way to ask WebKitGtk to set up a communication channel between the extension and the main process. I could set one up, but I'm not sure how best to due so (environment variables + abstract UNIX sockets seem to be the best way that I can think of; there's DBus, but that would still rely on environment variables). It'd be nice if there were an API that an extension could call similar to:

    GIOChannel *webkit_extension_connect (WebKitWebExtension *extension, const gchar *name);

where there is a "extension-connected" signal on WebKitWebView:

    gboolean extension_connected_cb (WebKitWebView *view, GIOChannel *chan, const gchar *name, gpointer data);

where TRUE would imply that the connection should be kept and FALSE means that the connection should be torn down (and that the main process has not held onto the GIOChannel itself).
Comment 1 Carlos Garcia Campos 2014-03-04 00:07:38 PST
In epiphany we use dbus without environment variables. There's API to pass any data from the UI process to the extensions when they are initialized.
Comment 2 Ben Boeckel 2014-03-04 07:43:51 PST
It's too much too hope for a way to send a file descriptor over it isn't it? :) I guess I could pass an abstract socket path over it...