[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/2php/cefpython/cefpython57/src/client_handler/request_handler.h [Back]  [Original]

// Copyright (c) 2012 CEF Python, see the Authors file.
// All rights reserved. Licensed under BSD 3-clause license.
// Project website: https://github.com/cztomczak/cefpython

#include "common/cefpython_public_api.h"
#include "include/cef_request_handler.h"

typedef cef_return_value_t ReturnValue;


class RequestHandler : public CefRequestHandler
{
public:
    RequestHandler(){}
    virtual ~RequestHandler(){}

    bool OnBeforeBrowse(CefRefPtr browser,
                        CefRefPtr frame,
                        CefRefPtr request,
                        bool is_redirect) override;

    ReturnValue OnBeforeResourceLoad(CefRefPtr browser,
                                     CefRefPtr frame,
                                     CefRefPtr request,
                                     CefRefPtr callback
                                     ) override;

    CefRefPtr GetResourceHandler(
                                      CefRefPtr browser,
                                      CefRefPtr frame,
                                      CefRefPtr request) override;

    void OnResourceRedirect(CefRefPtr browser,
                            CefRefPtr frame,
                            CefRefPtr request,
                            CefRefPtr response,
                            CefString& new_url) override;

    bool GetAuthCredentials(CefRefPtr browser,
                            CefRefPtr frame,
                            bool isProxy,
                            const CefString& host,
                            int port,
                            const CefString& realm,
                            const CefString& scheme,
                            CefRefPtr callback) override;

    bool OnQuotaRequest(CefRefPtr browser,
                        const CefString& origin_url,
                        int64 new_size,
                        CefRefPtr callback) override;

    void OnProtocolExecution(CefRefPtr browser,
                             const CefString& url,
                             bool& allow_os_execution) override;

    bool OnCertificateError(CefRefPtr browser,
                            cef_errorcode_t cert_error,
                            const CefString& request_url,
                            CefRefPtr ssl_info,
                            CefRefPtr callback) override;

    void OnRenderProcessTerminated(CefRefPtr browser,
                                   cef_termination_status_t status) override;

    void OnPluginCrashed(CefRefPtr browser,
                         const CefString& plugin_path) override;

private:
    IMPLEMENT_REFCOUNTING(RequestHandler);
};

Web Proxy Viewer  |  New URL  |  Original Page