summaryrefslogtreecommitdiffstats
path: root/WebKit/efl/ewk/ewk_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/efl/ewk/ewk_settings.cpp')
-rw-r--r--WebKit/efl/ewk/ewk_settings.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/WebKit/efl/ewk/ewk_settings.cpp b/WebKit/efl/ewk/ewk_settings.cpp
index b50cd75..e775ac9 100644
--- a/WebKit/efl/ewk/ewk_settings.cpp
+++ b/WebKit/efl/ewk/ewk_settings.cpp
@@ -39,6 +39,11 @@
#include <sys/types.h>
#include <unistd.h>
+#if USE(SOUP)
+#include "ResourceHandle.h"
+#include <libsoup/soup.h>
+#endif
+
static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024;
/**
@@ -223,3 +228,22 @@ Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* c
surface = icon->nativeImageForCurrentFrame();
return ewk_util_image_from_cairo_surface_add(canvas, surface);
}
+
+/**
+ * Sets the given proxy URI to network backend.
+ *
+ * @param proxy URI.
+ */
+void ewk_settings_proxy_uri_set(const char* proxy)
+{
+#if USE(SOUP)
+ SoupURI* uri = soup_uri_new(proxy);
+ EINA_SAFETY_ON_NULL_RETURN(uri);
+
+ SoupSession* session = WebCore::ResourceHandle::defaultSession();
+ g_object_set(session, SOUP_SESSION_PROXY_URI, uri, NULL);
+ soup_uri_free(uri);
+#elif USE(CURL)
+ EINA_SAFETY_ON_TRUE_RETURN(1);
+#endif
+}