/// <summary>
        /// Returns the cookie manager for this object. If |callback| is non-NULL it
        /// will be executed asnychronously on the IO thread after the manager's
        /// storage has been initialized.
        /// </summary>
        public CefCookieManager GetCookieManager(CefCompletionCallback callback)
        {
            var n_callback = callback != null?callback.ToNative() : null;

            return(CefCookieManager.FromNativeOrNull(
                       cef_request_context_t.get_cookie_manager(_self, n_callback)
                       ));
        }
        /// <summary>
        /// Returns the global cookie manager. By default data will be stored at
        /// CefSettings.cache_path if specified or in memory otherwise. If |callback|
        /// is non-NULL it will be executed asnychronously on the IO thread after the
        /// manager's storage has been initialized. Using this method is equivalent to
        /// calling CefRequestContext::GetGlobalContext()->GetDefaultCookieManager().
        /// </summary>
        public static CefCookieManager GetGlobal(CefCompletionCallback callback)
        {
            var n_callback = callback != null?callback.ToNative() : null;

            return(CefCookieManager.FromNativeOrNull(
                       cef_cookie_manager_t.get_global_manager(n_callback)
                       ));
        }
        /// <summary>
        /// Creates a new cookie manager. If |path| is empty data will be stored in
        /// memory only. Otherwise, data will be stored at the specified |path|. To
        /// persist session cookies (cookies without an expiry date or validity
        /// interval) set |persist_session_cookies| to true. Session cookies are
        /// generally intended to be transient and most Web browsers do not persist
        /// them. Returns NULL if creation fails.
        /// </summary>
        public static CefCookieManager Create(string path, bool persistSessionCookies)
        {
            fixed(char *path_str = path)
            {
                var n_path = new cef_string_t(path_str, path != null ? path.Length : 0);

                return(CefCookieManager.FromNativeOrNull(
                           cef_cookie_manager_t.create_manager(&n_path, persistSessionCookies ? 1 : 0)
                           ));
            }
        }
        /// <summary>
        /// Creates a new cookie manager. If |path| is empty data will be stored in
        /// memory only. Otherwise, data will be stored at the specified |path|. To
        /// persist session cookies (cookies without an expiry date or validity
        /// interval) set |persist_session_cookies| to true. Session cookies are
        /// generally intended to be transient and most Web browsers do not persist
        /// them. If |callback| is non-NULL it will be executed asnychronously on the
        /// IO thread after the manager's storage has been initialized.
        /// </summary>
        public static CefCookieManager Create(string path, bool persistSessionCookies, CefCompletionCallback callback)
        {
            fixed(char *path_str = path)
            {
                var n_path     = new cef_string_t(path_str, path != null ? path.Length : 0);
                var n_callback = callback != null?callback.ToNative() : null;

                return(CefCookieManager.FromNativeOrNull(
                           cef_cookie_manager_t.create_manager(&n_path, persistSessionCookies ? 1 : 0, n_callback)
                           ));
            }
        }