diff options
author | Xan Lopez <xan@gnome.org> | 2007-07-28 04:27:56 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-07-28 04:27:56 +0800 |
commit | c75bf8633191306efc4120fd589d0c375f286e71 (patch) | |
tree | e573b99549ca95c38ef67c9dd5d53829cb545a30 /embed/mozilla/mozilla-embed-single.cpp | |
parent | ec7067fd30fe1bd5d0b69a648359d8085328f398 (diff) | |
download | gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.tar gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.tar.gz gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.tar.bz2 gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.tar.lz gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.tar.xz gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.tar.zst gsoc2013-epiphany-c75bf8633191306efc4120fd589d0c375f286e71.zip |
Add support for the WebKit engine, compile with --with-engine=webkit to
2007-07-27 Xan Lopez <xan@gnome.org>
* Makefile.am:
* configure.ac:
* doc/reference/Makefile.am:
* embed/Makefile.am:
* embed/ephy-embed-factory.c: (ephy_embed_factory_new_object):
* embed/ephy-embed-persist.c:
* embed/ephy-embed-shell.c:
* embed/ephy-embed.c:
* embed/webkit/Makefile.am:
* embed/webkit/webkit-embed-find.cpp:
* embed/webkit/webkit-embed-find.h:
* embed/webkit/webkit-embed-persist.cpp:
* embed/webkit/webkit-embed-persist.h:
* embed/webkit/webkit-embed-single.cpp:
* embed/webkit/webkit-embed-single.h:
* embed/webkit/webkit-embed.cpp:
* embed/webkit/webkit-embed.h:
* src/Makefile.am:
Add support for the WebKit engine, compile with
--with-engine=webkit to activate.
* embed/mozilla/mozilla-embed-single.cpp:
Move to the G_DEFINE_TYPE_WITH_CODE macro.
svn path=/trunk/; revision=7208
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 103 |
1 files changed, 13 insertions, 90 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 529ed1886..8930e1e9d 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -137,94 +137,19 @@ static void mozilla_embed_single_init (MozillaEmbedSingle *ges); static void ephy_certificate_manager_iface_init (EphyCertificateManagerIface *iface); #endif -static GObjectClass *parent_class = NULL; - -GType -mozilla_embed_single_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (MozillaEmbedSingleClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) mozilla_embed_single_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (MozillaEmbedSingle), - 0, /* n_preallocs */ - (GInstanceInitFunc) mozilla_embed_single_init - }; - - const GInterfaceInfo embed_single_info = - { - (GInterfaceInitFunc) ephy_embed_single_iface_init, - NULL, - NULL - }; - - const GInterfaceInfo cookie_manager_info = - { - (GInterfaceInitFunc) ephy_cookie_manager_iface_init, - NULL, - NULL - }; - - const GInterfaceInfo password_manager_info = - { - (GInterfaceInitFunc) ephy_password_manager_iface_init, - NULL, - NULL - }; - - const GInterfaceInfo permission_manager_info = - { - (GInterfaceInitFunc) ephy_permission_manager_iface_init, - NULL, - NULL - }; - +G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE, + ephy_embed_single_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER, + ephy_cookie_manager_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER, + ephy_password_manager_iface_init) #ifdef ENABLE_CERTIFICATE_MANAGER - const GInterfaceInfo certificate_manager_info = - { - (GInterfaceInitFunc) ephy_certificate_manager_iface_init, - NULL, - NULL - }; -#endif - - type = g_type_register_static (G_TYPE_OBJECT, - "MozillaEmbedSingle", - &our_info, - (GTypeFlags)0); - - g_type_add_interface_static (type, - EPHY_TYPE_EMBED_SINGLE, - &embed_single_info); - - g_type_add_interface_static (type, - EPHY_TYPE_COOKIE_MANAGER, - &cookie_manager_info); - - g_type_add_interface_static (type, - EPHY_TYPE_PASSWORD_MANAGER, - &password_manager_info); - - g_type_add_interface_static (type, - EPHY_TYPE_PERMISSION_MANAGER, - &permission_manager_info); -#ifdef ENABLE_CERTIFICATE_MANAGER - g_type_add_interface_static (type, - EPHY_TYPE_CERTIFICATE_MANAGER, - &certificate_manager_info); + G_IMPLEMENT_INTERFACE (EPHY_TYPE_CERTIFICATE_MANAGER, + ephy_certificate_manager_iface_init) #endif - } - - return type; -} + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER, + ephy_permission_manager_iface_init)) static gboolean mozilla_set_default_prefs (MozillaEmbedSingle *mes) @@ -739,7 +664,7 @@ mozilla_embed_single_dispose (GObject *object) priv->mSingleObserver = nsnull; } - parent_class->dispose (object); + G_OBJECT_CLASS (mozilla_embed_single_parent_class)->dispose (object); } static void @@ -749,7 +674,7 @@ mozilla_embed_single_finalize (GObject *object) /* Destroy EphyEmbedSingle before because some * services depend on xpcom */ - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (mozilla_embed_single_parent_class)->finalize (object); mozilla_notifiers_shutdown (); @@ -1363,8 +1288,6 @@ mozilla_embed_single_class_init (MozillaEmbedSingleClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = (GObjectClass *) g_type_class_peek_parent (klass); - object_class->dispose = mozilla_embed_single_dispose; object_class->finalize = mozilla_embed_single_finalize; object_class->get_property = mozilla_embed_single_get_property; |