Index: src/ephy-seed-extension.h
===================================================================
--- src/ephy-seed-extension.h	(revision 0)
+++ src/ephy-seed-extension.h	(revision 0)
@@ -0,0 +1,60 @@
+/*
+ *  Copyright © 2009, Robert Carr <carrr@rpi.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if !defined (__EPHY_EPIPHANY_H_INSIDE__) && !defined (EPIPHANY_COMPILATION)
+#error "Only <epiphany/epiphany.h> can be included directly."
+#endif
+
+#ifndef EPHY_SEED_EXTENSION_H
+#define EPHY_SEED_EXTENSION_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EPHY_TYPE_SEED_EXTENSION		(ephy_seed_extension_get_type ())
+#define EPHY_SEED_EXTENSION(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SEED_EXTENSION, EphySeedExtension))
+#define EPHY_SEED_EXTENSION_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SEED_EXTENSION, EphySeedExtensionClass))
+#define EPHY_IS_SEED_EXTENSION(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SEED_EXTENSION))
+#define EPHY_IS_SEED_EXTENSION_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SEED_EXTENSION))
+#define EPHY_SEED_EXTENSION_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SEED_EXTENSION, EphySeedExtensionClass))
+
+typedef struct _EphySeedExtension		EphySeedExtension;
+typedef struct _EphySeedExtensionClass	EphySeedExtensionClass;
+typedef struct _EphySeedExtensionPrivate	EphySeedExtensionPrivate;
+
+struct _EphySeedExtensionClass
+{
+	GObjectClass parent_class;
+};
+
+struct _EphySeedExtension
+{
+	GObject parent_instance;
+
+	/*< private >*/
+	EphySeedExtensionPrivate *priv;
+};
+
+GType	ephy_seed_extension_get_type		(void);
+
+G_END_DECLS
+
+#endif
Index: src/ephy-extensions-manager.c
===================================================================
--- src/ephy-extensions-manager.c	(revision 8753)
+++ src/ephy-extensions-manager.c	(working copy)
@@ -60,6 +60,10 @@
 #include "ephy-python-loader.h"
 #endif
 
+#ifdef ENABLE_SEED
+#include "ephy-seed-loader.h"
+#endif
+
 #define CONF_LOADED_EXTENSIONS	"/apps/epiphany/general/active_extensions"
 #define EE_GROUP		"Epiphany Extension"
 #define DOT_INI			".ephy-extension"
@@ -593,6 +597,20 @@
 #endif
 	}
 
+#ifdef ENABLE_SEED
+	if (strcmp (type, "seed") == 0)
+	{
+		info = g_new (LoaderInfo, 1);
+		info->type = g_strdup (type);
+		info->loader = g_object_new (EPHY_TYPE_SEED_LOADER, NULL);
+
+		manager->priv->factories =
+				g_list_append (manager->priv->factories, info);
+
+		return g_object_ref (info->loader);
+		return NULL;
+	}
+#endif
 	shlib_loader = get_loader_for_type (manager, "shlib");
 	g_return_val_if_fail (shlib_loader != NULL, NULL);
 
Index: src/ephy-main.c
===================================================================
--- src/ephy-main.c	(revision 8753)
+++ src/ephy-main.c	(working copy)
@@ -45,6 +45,8 @@
 #include <errno.h>
 #include <string.h>
 
+#include <girepository.h>
+
 #ifdef HAVE_LIBNOTIFY
 #include <libnotify/notify.h>
 #endif
@@ -55,6 +57,8 @@
 static gboolean open_in_new_tab = FALSE;
 static gboolean open_in_new_window = FALSE;
 static gboolean open_as_bookmarks_editor = FALSE;
+
+static gchar *introspect_dump = NULL;
 /*static gboolean reload_plugins = FALSE;*/
 
 static char *session_filename = NULL;
@@ -101,6 +105,8 @@
 	  "", N_("URL …")},
 	{ "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN, 
 	  G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
+	{ "introspect-dump", 0, G_OPTION_FLAG_HIDDEN, 
+	  G_OPTION_ARG_STRING, &introspect_dump, NULL, NULL },
 	{ NULL }
 };
 
@@ -586,6 +592,14 @@
         
         g_option_context_free (option_context);
 
+		if (introspect_dump)
+		{
+			g_irepository_dump (introspect_dump, NULL);
+			return 0;
+		}
+
+
+
 	/* Some argument sanity checks*/
 	if (arguments != NULL && (session_filename != NULL || open_as_bookmarks_editor))
 	{
Index: src/ephy-seed-loader.c
===================================================================
--- src/ephy-seed-loader.c	(revision 0)
+++ src/ephy-seed-loader.c	(revision 0)
@@ -0,0 +1,108 @@
+/*
+ *  Copyright © 2009, Robert Carr <carrr@rpi.edu>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+
+#include "ephy-seed-loader.h"
+#include "ephy-seed-extension.h"
+#include "ephy-loader.h"
+#include "ephy-debug.h"
+
+#include <seed.h>
+
+#define EPHY_SEED_LOADER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_SEED_LOADER, EphySeedLoaderPrivate))
+
+struct _EphySeedLoaderPrivate
+{
+	gpointer dummy;
+};
+
+static GObject *
+impl_get_object (EphyLoader *eloader,
+		 GKeyFile *keyfile)
+{
+	char *filename;
+	GObject *object;
+
+	g_return_val_if_fail (keyfile != NULL, NULL);
+
+	filename = g_key_file_get_string (keyfile, "Loader", "Module", NULL);
+	if (filename == NULL)
+	{
+		g_warning ("NULL module name!\n");
+		return NULL;
+	}
+
+	object = g_object_new (EPHY_TYPE_SEED_EXTENSION,
+			       "filename", filename,
+			       NULL);
+
+	g_free (filename);
+
+	/* we own one ref */
+	return g_object_ref (object);
+}
+
+static void
+impl_release_object (EphyLoader *eloader,
+		     GObject *object)
+{
+	g_return_if_fail (object != NULL);
+
+	g_object_unref (object);
+}
+
+static void
+ephy_seed_loader_iface_init (EphyLoaderIface *iface)
+{
+	iface->type = "seed";
+	iface->get_object = impl_get_object;
+	iface->release_object = impl_release_object;
+}
+
+G_DEFINE_TYPE_WITH_CODE (EphySeedLoader, ephy_seed_loader, G_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (EPHY_TYPE_LOADER, ephy_seed_loader_iface_init))
+
+static void
+ephy_seed_loader_init (EphySeedLoader *loader)
+{
+	loader->priv = EPHY_SEED_LOADER_GET_PRIVATE (loader);
+
+	LOG ("EphySeedLoader initialising");
+
+}
+
+static void
+ephy_seed_loader_finalize (GObject *object)
+{
+	LOG ("EphySeedLoader finalising");
+
+	G_OBJECT_CLASS (ephy_seed_loader_parent_class)->finalize (object);
+}
+
+static void
+ephy_seed_loader_class_init (EphySeedLoaderClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	object_class->finalize = ephy_seed_loader_finalize;
+
+	g_type_class_add_private (object_class, sizeof (EphySeedLoaderPrivate));
+}
+
Index: src/ephy-seed-loader.h
===================================================================
--- src/ephy-seed-loader.h	(revision 0)
+++ src/ephy-seed-loader.h	(revision 0)
@@ -0,0 +1,60 @@
+/*
+ *  Copyright Robert Carr, <carrr@rpi.edu> 2009
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if !defined (__EPHY_EPIPHANY_H_INSIDE__) && !defined (EPIPHANY_COMPILATION)
+#error "Only <epiphany/epiphany.h> can be included directly."
+#endif
+
+#ifndef EPHY_SEED_LOADER_H
+#define EPHY_SEED_LOADER_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EPHY_TYPE_SEED_LOADER		(ephy_seed_loader_get_type ())
+#define EPHY_SEED_LOADER(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SEED_LOADER, EphySeedLoader))
+#define EPHY_SEED_LOADER_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SEED_LOADER, EphySeedLoaderClass))
+#define EPHY_IS_SEED_LOADER(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SEED_LOADER))
+#define EPHY_IS_SEED_LOADER_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SEED_LOADER))
+#define EPHY_SEED_LOADER_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SEED_LOADER, EphySeedLoaderClass))
+
+typedef struct _EphySeedLoader	EphySeedLoader;
+typedef struct _EphySeedLoaderClass	EphySeedLoaderClass;
+typedef struct _EphySeedLoaderPrivate	EphySeedLoaderPrivate;
+
+struct _EphySeedLoaderClass
+{
+	GObjectClass parent_class;
+};
+
+struct _EphySeedLoader
+{
+	GObject parent_instance;
+
+	/*< private >*/
+	EphySeedLoaderPrivate *priv;
+};
+
+GType	ephy_seed_loader_get_type		(void);
+
+G_END_DECLS
+
+#endif /* !EPHY_SEED_LOADER_H */
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 8753)
+++ src/Makefile.am	(working copy)
@@ -11,7 +11,10 @@
 bin_PROGRAMS = epiphany
 
 EXTRA_DIST =
+BUILT_GIRSOURCES = 
 
+
+
 headerdir = $(prefix)/include/epiphany/$(EPIPHANY_MAJOR)/epiphany
 header_DATA = \
 	ephy-type-builtins.h	\
@@ -116,7 +119,8 @@
 	$(DEPENDENCIES_CFLAGS) 	\
 	$(DBUS_CFLAGS)		\
 	$(WEBKIT_CFLAGS)	\
-	$(AM_CFLAGS)
+	$(AM_CFLAGS)		\
+	$(SEED_CFLAGS)
 
 if ENABLE_NETWORK_MANAGER
 libephymain_la_SOURCES += \
@@ -124,6 +128,19 @@
 	ephy-net-monitor.h
 endif
 
+if ENABLE_SEED
+NOINST_H_FILES += \
+	ephy-seed-extension.h	\
+	ephy-seed-loader.h
+
+libephymain_la_SOURCES +=	\
+	ephy-seed-loader.c		\
+	ephy-seed-extension.c
+
+libephymain_la_LIBADD =	\
+	$(SEED_LIBS)
+endif
+
 if ENABLE_PYTHON
 NOINST_H_FILES += \
 	ephy-python.h		\
@@ -492,6 +509,62 @@
 	@echo "$(BINDING_HEADERS_ALL_UNKNOWN)"
 	@test -z "$(BINDING_HEADERS_ALL_UNKNOWN)"
 
+
+EPHY_GIR_H = 	../embed/ephy-command-manager.h		\					../embed/ephy-cookie-manager.h		\
+		../embed/ephy-embed-event.h		\
+		../embed/ephy-embed-factory.h		\
+		../embed/ephy-embed.h			\
+		../embed/ephy-embed-persist.h		\
+		../embed/ephy-embed-shell.h		\
+		../embed/ephy-embed-single.h		\
+		../embed/ephy-favicon-cache.h		\
+		../embed/ephy-history.h			\
+		../embed/ephy-password-manager.h		\
+		../embed/ephy-permission-manager.h		\
+		../lib/ephy-dialog.h			\
+		../lib/ephy-node-db.h			\
+		../lib/ephy-node.h				\
+		../lib/ephy-state.h			\
+		../lib/egg/egg-editable-toolbar.h		\
+		../lib/egg/egg-toolbars-model.h		\
+		../lib/widgets/ephy-search-entry.h		\
+		../lib/widgets/ephy-spinner.h		\
+		../src/bookmarks/ephy-bookmarks.h		\
+		../src/ephy-extension.h			\
+		../src/ephy-extensions-manager.h		\
+		../src/ephy-find-toolbar.h			\
+		../src/ephy-link-action.h			\
+		../src/ephy-link.h				\
+		../src/ephy-location-action.h		\
+		../src/ephy-notebook.h			\
+		../src/ephy-session.h			\
+		../src/ephy-shell.h			\
+		../src/ephy-statusbar.h			\
+		../src/ephy-toolbar.h			\
+		../src/ephy-window.h
+
+Epiphany-1.0.gir: epiphany $(G_IR_SCANNER)
+	$(G_IR_SCANNER) -v --namespace Epiphany --nsversion=2.0 \
+		--add-include-path=. --add-include-path=. \
+		--include=Gtk-2.0 \
+		--include=libxml2-2.0 \
+		--program=./epiphany \
+		--output $@ \
+		--pkg epiphany-2.25 \
+		$(EPHY_GIR_H)
+
+girdir = $(GIRDIR)
+dist_gir_DATA = Epiphany-1.0.gir
+
+typelibsdir = $(TYPELIBDIR)
+typelibs_DATA = Epiphany-1.0.typelib
+
+Epiphany-1.0.typelib: Epiphany-1.0.gir $(G_IR_COMPILER)
+	g-ir-compiler Epiphany-1.0.gir -o Epiphany-1.0.typelib
+
+EXTRA_DIST += Epiphany-1.0.gir
+
+
 #check-local: check-python-binding
 
 endif
Index: src/ephy-seed-extension.c
===================================================================
--- src/ephy-seed-extension.c	(revision 0)
+++ src/ephy-seed-extension.c	(revision 0)
@@ -0,0 +1,274 @@
+/*
+ *  Copyright © 2009, Robert Carr
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <seed.h>
+
+#include "config.h"
+
+#include "ephy-seed-extension.h"
+
+#include "ephy-extension.h"
+#include "ephy-window.h"
+#include "ephy-file-helpers.h"
+#include "ephy-debug.h"
+
+SeedEngine * global_eng = NULL;
+
+static void ephy_seed_extension_iface_init (EphyExtensionIface *iface);
+
+#define EPHY_SEED_EXTENSION_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_SEED_EXTENSION, EphySeedExtensionPrivate))
+
+struct _EphySeedExtensionPrivate
+{
+  char *filename;
+	
+  SeedContext ctx;
+  SeedObject obj;
+};
+
+enum
+  {
+    PROP_0,
+    PROP_FILENAME
+  };
+
+static void
+ephy_seed_extension_init (EphySeedExtension *extension)
+{
+  LOG ("EphySeedExtension initialising");
+
+  extension->priv = EPHY_SEED_EXTENSION_GET_PRIVATE (extension);
+}
+
+static void
+call_seed_func (EphyExtension *extension,
+		const char *func_name,
+		EphyWindow *window,
+		EphyEmbed *embed) /* HACK: tab may be NULL */
+{
+  EphySeedExtension *seed_ext;
+  EphySeedExtensionPrivate *priv;
+  SeedObject function;
+  SeedException exception = NULL;
+  SeedValue args[2];
+	
+  seed_ext = EPHY_SEED_EXTENSION (extension);
+  priv = seed_ext->priv;
+
+  if (priv->obj == NULL || seed_value_is_null(priv->ctx, priv->obj))
+    return;
+	
+  function = seed_object_get_property(priv->ctx, priv->obj, func_name);
+  
+  if (!seed_value_is_function(priv->ctx, function))
+    return;
+	
+  args[0] = seed_value_from_object(priv->ctx, G_OBJECT(window), exception);
+  if (embed != NULL)
+    args[1] = seed_value_from_object(priv->ctx, G_OBJECT(embed), exception);
+	
+  seed_object_call(global_eng->context, function, NULL, embed == NULL ? 1 : 2,
+		   args, &exception);
+  if (exception)
+    printf("seed_exception: %s \n", seed_exception_to_string(priv->ctx, exception));
+	
+}
+
+static void
+impl_attach_tab (EphyExtension *extension,
+		 EphyWindow *window,
+		 EphyEmbed *embed)
+{
+  call_seed_func (extension, "attach_tab", window, embed);
+}
+
+static void
+impl_detach_tab (EphyExtension *extension,
+		 EphyWindow *window,
+		 EphyEmbed *embed)
+{
+  call_seed_func (extension, "detach_tab", window, embed);
+}
+
+static void
+impl_attach_window (EphyExtension *extension,
+		    EphyWindow *window)
+{
+  call_seed_func (extension, "attach_window", window, NULL);
+}
+
+static void
+impl_detach_window (EphyExtension *extension,
+		    EphyWindow *window)
+{
+  call_seed_func (extension, "detach_window", window, NULL);
+}
+
+static void
+ephy_seed_extension_iface_init (EphyExtensionIface *iface)
+{
+  iface->attach_tab = impl_attach_tab;
+  iface->detach_tab = impl_detach_tab;
+  iface->attach_window = impl_attach_window;
+  iface->detach_window = impl_detach_window;
+}
+
+G_DEFINE_TYPE_WITH_CODE (EphySeedExtension, ephy_seed_extension, G_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (EPHY_TYPE_EXTENSION,
+                                                ephy_seed_extension_iface_init))
+static gchar *
+ephy_seed_extension_get_file (const gchar * name)
+{
+  gchar *dot_dir, *dot_path, *system_path, *absolute, *dirname;
+
+  dot_dir = g_strconcat (ephy_dot_dir (), "/extensions", NULL);
+  dot_path = g_strconcat (dot_dir, "/", name, ".js", NULL);  
+  if (g_file_test (dot_path, G_FILE_TEST_EXISTS))
+    {
+      g_free (dot_dir);
+      return dot_path;
+    }
+  g_free (dot_dir);
+  
+  system_path = g_strconcat (EXTENSIONS_DIR, name);
+  if (g_file_test (system_path, G_FILE_TEST_EXISTS))
+    {
+      return system_path;
+    }
+  g_free (system_path);
+  
+  dirname = g_path_get_dirname (name);
+  if (g_path_is_absolute (dirname))
+    {
+      g_free(dirname);
+      return name;
+    }
+  g_free(dirname);
+
+  return NULL;
+}
+
+static GObject *
+ephy_seed_extension_constructor (GType type,
+				 guint n_construct_properties,
+				 GObjectConstructParam *construct_params)
+{
+  SeedScript *script;
+  GObject *object;
+  EphySeedExtension *ext;
+
+  object =
+    G_OBJECT_CLASS (ephy_seed_extension_parent_class)->constructor (type,
+						  n_construct_properties,
+							construct_params);
+
+  ext = EPHY_SEED_EXTENSION (object);
+  
+  if (ext->priv->filename)
+    script = seed_script_new_from_file(global_eng->context,
+				       ext->priv->filename);
+	
+  ext->priv->ctx = seed_context_create(global_eng->group, NULL);
+  ext->priv->obj = seed_evaluate(global_eng->context,
+				 script,
+				 NULL);
+  
+  if (seed_script_exception(script))
+    g_warning("seed_exception: %s", 
+	      seed_exception_to_string(global_eng->context,
+				       seed_script_exception(script)));
+	
+
+  return object;
+}
+
+static void
+ephy_seed_extension_finalize (GObject *object)
+{
+  EphySeedExtension *extension =
+    EPHY_SEED_EXTENSION (object);
+
+  seed_value_unprotect(extension->priv->ctx,
+		       extension->priv->obj);
+  seed_context_unref(extension->priv->ctx);
+
+  G_OBJECT_CLASS (ephy_seed_extension_parent_class)->finalize (object);
+}
+
+static void
+ephy_seed_extension_get_property (GObject *object,
+				  guint prop_id,
+				  GValue *value,
+				  GParamSpec *pspec)
+{
+  /* no readable properties */
+  g_return_if_reached ();
+}
+
+static void
+ephy_seed_extension_set_property (GObject *object,
+				  guint prop_id,
+				  const GValue *value,
+				  GParamSpec *pspec)
+{
+  EphySeedExtension *ext = EPHY_SEED_EXTENSION (object);
+
+  switch (prop_id)
+    {
+    case PROP_FILENAME:
+      ext->priv->filename = 
+	ephy_seed_extension_get_file(g_value_get_string (value));
+      break;
+    default:
+      g_return_if_reached ();
+    }
+}
+
+static void
+ephy_seed_extension_class_init (EphySeedExtensionClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = ephy_seed_extension_finalize;
+  object_class->constructor = ephy_seed_extension_constructor;
+  object_class->get_property = ephy_seed_extension_get_property;
+  object_class->set_property = ephy_seed_extension_set_property;
+
+  g_object_class_install_property
+    (object_class,
+     PROP_FILENAME,
+     g_param_spec_string ("filename",
+			  "Filename",
+			  "Filename",
+			  NULL,
+			  G_PARAM_WRITABLE | G_PARAM_STATIC_NAME | 
+			  G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
+			  G_PARAM_CONSTRUCT_ONLY));
+
+  g_type_class_add_private (object_class, sizeof (EphySeedExtensionPrivate));
+
+  if (global_eng == NULL)
+    {
+      global_eng = seed_init(NULL, NULL);
+      seed_simple_evaluate(global_eng->context,
+			   "Seed.import_namespace('Gtk');"
+			   "Seed.import_namespace('Epiphany');");
+    }
+}
+
Index: extensions/close-multiple-tabs-extension/close-multiple-tabs.js
===================================================================
--- extensions/close-multiple-tabs-extension/close-multiple-tabs.js	(revision 0)
+++ extensions/close-multiple-tabs-extension/close-multiple-tabs.js	(revision 0)
@@ -0,0 +1,27 @@
+var delete_event = function (window, event)
+{
+	var n = window.get_notebook();
+	if(n.get_n_pages() <= 1)
+		return false;
+	
+	var dialog = new Gtk.MessageDialog({text:"You are about to close a window with " + n.get_n_pages() + " open tabs.", message_type:Gtk.MessageType.WARNING });
+	dialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL).grab_focus();
+	dialog.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK);
+	dialog.set_default_response(Gtk.ResponseType.CANCEL);
+	
+	var result = dialog.run();
+	dialog.hide();
+	dialog.destroy();
+	
+	if(result == Gtk.ResponseType.OK)
+		return false;
+	else
+		return true;
+}
+
+extension = {
+    attach_window: function(window)
+	{
+		signal = window.signal.delete_event.connect(delete_event);
+	}
+}
Index: extensions/close-multiple-tabs-extension/close-multiple-tabs.ephy-extension
===================================================================
--- extensions/close-multiple-tabs-extension/close-multiple-tabs.ephy-extension	(revision 0)
+++ extensions/close-multiple-tabs-extension/close-multiple-tabs.ephy-extension	(revision 0)
@@ -0,0 +1,11 @@
+[Epiphany Extension]
+Name=Don't Close Multiple Tabs
+Description=Warns the user before closing a window containing multiple open tabs.
+Authors=Tim Horton
+Version=1
+URL=
+
+
+[Loader]
+Type=seed
+Module=close-multiple-tabs
Index: extensions/example-extension/seed.js
===================================================================
--- extensions/example-extension/seed.js	(revision 0)
+++ extensions/example-extension/seed.js	(revision 0)
@@ -0,0 +1,22 @@
+Seed.import_namespace("Gtk");
+
+extension = {
+    attach_tab: function(window, tab)
+	{
+	},
+	detach_tab: function(window, tab)
+	{
+	},
+    attach_window: function(window)
+	{
+		w = new Gtk.Window();
+		Seed.print(w);
+
+
+		w.show_all();
+
+	},
+	detach_window: function(window)
+	{
+	}
+}
Index: extensions/example-extension/seed.ephy-extension
===================================================================
--- extensions/example-extension/seed.ephy-extension	(revision 0)
+++ extensions/example-extension/seed.ephy-extension	(revision 0)
@@ -0,0 +1,11 @@
+[Epiphany Extension]
+Name=Seed
+Description=Seed
+Authors=Robert Carr
+Version=1
+URL=
+
+
+[Loader]
+Type=seed
+Module=seed
Index: extensions/reopen-closed-tab-queue/reopen-closed-tab-queue.js
===================================================================
--- extensions/reopen-closed-tab-queue/reopen-closed-tab-queue.js	(revision 0)
+++ extensions/reopen-closed-tab-queue/reopen-closed-tab-queue.js	(revision 0)
@@ -0,0 +1,56 @@
+Seed.import_namespace("Gtk");
+Seed.import_namespace("Gdk");
+Seed.import_namespace("WebKit");
+Seed.import_namespace("Epiphany");
+
+var last_closed_urls = [ ];
+var shell = Epiphany.EphyShell.get_default();
+
+var key_pressed = function (window, event)
+{
+	if(event.key.state & Gdk.ModifierType.CONTROL_MASK &&
+	   event.key.state & Gdk.ModifierType.SHIFT_MASK)
+	{
+		if(event.key.keyval == 84) // Ctrl-Shift-T
+		{
+			var embed = window.get_active_child();
+			
+			var new_url = last_closed_urls.pop();
+			
+			if(new_url != null)
+				var new_tab = new Epiphany.EphyShell.tab(shell, window, embed,
+								new_url,
+								Epiphany.EphyNewTabFlags.OPEN_PAGE |
+								Epiphany.EphyNewTabFlags.IN_EXISTING_WINDOW |
+								Epiphany.EphyNewTabFlags.JUMP);
+		}
+	}
+	
+	return false;
+}
+
+extension = {
+	attach_tab: function(window, tab)
+	{
+	
+	},
+	detach_tab: function(window, tab)
+	{
+		var embed;
+		
+		if(tab.get_embed != null)
+			embed = tab.get_embed();
+		else
+			embed = tab;
+		
+		last_closed_urls.push(embed.get_location());
+	},
+	attach_window: function(window)
+	{
+		window.signal.key_press_event.connect(key_pressed);
+	},
+	detach_window: function(window)
+	{
+
+	}
+}
Index: extensions/reopen-closed-tab-queue/reopen-closed-tab-queue.ephy-extension
===================================================================
--- extensions/reopen-closed-tab-queue/reopen-closed-tab-queue.ephy-extension	(revision 0)
+++ extensions/reopen-closed-tab-queue/reopen-closed-tab-queue.ephy-extension	(revision 0)
@@ -0,0 +1,11 @@
+[Epiphany Extension]
+Name=Reopen Closed Tabs Queue
+Description=Use Ctrl-Shift-T to reopen, one by one, the tabs you recently closed.
+Authors=Tim Horton
+Version=1
+URL=
+
+
+[Loader]
+Type=seed
+Module=reopen-closed-tab-queue
Index: configure.ac
===================================================================
--- configure.ac	(revision 8753)
+++ configure.ac	(working copy)
@@ -16,7 +16,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 
 m4_define([epiphany_version_major],[2])
-m4_define([epiphany_version_minor],[27])
+m4_define([epiphany_version_minor],[25])
 m4_define([epiphany_version_micro],[0])
 m4_define([epiphany_version],[epiphany_version_major.epiphany_version_minor.epiphany_version_micro])
 
@@ -33,13 +33,13 @@
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_SRCDIR([configure.ac])
 
-EPIPHANY_API_VERSION=2.27
+EPIPHANY_API_VERSION=2.23
 
 # This should stay at the major version of the latest stable releases
 EPIPHANY_UA_VERSION=2.22
 
 AC_SUBST([EPIPHANY_MAJOR],[epiphany_version_major.epiphany_version_minor])
-AC_SUBST([EPIPHANY_API_VERSION])
+AC_SUBST([EPIPHANY_API_VERSION],[epiphany_version_major.epiphany_version_minor])
 AC_SUBST([EPIPHANY_UA_VERSION])
 
 # for EPHY_CHECK_VERSION
@@ -142,6 +142,7 @@
 		  libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED
 		  $LIBNOTIFY_PACKAGE
 		  webkit-1.0 >= $WEBKIT_GTK_REQUIRED
+		  gobject-introspection-1.0
 		  ])
 AC_SUBST([DEPENDENCIES_CFLAGS])
 AC_SUBST([DEPENDENCIES_LIBS])
@@ -211,12 +212,71 @@
 
 AC_CHECK_HEADERS([X11/XF86keysym.h])
 
+EPIPHANY_FEATURES=
+
 # ******
+# Seed
+# ******
+
+AC_MSG_CHECKING([whether Seed support is requested])
+AC_ARG_ENABLE([seed],
+	AS_HELP_STRING([--enable-seed],[Enable Seed support]),
+	[enable_seed=$enableval have_seed=$enableval],
+	[enable_seed=autodetect have_seed=yes])
+
+AC_MSG_RESULT([$enable_seed])
+
+PKG_CHECK_MODULES([SEED], [seed], [], [have_seed=no])
+
+if test x"$have_seed" != x"yes" ; then
+	enable_seed="no"
+fi
+
+if test x"$enable_seed" != x"no" ; then
+	
+	if test x"$have_seed" != x"no" ; then
+		enable_seed="yes"
+	fi
+fi
+
+AM_CONDITIONAL(ENABLE_SEED, test "x$enable_seed" = "xyes")
+
+if test x"$enable_seed" == x"yes" ; then	
+	AC_SUBST([SEED_CFLAGS])
+	AC_SUBST([SEED_LIBS])
+	EPIPHANY_FEATURES="$EPIPHANY_FEATURES seed"
+	AC_DEFINE([ENABLE_SEED],[1],[Define to compile with Seed support])
+fi
+
+#
+# Checks for GObject Introspection
+#
+have_introspection=false
+PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.6.2, have_introson=true, have_introspection=false)
+AM_CONDITIONAL(HAVE_INTROSPECTION, $have_introspection)
+
+G_IR_SCANNER=
+G_IR_COMPILER=
+G_IR_GENERATE=
+GIRDIR=
+TYPELIBDIR=
+if test $have_introspection; then
+  G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+  G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+  G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+  GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+  TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+fi
+AC_SUBST(G_IR_SCANNER)
+AC_SUBST(G_IR_COMPILER)
+AC_SUBST(G_IR_GENERATE)
+AC_SUBST(GIRDIR)
+AC_SUBST(TYPELIBDIR) 
+
+# ******
 # Python
 # ******
 
-EPIPHANY_FEATURES=
-
 AC_MSG_CHECKING([whether Python support is requested])
 
 AC_ARG_ENABLE([python],
@@ -563,5 +623,6 @@
  	Zeroconf bookmarks support : $enable_zeroconf
  	NetworkManager support     : $enable_network_manager
  	Python support             : $enable_python
+ 	Seed support               : $enable_seed
  	Build tests                : $enable_tests
 "
Index: embed/ephy-embed-event.h
===================================================================
--- embed/ephy-embed-event.h	(revision 8753)
+++ embed/ephy-embed-event.h	(working copy)
@@ -75,7 +75,7 @@
 
 GType			ephy_embed_event_context_get_type	(void);
 
-GType			ephy_embed_event_type_get_type 		(void);
+GType			ephy_embed_event_get_type 		(void);
 
 EphyEmbedEventContext	ephy_embed_event_get_context	(EphyEmbedEvent *event);
 
Index: embed/ephy-embed.h
===================================================================
--- embed/ephy-embed.h	(revision 8753)
+++ embed/ephy-embed.h	(working copy)
@@ -222,8 +222,6 @@
 
 GType		  ephy_embed_chrome_get_type		(void);
 
-GType		  ephy_embed_ppv_navigation_get_type	(void);
-
 GType		  ephy_embed_security_level_get_type	(void);
 
 GType		  ephy_embed_document_type_get_type	(void);
