public unsafe int SetCookie([Immutable] cef_string_t *url, [Immutable] cef_cookie_t *cookie, cef_set_cookie_callback_t *callback) { fixed(cef_cookie_manager_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_cookie_manager_t *, cef_string_t *, cef_cookie_t *, cef_set_cookie_callback_t *, int >)set_cookie)(self, url, cookie, callback)); } }
internal static void Clear(cef_cookie_t *ptr) { libcef.string_clear(&ptr->name); libcef.string_clear(&ptr->value); libcef.string_clear(&ptr->domain); libcef.string_clear(&ptr->path); }
public static void Clear(cef_cookie_t *self) { cef_string_t.Clear(&self->name); cef_string_t.Clear(&self->value); cef_string_t.Clear(&self->domain); cef_string_t.Clear(&self->path); }
public unsafe int Visit([Immutable] cef_cookie_t *cookie, int count, int total, int *deleteCookie) { fixed(cef_cookie_visitor_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_cookie_visitor_t *, cef_cookie_t *, int, int, int *, int >)visit)(self, cookie, count, total, deleteCookie)); } }
private int can_get_cookie(cef_resource_handler_t *self, cef_cookie_t *cookie) { CheckSelf(self); var m_cookie = CefCookie.FromNative(cookie); return(CanGetCookie(m_cookie) ? 1 : 0); }
public void Dispose() { if (this.ptr != null && this.owner) { cef_cookie_t.Free(this.ptr); } this.ptr = null; GC.SuppressFinalize(this); }
private int visit(cef_cookie_visitor_t *self, cef_cookie_t *cookie, int count, int total, int *deleteCookie) { CheckSelf(self); var mCookie = CefCookie.FromNative(cookie); bool mDelete; var result = Visit(mCookie, count, total, out mDelete); *deleteCookie = mDelete ? 1 : 0; return(result ? 1 : 0); }
internal static CefCookie FromNative(cef_cookie_t *ptr) { return(new CefCookie { Name = cef_string_t.ToString(&ptr->name), Value = cef_string_t.ToString(&ptr->value), Domain = cef_string_t.ToString(&ptr->domain), Path = cef_string_t.ToString(&ptr->path), Secure = ptr->secure, HttpOnly = ptr->httponly, Creation = cef_time_t.ToDateTime(&ptr->creation), LastAccess = cef_time_t.ToDateTime(&ptr->last_access), Expires = ptr->has_expires ? (DateTime?)cef_time_t.ToDateTime(&ptr->expires) : null, }); }
/// <summary> /// Method that will be called once for each cookie. |count| is the /// 0-based index for the current cookie. |total| is the total number of /// cookies. Set |deleteCookie| to true to delete the cookie currently /// being visited. Return false to stop visiting cookies. This method may /// never be called if no cookies are found. /// </summary> private int visit(cef_cookie_visitor_t *self, /*const*/ cef_cookie_t *cookie, int count, int total, int *deleteCookie) { ThrowIfObjectDisposed(); var m_cookie = CefCookie.From(cookie); bool m_deleteCookie; var handled = this.Visit(m_cookie, count, total, out m_deleteCookie); m_cookie.Dispose(); *deleteCookie = m_deleteCookie ? 1 : 0; return(handled ? 1 : 0); }
public static int set_cookie(cef_cookie_manager_t *self, cef_string_t *url, cef_cookie_t *cookie, cef_set_cookie_callback_t *callback) { set_cookie_delegate d; var p = self->_set_cookie; if (p == _p6) { d = _d6; } else { d = (set_cookie_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_cookie_delegate)); if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } } return(d(self, url, cookie, callback)); }
public unsafe extern int CanSaveCookie(cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, [Immutable] cef_cookie_t *cookie);
internal static void Free(cef_cookie_t *ptr) { cef_cookie_t.Clear((cef_cookie_t *)ptr); cef_cookie_t.Free((cef_cookie_t *)ptr); }
public CefCookie() { this.ptr = cef_cookie_t.Alloc(); this.owner = true; }
public unsafe extern int Visit([Immutable] cef_cookie_t *cookie, int count, int total, int *deleteCookie);
private int can_set_cookie(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_cookie_t *cookie) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); var mFrame = CefFrame.FromNative(frame); var mRequest = CefRequest.FromNative(request); var mCookie = CefCookie.FromNative(cookie); var mResult = CanSetCookie(mBrowser, mFrame, mRequest, mCookie); return(mResult ? 1 : 0); }
private int can_save_cookie(cef_cookie_access_filter_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, cef_cookie_t *cookie) { CheckSelf(self); var m_browser = CefBrowser.FromNativeOrNull(browser); var m_frame = CefFrame.FromNativeOrNull(frame); var m_request = CefRequest.FromNative(request); var m_response = CefResponse.FromNative(response); var m_cookie = CefCookie.FromNative(cookie); var m_result = CanSaveCookie(m_browser, m_frame, m_request, m_response, m_cookie); return(m_result ? 1 : 0); }
public static void Free(cef_cookie_t *ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
public unsafe int CanSaveCookie(cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, [Immutable] cef_cookie_t *cookie) { fixed(cef_cookie_access_filter_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_cookie_access_filter_t *, cef_browser_t *, cef_frame_t *, cef_request_t *, cef_response_t *, cef_cookie_t *, int >)can_save_cookie)(self, browser, frame, request, response, cookie)); } }
/// <summary> /// Return true if the specified cookie can be sent with the request or false /// otherwise. If false is returned for any cookie then no cookies will be sent /// with the request. /// </summary> // protected abstract int CanGetCookie(cef_cookie_t* cookie); private int can_set_cookie(cef_resource_handler_t *self, cef_cookie_t *cookie) { CheckSelf(self); throw new NotImplementedException(); // TODO: CefResourceHandler.CanSetCookie }
private CefCookie(cef_cookie_t* ptr) { this.ptr = ptr; this.owner = false; }
private CefCookie(cef_cookie_t *ptr) { this.ptr = ptr; this.owner = false; }
public unsafe extern int SetCookie([Immutable] cef_string_t *url, [Immutable] cef_cookie_t *cookie, cef_set_cookie_callback_t *callback);
// TODO: cookie can be writable internal static CefCookie From(cef_cookie_t *ptr) { return(new CefCookie(ptr)); }
private int visit(cef_cookie_visitor_t *self, cef_cookie_t *cookie, int count, int total, int *deleteCookie) { CheckSelf(self); throw new NotImplementedException(); // TODO: CefCookieVisitor.Visit }
/// <summary> /// Sets a cookie given a valid URL and explicit user-provided cookie /// attributes. This function expects each attribute to be well-formed. It will /// check for disallowed characters (e.g. the ';' character is disallowed /// within the cookie value attribute) and fail without setting the cookie if /// such characters are found. If |callback| is non-NULL it will be executed /// asnychronously on the IO thread after the cookie has been set. Returns /// false if an invalid URL is specified or if cookies cannot be accessed. /// </summary> public int SetCookie(cef_string_t *url, cef_cookie_t *cookie, cef_set_cookie_callback_t *callback) { throw new NotImplementedException(); // TODO: CefCookieManager.SetCookie }