aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@gnome.org>2009-01-15 04:41:38 +0800
committerGustavo Noronha Silva <kov@debian.org>2009-05-30 00:15:59 +0800
commit8f4747aa1731acf83f1bd7249b392d0cded08c4b (patch)
tree1d23aed00b5e112df3738ac1becee5dde83ee61b /embed
parent682bbd135a3cde308e5c067892ad43e2dcecb44f (diff)
downloadgsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.tar
gsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.tar.gz
gsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.tar.bz2
gsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.tar.lz
gsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.tar.xz
gsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.tar.zst
gsoc2013-epiphany-8f4747aa1731acf83f1bd7249b392d0cded08c4b.zip
Provide API to loading using WebKitNetworkRequest
As the first API adition to out WebKitWebView subclass, we allow Epiphany code to use a WebKitNetworkRequest to load pages. This way we can use the full request information, not just the URI.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c19
-rw-r--r--embed/ephy-web-view.h3
2 files changed, 22 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index f5a1dbf57..1aade87ee 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -55,3 +55,22 @@ ephy_web_view_new (void)
return GTK_WIDGET (g_object_new (EPHY_TYPE_WEB_VIEW, NULL));
}
+/**
+ * ephy_web_view_load_request:
+ * @web_view: the #EphyWebView in which to load the request
+ * @request: the #WebKitNetworkRequest to be loaded
+ *
+ * Loads the given #WebKitNetworkRequest in the given #EphyWebView.
+ **/
+void
+ephy_web_view_load_request (EphyWebView *web_view,
+ WebKitNetworkRequest *request)
+{
+ WebKitWebFrame *main_frame;
+
+ g_return_if_fail(EPHY_IS_WEB_VIEW(web_view));
+ g_return_if_fail(WEBKIT_IS_NETWORK_REQUEST(request));
+
+ main_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(web_view));
+ webkit_web_frame_load_request(main_frame, request);
+}
diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h
index 3fe9623bc..9fc31355e 100644
--- a/embed/ephy-web-view.h
+++ b/embed/ephy-web-view.h
@@ -60,6 +60,9 @@ GType ephy_web_view_get_type (void);
GtkWidget *ephy_web_view_new (void);
+void ephy_web_view_load_request (EphyWebView *web_view,
+ WebKitNetworkRequest *request);
+
G_END_DECLS
#endif