Commit Graph

25 Commits

Author SHA1 Message Date
Jasper St. Pierre
6a117ac12f browser-plugin: Rework scriptable method argument parsing and dispatch
Since we're going to move to a much more complicated (async!) solution
in a little bit, we're going to require a lot more machinery to handle
that. To help with that, let's rework invocation dispatch so that it's
more generic. Introduce a parse_args system similar to gjs_parse_args,
use X Macros to help with the repetitive parts of the method dispatch.
This shouldn't cause any API breaks, so API_VERSION should still be 4.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
67689f1a6d browser-plugin: Prevent a copy when checking for valid extension UUIDs
Instead of using g_strndup to copy the NPString that gets passed to us
by the plugin host, just use the equally-as-good NPString directly. We
still need to copy the string when passing it over DBus, as there's no
easy way to construct a string GVariant from a length-prefixed string.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
7da0f398a5 shellDBus: Split extensions API out into a separate DBus interface
The generic "Shell" interface was getting a bit too crowded.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
5e4edac14d browser-plugin: Fix Opera support
Opera now tries to call NP_SetWindow without trying to check
if it's a NULL pointer or not.

https://bugzilla.gnome.org/show_bug.cgi?id=672192
2012-05-29 18:57:05 -04:00
Jasper St. Pierre
ad6d986172 browser-plugin: Fix enable/disable
This code was broken at the last minute, and an accidentally stale plugin
copy kept it untested.

https://bugzilla.gnome.org/show_bug.cgi?id=676837
2012-05-29 14:36:16 -04:00
Jasper St. Pierre
031206cf1f extensionSystem: Remove now-unused version_tag, clean up other code as well
https://bugzilla.gnome.org/show_bug.cgi?id=676837
2012-05-25 18:25:51 -04:00
Jasper St. Pierre
9d3750b9b8 browser-plugin: Set the 'enabled-extensions' GSettings key directly
This way, we won't have to shuttle over DBus if we want to set an extension's
status outside of a GNOME Shell session.

https://bugzilla.gnome.org/show_bug.cgi?id=676837
2012-05-25 18:25:51 -04:00
Jasper St. Pierre
ecdd0875df browser-plugin: Make sure to initialize GType
While most browsers use GTK+ on GNOME in some fashion, Opera and
Konqueror do not. We need to explicitly initialize GType before
the browser plugin works properly.
2012-03-15 18:02:24 -04:00
Jasper St. Pierre
9400d8f6db browser-plugin: Correct check for checking the hostname/protocol
While it's extremely unlikely that document.location would not be an
object in the browser setting, this check is incorrect and we could
possibly crash an NPAPI host if this is the case.

https://bugzilla.gnome.org/show_bug.cgi?id=670489
2012-02-21 04:06:10 -05:00
Jasper St. Pierre
831099cca5 browser-plugin: Provide new APIs for launching extension preferences
Add two new APIs, "launchExtensionPrefs" to let SweetTooth let the user
launch the extension preferences tool directly from the browser. To allow
SweetTooth to check if an extension can be configured, add a new key to
the 'metadata', 'hasPrefs', which is returned by the GetExtensionInfo/
ListExtensions DBus methods.

https://bugzilla.gnome.org/show_bug.cgi?id=668429
2012-02-07 16:00:37 -05:00
Jasper St. Pierre
2c9e6bb589 browser-plugin: Fix the browser plugin
commit 26991988cb broke the browser plugin
by trying to reference a uninitialized pointer and making the NPAPI retain
a NULL object.

https://bugzilla.gnome.org/show_bug.cgi?id=668517
2012-01-30 19:26:50 -05:00
Jasper St. Pierre
26991988cb browser-plugin: Refactor plugin_object_set_property, and fix a bug
If the user did "obj.onchanged = 1;" or passed another sort of invalid type,
then we would clear the old listener as well as throw an exception.

https://bugzilla.gnome.org/show_bug.cgi?id=668517
2012-01-26 05:13:21 -05:00
Jasper St. Pierre
15563444cf browser-plugin: Fix callback for "onchange"
In the case that calling the listener fails, "result" may be uninitialized.
Sending NPAPI uninitialized memory is never a good idea.

https://bugzilla.gnome.org/show_bug.cgi?id=668517
2012-01-26 05:13:21 -05:00
Jasper St. Pierre
3bcdba6e1d browser-plugin: Add a new "onshellrestart" API
This function is something the client sets and is called whenever the Shell's
DBus name is acquired.

https://bugzilla.gnome.org/show_bug.cgi?id=668517
2012-01-26 05:13:21 -05:00
Jasper St. Pierre
c6e924f788 browser-plugin: Fix leak in plugin_enable_extension
https://bugzilla.gnome.org/show_bug.cgi?id=668541
2012-01-25 19:02:08 -05:00
Jasper St. Pierre
54afb7b25e browser-plugin: Fix installation on WebKit-like browsers
I missed this use of raw UTF8Characters last time. Hopefully this
should be the last fix required for WebKit support.

https://bugzilla.gnome.org/show_bug.cgi?id=666444
2011-12-18 18:29:55 -05:00
Jasper St. Pierre
02af8eb824 browser-plugin: Fix memory leak when passing an invalid UUID
https://bugzilla.gnome.org/show_bug.cgi?id=665261
2011-12-08 11:50:35 -05:00
Jürg Billeter
d5b4e30eb7 browser-plugin: Fix crash if shell is not running 2011-12-06 17:30:35 +01:00
Jasper St. Pierre
ab6a7773ce browser-plugin: Make sure to use the UTF8Length parameter
Some plugin hosts may have junk after the UTF8Characters that we need to strip
off. No current browsers that I know of do this, but it still helps to be
correct.
2011-12-04 10:31:04 -05:00
Jasper St. Pierre
363bd04166 browser-plugin: Move "entry points" comment
https://bugzilla.gnome.org/show_bug.cgi?id=663823
2011-11-12 13:38:36 -05:00
Jasper St. Pierre
9bc1a68fe4 browser-plugin: Use g_strndup to get a string property
WebKit-based browsers like Chromium and Epiphany may insert extra junk at the
end of NPStrings, so we cannot depend on the strlen matching.

https://bugzilla.gnome.org/show_bug.cgi?id=663823
2011-11-12 13:38:36 -05:00
Jasper St. Pierre
2c2729f7be browser-plugin: Set that we need XEmbed
This makes the plugin work under WebKit-based browsers such as Chromium and
Epiphany. See http://code.google.com/p/chromium/issues/detail?id=38229 and
WindowedCreatePlugin() in
http://src.chromium.org/viewvc/chrome/trunk/src/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc?revision=86823&content-type=text%2Fplain
for more information.

https://bugzilla.gnome.org/show_bug.cgi?id=663823
2011-11-12 13:38:36 -05:00
Vincent Untz
063f34b5d3 browser-plugin: Add support for BROWSER_PLUGIN_DIR environment variable
This makes it easy to override where the plugin should be installed.

This is based on what totem does.

https://bugzilla.gnome.org/show_bug.cgi?id=659123
2011-09-16 00:17:59 +02:00
Rico Tzschichholz
7b407dda91 browser-plugin: some buildsys fixes
* fix installation folder

* include headers files

* add Makefile to AC_CONFIG_FILES
2011-09-12 16:23:40 -04:00
Jasper St. Pierre
52273b6c03 Move sweettooth-plugin into gnome-shell tree, rebrand
This is a direct import from http://github.com/magcius/sweettooth-plugin .
All the source code is the same, as it had no branding. Everything else is
just renaming and modifying the "build system" to work with gnome-shell's
existing one.

https://bugzilla.gnome.org/show_bug.cgi?id=658070
2011-09-12 14:37:20 -04:00