aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-session.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-05-06 22:47:19 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-06-21 19:54:16 +0800
commit97c91b2fc2059b1e358bb19896203afaa44bfd33 (patch)
tree6aa01250a99fa884d177ce3202d8ff41e8e96d74 /src/ephy-session.c
parenta8767266443074689200fff9ca43531d88d65aed (diff)
downloadgsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.gz
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.bz2
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.lz
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.xz
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.tar.zst
gsoc2013-epiphany-97c91b2fc2059b1e358bb19896203afaa44bfd33.zip
Initial WebKit2 port
It builds and basic functionality works.
Diffstat (limited to 'src/ephy-session.c')
-rw-r--r--src/ephy-session.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 70af83ca7..82db6f17d 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -128,6 +128,9 @@ session_delete (EphySession *session,
g_object_unref (file);
}
+#ifdef HAVE_WEBKIT2
+/* TODO: Loader */
+#else
static void
load_status_notify_cb (EphyWebView *view,
GParamSpec *pspec,
@@ -142,6 +145,7 @@ load_status_notify_cb (EphyWebView *view,
status == WEBKIT_LOAD_FINISHED)
ephy_session_save (session, SESSION_STATE);
}
+#endif
static void
notebook_page_added_cb (GtkWidget *notebook,
@@ -149,8 +153,12 @@ notebook_page_added_cb (GtkWidget *notebook,
guint position,
EphySession *session)
{
+#ifdef HAVE_WEBKIT2
+ /* TODO: Loader */
+#else
g_signal_connect (ephy_embed_get_web_view (embed), "notify::load-status",
G_CALLBACK (load_status_notify_cb), session);
+#endif
}
static void
@@ -161,9 +169,13 @@ notebook_page_removed_cb (GtkWidget *notebook,
{
ephy_session_save (session, SESSION_STATE);
+#ifdef HAVE_WEBKIT2
+ /* TODO: Loader */
+#else
g_signal_handlers_disconnect_by_func
(ephy_embed_get_web_view (embed), G_CALLBACK (load_status_notify_cb),
session);
+#endif
}
static void
@@ -325,7 +337,11 @@ session_command_open_uris (EphySession *session,
{
const char *url = uris[i];
EphyNewTabFlags page_flags;
+#ifdef HAVE_WEBKIT2
+ WebKitURIRequest *request = NULL;
+#else
WebKitNetworkRequest *request = NULL;
+#endif
if (url[0] == '\0')
{
@@ -334,7 +350,11 @@ session_command_open_uris (EphySession *session,
else
{
page_flags = EPHY_NEW_TAB_OPEN_PAGE;
+#ifdef HAVE_WEBKIT2
+ request = webkit_uri_request_new (url);
+#else
request = webkit_network_request_new (url);
+#endif
}
/* For the first URI, if we have a valid recovery