Swfdec/Konqi integration

koos vriezen koos.vriezen at gmail.com
Mon Jun 18 23:04:54 BST 2007


2007/6/18, Kevin Krammer <kevin.krammer at gmx.at>:
> On Monday 18 June 2007, koos vriezen wrote:
> > 2007/6/18, Kevin Krammer <kevin.krammer at gmx.at>:
>
> > > I am wondering how the browser will determine which plugin runner to
> > > start, i.e. which event loop/toolkit the plugin is expecting to have
> > > available.
> > >
> > > My guess is that this is not covered yet and would have to be part of the
> > > new plugin specification.
> >
> > Mozilla asks the plugin the 'NPPVpluginNeedsXEmbed' value.
>
> I'd like to apologize that I do not have any knowledge about the plugin
> business sofar, but from the name of the function it sounds more like it will
> be returning a boolean value, not information about the required
> toolkit+version.
>
> Without this information the browser will have to start each plugin runner
> until it finds one which can sucessfully load the plugin, won't it?

I'm not sure what you're after.
In kde3 it's a mimetype setting. So if one installs the beta flash
plugin, one should select a kpart that supports this.
Alternatively if one kpart, eg nsplugin support multiple runners, it
has to scan the plugins anyhow for the mimetypes and plugin
description, so I can probably find the required toolkit as well.
Brute force is to use 'nm' :-) and look for symbols.

> > > - data transfer: as Thiago already wrote, this should be handled with
> > > different means than D-Bus, e.g. a separate data connection on an unix
> > > socket, probably with the control connection being part of the D-Bus
> > > interface
> >
> > The npruntime offers plugins to get js objects (like 'window' and
> > 'location') and manipulate their properties and call their methods.
> > The other way around is js bindings to the plugin.
> > We don't have an API for the first thing with kparts, we can only
> > evaluate scripts.
>
> What's the difference of manipulating js objects and evaluating scripts?

The problem is that js objects need to be stored somewhere for the
livetime of the NPObject's. I've now assigned these to variables of
the embed DOM object. But that is of course a hack, as it exposes
internal stuff to the javascript of the container page.


> > Anyhow something for this must be there too I guess. Ie.runner
> > exposing objects on a 'public' interface and browser side exposing a
> > npruntime variant.
>
> Is this for the browser -> plugin communication?

runner exposing objects, yes. Javascript can call methods on the
plugin to eg. jump to a certain frame. Googled for this for flash
found
http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html
to give an idea. Note neither nsplugin nor this version does not support this.

> > > Hmm, aren't all the calls pretty much blocking in the native API?
> > > Or do you mean it is the only one returning something?
> >
> > I've used dbus_message_set_no_reply for all other cases. I thought
> > this will not block till it gets delivered at the destination. But I'm
> > not sure ..
>
> This flag allows the receipient of the message to not send a return message,
> though it is still allowed to do so.
> Non-blocking D-Bus calls are a matter of calling dbus_connection_send instead
> of its with_reply variant.

Ah yes, that is different too ..

> If the plugin API does not expect any kind of error it is more or less an
> implementation detail of the plugin runner. Might be helpful for debugging to
> wait for returns unless this really turns out to slow.

Roundtrip IPC is always slow :-) well at least on uni core systems.

There was also something with deadlocks IIRC that one shouldn't wait
for return values. I remember solving one case w/ DCOP where two calls
where made from two processes to each other at about the same time and
both waiting for each other to reply.
This is no ordinary client/server conversation.


Koos


> > > My suggestion, from the point of view of someone watching things on the
> > > xdg mailinglist, is to be a bit more agressive than the usual KDE way.
> > > For example by using bus names and interface names from the
> > > org.freedesktop "namespace", e.g. org.freedesktop.Browser.PluginHost
> > > instead of the "callback" interface, and trying to get the plugin
> > > runner(s) hosted at freedesktop.org
> >
> > That would be cool if you managed that. Let me know what I should change.
>
> I can offer to host any source archive on my freedesktop.org account, but I am
> not sure if there is a public area on the CVS repository where I could commit
> code.
>
> In the case of an official freedesktop.org project it should be created and
> spearheaded by someone with at least some under standing of this plugin
> business, i.e. not me :)
>
> Cheers,
> Kevin
>
> --
> Kevin Krammer, KDE developer, xdg-utils developer
> KDE user support, developer mentoring
>
>




More information about the kfm-devel mailing list