Changeset 113870 in webkit
- Timestamp:
- Apr 11, 2012 9:14:45 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r113861 r113870 1 2012-04-11 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Initial cookies API for WebKit2 GTK+ API 4 https://bugs.webkit.org/show_bug.cgi?id=82441 5 6 Reviewed by Gustavo Noronha Silva. 7 8 * GNUmakefile.am: Add new files to compilation. 9 * UIProcess/API/gtk/WebKitCookieManager.cpp: Added. 10 (webkit_cookie_manager_init): 11 (webkitCookieManagerFinalize): 12 (webkit_cookie_manager_class_init): 13 (webkitCookieManagerCreate): Create a new WebKitCookieManager for 14 the given WKCookieManagerRef. 15 (webkit_cookie_manager_set_accept_policy): Set the cookie 16 acceptance policy. 17 (webkitCookieManagerGetAcceptPolicyCallback): Callback called by 18 the C API when the cookie acceptance policy has been received. 19 (webkit_cookie_manager_get_accept_policy): Asynchronously get the 20 cookie acceptance policy. 21 (webkit_cookie_manager_get_accept_policy_finish): Finish async 22 operation started by webkit_cookie_manager_get_accept_policy() 23 returning the cookie acceptance policy. 24 (webkitCookieManagerGetDomainsWithCookiesCallback): Callback 25 called by the C API when the list of hostnames with cookies has 26 been received. 27 (webkit_cookie_manager_get_domains_with_cookies): Asynchronously 28 get the list of domains with cookies. 29 (webkit_cookie_manager_get_domains_with_cookies_finish): Finish 30 async operation started by 31 webkit_cookie_manager_get_domains_with_cookies() returning the 32 list of domains. 33 (webkit_cookie_manager_delete_cookies_for_domain): Delete all 34 cookies for the given domain. 35 (webkit_cookie_manager_delete_all_cookies): Delete all cookies. 36 * UIProcess/API/gtk/WebKitCookieManager.h: Added. 37 * UIProcess/API/gtk/WebKitCookieManagerPrivate.h: Added. 38 * UIProcess/API/gtk/WebKitWebContext.cpp: 39 (webkit_web_context_get_cookie_manager): Get the 40 WebKitCookieManager associated with the web context. 41 * UIProcess/API/gtk/WebKitWebContext.h: 42 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for 43 WebKitCookieManager. 44 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. 45 * UIProcess/API/gtk/docs/webkit2gtk.types: Add 46 webkit_cookie_manager_get_type. 47 * UIProcess/API/gtk/tests/GNUmakefile.am: 48 * UIProcess/API/gtk/tests/TestCookieManager.cpp: Added. 49 (testCookieManagerAcceptPolicy): 50 (testCookieManagerDeleteCookies): 51 (serverCallback): 52 (beforeAll): 53 (afterAll): 54 * UIProcess/API/gtk/webkit2.h: Include WebKitCookieManager.h. 55 1 56 2012-04-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 57 -
trunk/Source/WebKit2/GNUmakefile.am
r113831 r113870 88 88 $(WebKit2)/UIProcess/API/gtk/WebKitBackForwardList.h \ 89 89 $(WebKit2)/UIProcess/API/gtk/WebKitBackForwardListItem.h \ 90 $(WebKit2)/UIProcess/API/gtk/WebKitCookieManager.h \ 90 91 $(WebKit2)/UIProcess/API/gtk/WebKitDefines.h \ 91 92 $(WebKit2)/UIProcess/API/gtk/WebKitDownload.h \ … … 551 552 Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp \ 552 553 Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h \ 554 Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.h \ 555 Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp \ 556 Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h \ 553 557 Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h \ 554 558 Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp \ -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
r105708 r113870 22 22 23 23 #include "WebContext.h" 24 #include "WebKitCookieManagerPrivate.h" 24 25 #include "WebKitDownloadClient.h" 25 26 #include "WebKitDownloadPrivate.h" … … 40 41 struct _WebKitWebContextPrivate { 41 42 WKRetainPtr<WKContextRef> context; 43 44 GRefPtr<WebKitCookieManager> cookieManager; 42 45 }; 43 46 … … 216 219 } 217 220 221 /** 222 * webkit_web_context_get_cookie_manager: 223 * @context: a #WebKitWebContext 224 * 225 * Get the #WebKitCookieManager of @context. 226 * 227 * Returns: (transfer none): the #WebKitCookieManager of @context. 228 */ 229 WebKitCookieManager* webkit_web_context_get_cookie_manager(WebKitWebContext* context) 230 { 231 g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0); 232 233 WebKitWebContextPrivate* priv = context->priv; 234 if (!priv->cookieManager) 235 priv->cookieManager = adoptGRef(webkitCookieManagerCreate(WKContextGetCookieManager(priv->context.get()))); 236 237 return priv->cookieManager.get(); 238 } 239 218 240 WebKitDownload* webkitWebContextGetOrCreateDownload(WKDownloadRef wkDownload) 219 241 { -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.h
r105708 r113870 26 26 27 27 #include <glib-object.h> 28 #include <webkit2/WebKitCookieManager.h> 28 29 #include <webkit2/WebKitDefines.h> 29 30 #include <webkit2/WebKitDownload.h> … … 80 81 81 82 WEBKIT_API GType 82 webkit_web_context_get_type (void);83 webkit_web_context_get_type (void); 83 84 84 85 WEBKIT_API WebKitWebContext * 85 webkit_web_context_get_default (void);86 webkit_web_context_get_default (void); 86 87 87 88 WEBKIT_API void 88 webkit_web_context_set_cache_model (WebKitWebContext *context,89 WebKitCacheModel cache_model);89 webkit_web_context_set_cache_model (WebKitWebContext *context, 90 WebKitCacheModel cache_model); 90 91 WEBKIT_API WebKitCacheModel 91 webkit_web_context_get_cache_model (WebKitWebContext *context);92 webkit_web_context_get_cache_model (WebKitWebContext *context); 92 93 93 94 WEBKIT_API WebKitDownload * 94 webkit_web_context_download_uri (WebKitWebContext *context, 95 const gchar *uri); 95 webkit_web_context_download_uri (WebKitWebContext *context, 96 const gchar *uri); 97 98 WEBKIT_API WebKitCookieManager * 99 webkit_web_context_get_cookie_manager (WebKitWebContext *context); 96 100 97 101 G_END_DECLS -
trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
r112221 r113870 30 30 <xi:include href="xml/WebKitError.xml"/> 31 31 <xi:include href="xml/WebKitFindController.xml"/> 32 <xi:include href="xml/WebKitCookieManager.xml"/> 32 33 </chapter> 33 34 -
trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
r112227 r113870 29 29 webkit_web_context_set_cache_model 30 30 webkit_web_context_download_uri 31 webkit_web_context_get_cookie_manager 31 32 32 33 <SUBSECTION Standard> … … 547 548 webkit_find_controller_get_type 548 549 </SECTION> 550 551 <SECTION> 552 <FILE>WebKitCookieManager</FILE> 553 WebKitCookieManager 554 WebKitCookieAcceptPolicy 555 webkit_cookie_manager_set_accept_policy 556 webkit_cookie_manager_get_accept_policy 557 webkit_cookie_manager_get_accept_policy_finish 558 webkit_cookie_manager_get_domains_with_cookies 559 webkit_cookie_manager_get_domains_with_cookies_finish 560 webkit_cookie_manager_delete_cookies_for_domain 561 webkit_cookie_manager_delete_all_cookies 562 563 <SUBSECTION Standard> 564 WebKitCookieManagerClass 565 WEBKIT_TYPE_COOKIE_MANAGER 566 WEBKIT_COOKIE_MANAGER 567 WEBKIT_IS_COOKIE_MANAGER 568 WEBKIT_COOKIE_MANAGER_CLASS 569 WEBKIT_IS_COOKIE_MANAGER_CLASS 570 WEBKIT_COOKIE_MANAGER_GET_CLASS 571 572 <SUBSECTION Private> 573 WebKitCookieManagerPrivate 574 webkit_cookie_manager_get_type 575 </SECTION> -
trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk.types
r112221 r113870 14 14 webkit_javascript_result_get_type 15 15 webkit_web_resource_get_type 16 webkit_cookie_manager_get_type -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am
r112221 r113870 3 3 TEST_PROGS += \ 4 4 Programs/WebKit2APITests/TestBackForwardList \ 5 Programs/WebKit2APITests/TestCookieManager \ 5 6 Programs/WebKit2APITests/TestDownloads \ 6 7 Programs/WebKit2APITests/TestLoaderClient \ … … 143 144 Programs_WebKit2APITests_TestResources_LDFLAGS = $(webkit2_tests_ldflags) 144 145 146 Programs_WebKit2APITests_TestCookieManager_SOURCES = \ 147 Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp 148 Programs_WebKit2APITests_TestCookieManager_CPPFLAGS = $(webkit2_tests_cppflags) 149 Programs_WebKit2APITests_TestCookieManager_LDADD = $(webkit2_tests_ldadd) 150 Programs_WebKit2APITests_TestCookieManager_LDFLAGS = $(webkit2_tests_ldflags) 151 145 152 endif # ENABLE_WEBKIT2 -
trunk/Source/WebKit2/UIProcess/API/gtk/webkit2.h
r112221 r113870 26 26 #include <webkit2/WebKitBackForwardList.h> 27 27 #include <webkit2/WebKitBackForwardListItem.h> 28 #include <webkit2/WebKitCookieManager.h> 28 29 #include <webkit2/WebKitDefines.h> 29 30 #include <webkit2/WebKitDownload.h>
Note: See TracChangeset
for help on using the changeset viewer.