public static cef_cookie_t *Alloc()
        {
            var ptr = (cef_cookie_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_cookie_t();
            return(ptr);
        }
Exemple #2
0
 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);
 }
Exemple #3
0
        private int can_set_cookie(cef_resource_handler_t* self, cef_cookie_t* cookie)
        {
            CheckSelf(self);

            var m_cookie = CefCookie.FromNative(cookie);

            return CanSetCookie(m_cookie) ? 1 : 0;
        }
Exemple #4
0
        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;
        }
Exemple #5
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 != 0,
             HttpOnly = ptr->httponly != 0,
             Creation = cef_time_t.ToDateTime(&ptr->creation),
             LastAccess = cef_time_t.ToDateTime(&ptr->last_access),
             Expires = ptr->has_expires != 0 ? (DateTime?)cef_time_t.ToDateTime(&ptr->expires) : null,
         };
 }
 public static int set_cookie(cef_cookie_manager_t* self, cef_string_t* url, cef_cookie_t* cookie)
 {
     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);
 }
Exemple #7
0
 internal static void Free(cef_cookie_t* ptr)
 {
     cef_cookie_t.Clear((cef_cookie_t*)ptr);
     cef_cookie_t.Free((cef_cookie_t*)ptr);
 }
Exemple #8
0
 public static void Free(cef_cookie_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
Exemple #9
0
 public static cef_cookie_t* Alloc()
 {
     var ptr = (cef_cookie_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_cookie_t();
     return ptr;
 }