diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-23 09:28:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-23 09:28:44 +0200 |
commit | 815f1ed417bd26fbe2abbdf20ac5d3423b30796c (patch) | |
tree | 923c9a9e2834ccab60f5caecfb8f0ac410c1dd9e /Source/WebKit2/UIProcess/API/efl/ewk_context.cpp | |
parent | b4ad5d9d2b96baacd0180ead50de5195ca78af2d (diff) | |
download | qtwebkit-815f1ed417bd26fbe2abbdf20ac5d3423b30796c.tar.gz |
Imported WebKit commit e65cbc5b6ac32627c797e7fc7f46eb7794410c92 (http://svn.webkit.org/repository/webkit/trunk@123308)
New snapshot with better configure tests
Diffstat (limited to 'Source/WebKit2/UIProcess/API/efl/ewk_context.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/efl/ewk_context.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp index e1ccff23b..21c157c22 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp @@ -25,20 +25,40 @@ #include "WKAPICast.h" #include "WKRetainPtr.h" #include "ewk_context_private.h" +#include "ewk_cookie_manager_private.h" using namespace WebKit; struct _Ewk_Context { WKRetainPtr<WKContextRef> context; + + Ewk_Cookie_Manager* cookieManager; #if ENABLE(BATTERY_STATUS) RefPtr<BatteryProvider> batteryProvider; #endif _Ewk_Context(WKContextRef contextRef) : context(contextRef) + , cookieManager(0) { } + + ~_Ewk_Context() + { + if (cookieManager) + ewk_cookie_manager_free(cookieManager); + } }; +Ewk_Cookie_Manager* ewk_context_cookie_manager_get(const Ewk_Context* ewkContext) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, 0); + + if (!ewkContext->cookieManager) + const_cast<Ewk_Context*>(ewkContext)->cookieManager = ewk_cookie_manager_new(WKContextGetCookieManager(ewkContext->context.get())); + + return ewkContext->cookieManager; +} + WKContextRef ewk_context_WKContext_get(const Ewk_Context* ewkContext) { return ewkContext->context.get(); |