private void CheckSelf(cef_delete_cookies_callback_t *self) { if (_self != self) { throw ExceptionBuilder.InvalidSelfReference(); } }
protected virtual void Dispose(bool disposing) { if (_self != null) { cef_delete_cookies_callback_t.Free(_self); _self = null; } }
private static unsafe void OnCompleteImpl(cef_delete_cookies_callback_t *self, int num_deleted) { var instance = GetInstance((IntPtr)self) as CefDeleteCookiesCallback; if (instance == null || ((ICefDeleteCookiesCallbackPrivate)instance).AvoidOnComplete()) { return; } instance.OnComplete(num_deleted); }
public CefDeleteCookiesCallback() { cef_delete_cookies_callback_t *self = this.NativeInstance; #if NET_LESS_5_0 self->on_complete = (void *)Marshal.GetFunctionPointerForDelegate(fnOnComplete); #else self->on_complete = (delegate * unmanaged[Stdcall] < cef_delete_cookies_callback_t *, int, void >) & OnCompleteImpl; #endif }
private void add_ref(cef_delete_cookies_callback_t *self) { lock (SyncRoot) { var result = ++_refct; if (result == 1) { lock (_roots) { _roots.Add((IntPtr)_self, this); } } } }
private int release(cef_delete_cookies_callback_t *self) { lock (SyncRoot) { var result = --_refct; if (result == 0) { lock (_roots) { _roots.Remove((IntPtr)_self); } return(1); } return(0); } }
protected CefDeleteCookiesCallback() { _self = cef_delete_cookies_callback_t.Alloc(); _ds0 = new cef_delete_cookies_callback_t.add_ref_delegate(add_ref); _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); _ds1 = new cef_delete_cookies_callback_t.release_delegate(release); _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); _ds2 = new cef_delete_cookies_callback_t.has_one_ref_delegate(has_one_ref); _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); _ds3 = new cef_delete_cookies_callback_t.on_complete_delegate(on_complete); _self->_on_complete = Marshal.GetFunctionPointerForDelegate(_ds3); }
public unsafe extern int DeleteCookies([Immutable] cef_string_t *url, [Immutable] cef_string_t *cookie_name, cef_delete_cookies_callback_t *callback);
public CefDeleteCookiesCallback(cef_delete_cookies_callback_t *instance) : base((cef_base_ref_counted_t *)instance) { }
private void on_complete(cef_delete_cookies_callback_t *self, int num_deleted) { CheckSelf(self); throw new NotImplementedException(); // TODO: CefDeleteCookiesCallback.OnComplete }
public static int delete_cookies(cef_cookie_manager_t *self, cef_string_t *url, cef_string_t *cookie_name, cef_delete_cookies_callback_t *callback) { delete_cookies_delegate d; var p = self->_delete_cookies; if (p == _p7) { d = _d7; } else { d = (delete_cookies_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_cookies_delegate)); if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } } return(d(self, url, cookie_name, callback)); }
private int has_at_least_one_ref(cef_delete_cookies_callback_t *self) { lock (SyncRoot) { return(_refct != 0 ? 1 : 0); } }
/// <summary> /// Delete all cookies that match the specified parameters. If both |url| and /// |cookie_name| 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 empty 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 if a non-empty invalid URL is /// specified or if cookies cannot be accessed. Cookies can alternately be /// deleted using the Visit*Cookies() methods. /// </summary> public int DeleteCookies(cef_string_t *url, cef_string_t *cookie_name, cef_delete_cookies_callback_t *callback) { throw new NotImplementedException(); // TODO: CefCookieManager.DeleteCookies }
private void on_complete(cef_delete_cookies_callback_t *self, int num_deleted) { CheckSelf(self); OnComplete(num_deleted); }
internal static void Free(cef_delete_cookies_callback_t *ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
public unsafe int DeleteCookies([Immutable] cef_string_t *url, [Immutable] cef_string_t *cookie_name, cef_delete_cookies_callback_t *callback) { fixed(cef_cookie_manager_t *self = &this) { return(((delegate * unmanaged[Stdcall] < cef_cookie_manager_t *, cef_string_t *, cef_string_t *, cef_delete_cookies_callback_t *, int >)delete_cookies)(self, url, cookie_name, callback)); } }
public CefDeleteCookiesCallback() { cef_delete_cookies_callback_t *self = this.NativeInstance; self->on_complete = (void *)Marshal.GetFunctionPointerForDelegate(fnOnComplete); }