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

// Copyright (c) 2012-2014 The CEF Python authors. All rights reserved.
// License: New BSD License.
// Website: http://code.google.com/p/cefpython/

#pragma once

#if defined(_WIN32)
#include "../windows/stdint.h"
#endif

#include "cefpython_public_api.h"

class ResourceHandler : public CefResourceHandler
{
public:
    int resourceHandlerId_;
public:
    ResourceHandler(int resourceHandlerId)
        : resourceHandlerId_(resourceHandlerId) {
    }    

  virtual bool ProcessRequest(CefRefPtr request,
                              CefRefPtr callback) OVERRIDE;

  virtual void GetResponseHeaders(CefRefPtr response,
                                  int64& response_length,
                                  CefString& redirectUrl) OVERRIDE;

  virtual bool ReadResponse(void* data_out,
                            int bytes_to_read,
                            int& bytes_read,
                            CefRefPtr callback) OVERRIDE;

  virtual bool CanGetCookie(const CefCookie& cookie) OVERRIDE;

  virtual bool CanSetCookie(const CefCookie& cookie) OVERRIDE;

  virtual void Cancel() OVERRIDE;
    
protected:
  IMPLEMENT_REFCOUNTING(ResourceHandler);
};

Web Proxy Viewer  |  New URL  |  Original Page