Пример #1
0
        /// <summary>
        /// Delete all cookies that match the specified parameters. If both |url| and
        /// |cookieName| values are specified all host and domain cookies matching
        /// both will be deleted. If only |url| is specified all host cookies (but not
        /// domain cookies) irrespective of path will be deleted. If |url| is NULL all
        /// cookies for all hosts and domains will be deleted. If |callback| is non-
        /// NULL it will be executed asnychronously on the IO thread after the cookies
        /// have been deleted. Returns false (0) if a non-NULL invalid URL is specified
        /// or if cookies cannot be accessed. Cookies can alternately be deleted using
        /// the Visit*Cookies() functions.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_cookie_capi.h">cef/include/capi/cef_cookie_capi.h</see>.
        /// </remarks>
        public bool DeleteCookies(string url, string cookieName, CfxDeleteCookiesCallback callback)
        {
            var url_pinned        = new PinnedString(url);
            var cookieName_pinned = new PinnedString(cookieName);
            var __retval          = CfxApi.CookieManager.cfx_cookie_manager_delete_cookies(NativePtr, url_pinned.Obj.PinnedPtr, url_pinned.Length, cookieName_pinned.Obj.PinnedPtr, cookieName_pinned.Length, CfxDeleteCookiesCallback.Unwrap(callback));

            url_pinned.Obj.Free();
            cookieName_pinned.Obj.Free();
            return(0 != __retval);
        }
Пример #2
0
 /// <summary>
 /// Delete all cookies that match the specified parameters. If both |url| and
 /// |cookieName| values are specified all host and domain cookies matching
 /// both will be deleted. If only |url| is specified all host cookies (but not
 /// domain cookies) irrespective of path will be deleted. If |url| is NULL all
 /// cookies for all hosts and domains will be deleted. If |callback| is non-
 /// NULL it will be executed asnychronously on the IO thread after the cookies
 /// have been deleted. Returns false (0) if a non-NULL invalid URL is specified
 /// or if cookies cannot be accessed. Cookies can alternately be deleted using
 /// the Visit*Cookies() functions.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_cookie_capi.h">cef/include/capi/cef_cookie_capi.h</see>.
 /// </remarks>
 public bool DeleteCookies(string url, string cookieName, CfxDeleteCookiesCallback callback)
 {
     var url_pinned = new PinnedString(url);
     var cookieName_pinned = new PinnedString(cookieName);
     var __retval = CfxApi.cfx_cookie_manager_delete_cookies(NativePtr, url_pinned.Obj.PinnedPtr, url_pinned.Length, cookieName_pinned.Obj.PinnedPtr, cookieName_pinned.Length, CfxDeleteCookiesCallback.Unwrap(callback));
     url_pinned.Obj.Free();
     cookieName_pinned.Obj.Free();
     return 0 != __retval;
 }