private void on_resource_load_complete(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, CefUrlRequestStatus status, long received_content_length)
        {
            CheckSelf(self);

            var mBrowser  = CefBrowser.FromNative(browser);
            var mFrame    = CefFrame.FromNative(frame);
            var mRequest  = CefRequest.FromNative(request);
            var mResponse = CefResponse.FromNative(response);

            OnResourceLoadComplete(mBrowser, mFrame, mRequest, mResponse, status, received_content_length);
        }
        private int on_resource_response(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response)
        {
            CheckSelf(self);

            var m_browser  = CefBrowser.FromNative(browser);
            var m_frame    = CefFrame.FromNative(frame);
            var m_request  = CefRequest.FromNative(request);
            var m_response = CefResponse.FromNative(response);

            var m_result = OnResourceResponse(m_browser, m_frame, m_request, m_response);

            return(m_result ? 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);
        }
Exemple #4
0
        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);
            }
        }
        private cef_response_filter_t *get_resource_response_filter(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response)
        {
            CheckSelf(self);

            var mBrowser  = CefBrowser.FromNative(browser);
            var mFrame    = CefFrame.FromNative(frame);
            var mRequest  = CefRequest.FromNative(request);
            var mResponse = CefResponse.FromNative(response);

            var result = GetResourceResponseFilter(mBrowser, mFrame, mRequest, mResponse);

            if (result != null)
            {
                return(result.ToNative());
            }

            return(null);
        }
        private void on_resource_redirect(cef_request_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_request_t *request, cef_response_t *response, cef_string_t *new_url)
        {
            CheckSelf(self);

            var m_browser  = CefBrowser.FromNative(browser);
            var m_frame    = CefFrame.FromNative(frame);
            var m_request  = CefRequest.FromNative(request);
            var m_response = CefResponse.FromNative(response);
            var m_newUrl   = cef_string_t.ToString(new_url);

            var o_newUrl = m_newUrl;

            OnResourceRedirect(m_browser, m_frame, m_request, m_response, ref m_newUrl);

            if ((object)m_newUrl != (object)o_newUrl)
            {
                cef_string_t.Copy(m_newUrl, new_url);
            }
        }
Exemple #7
0
 /// <summary>
 /// Create a new CefResponse object.
 /// </summary>
 public static CefResponse Create()
 {
     return(CefResponse.FromNative(
                cef_response_t.create()
                ));
 }