private void get_response_headers(cef_resource_handler_t* self, cef_response_t* response, long* response_length, cef_string_t* redirectUrl)
        {
            CheckSelf(self);

            var m_response = CefResponse.FromNative(response);
            long m_responseLength;
            string m_redirectUrl;

            GetResponseHeaders(m_response, out m_responseLength, out m_redirectUrl);

            *response_length = m_responseLength;

            if (!string.IsNullOrEmpty(m_redirectUrl))
            {
                cef_string_t.Copy(m_redirectUrl, redirectUrl);
            }
        }
 public static void set_header_map(cef_response_t* self, cef_string_multimap* headerMap)
 {
     set_header_map_delegate d;
     var p = self->_set_header_map;
     if (p == _pc) { d = _dc; }
     else
     {
         d = (set_header_map_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_header_map_delegate));
         if (_pc == IntPtr.Zero) { _dc = d; _pc = p; }
     }
     d(self, headerMap);
 }
 public static cef_string_userfree* get_header(cef_response_t* self, cef_string_t* name)
 {
     get_header_delegate d;
     var p = self->_get_header;
     if (p == _pa) { d = _da; }
     else
     {
         d = (get_header_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_header_delegate));
         if (_pa == IntPtr.Zero) { _da = d; _pa = p; }
     }
     return d(self, name);
 }
 public static void set_mime_type(cef_response_t* self, cef_string_t* mimeType)
 {
     set_mime_type_delegate d;
     var p = self->_set_mime_type;
     if (p == _p9) { d = _d9; }
     else
     {
         d = (set_mime_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_mime_type_delegate));
         if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; }
     }
     d(self, mimeType);
 }
 public static cef_string_userfree* get_mime_type(cef_response_t* self)
 {
     get_mime_type_delegate d;
     var p = self->_get_mime_type;
     if (p == _p8) { d = _d8; }
     else
     {
         d = (get_mime_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_mime_type_delegate));
         if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; }
     }
     return d(self);
 }
 public static void set_status_text(cef_response_t* self, cef_string_t* statusText)
 {
     set_status_text_delegate d;
     var p = self->_set_status_text;
     if (p == _p7) { d = _d7; }
     else
     {
         d = (set_status_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_status_text_delegate));
         if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; }
     }
     d(self, statusText);
 }
 public static cef_string_userfree* get_status_text(cef_response_t* self)
 {
     get_status_text_delegate d;
     var p = self->_get_status_text;
     if (p == _p6) { d = _d6; }
     else
     {
         d = (get_status_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_status_text_delegate));
         if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; }
     }
     return d(self);
 }
 public static void set_status(cef_response_t* self, int status)
 {
     set_status_delegate d;
     var p = self->_set_status;
     if (p == _p5) { d = _d5; }
     else
     {
         d = (set_status_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_status_delegate));
         if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; }
     }
     d(self, status);
 }
 public static int get_status(cef_response_t* self)
 {
     get_status_delegate d;
     var p = self->_get_status;
     if (p == _p4) { d = _d4; }
     else
     {
         d = (get_status_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_status_delegate));
         if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; }
     }
     return d(self);
 }
 public static int is_read_only(cef_response_t* self)
 {
     is_read_only_delegate d;
     var p = self->_is_read_only;
     if (p == _p3) { d = _d3; }
     else
     {
         d = (is_read_only_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_read_only_delegate));
         if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; }
     }
     return d(self);
 }
 public static int get_refct(cef_response_t* self)
 {
     get_refct_delegate d;
     var p = self->_base._get_refct;
     if (p == _p2) { d = _d2; }
     else
     {
         d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate));
         if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; }
     }
     return d(self);
 }
 public static int release(cef_response_t* self)
 {
     release_delegate d;
     var p = self->_base._release;
     if (p == _p1) { d = _d1; }
     else
     {
         d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
         if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; }
     }
     return d(self);
 }
 public static int add_ref(cef_response_t* self)
 {
     add_ref_delegate d;
     var p = self->_base._add_ref;
     if (p == _p0) { d = _d0; }
     else
     {
         d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
         if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; }
     }
     return d(self);
 }
 private CefResponse(cef_response_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }
 internal static CefResponse FromNativeOrNull(cef_response_t* ptr)
 {
     if (ptr == null) return null;
     return new CefResponse(ptr);
 }
 internal static CefResponse FromNative(cef_response_t* ptr)
 {
     return new CefResponse(ptr);
 }