diff options
-rw-r--r-- | embed/ephy-web-view.c | 19 | ||||
-rw-r--r-- | embed/ephy-web-view.h | 3 |
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 |