Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 3.3578.1860.g36610bd
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefResourceHandler

CefBaseRefCounted
   |
   +--CefResourceHandler

   in cef_resource_handler.h
Direct Known Subclasses:
CefStreamResourceHandler

class CefResourceHandler
extends CefBaseRefCounted

Class used to implement a custom request handler interface. The methods of this class will always be called on the IO thread.


Method Summary
 virtual void Cancel()= 0
          Request processing has been canceled.
 virtual bool CanGetCookie( const CefCookie& cookie )
          Return true if the specified cookie can be sent with the request or false otherwise.
 virtual bool CanSetCookie( const CefCookie& cookie )
          Return true if the specified cookie returned with the response can be set or false otherwise.
 virtual void GetResponseHeaders( CefRefPtr< CefResponse > response, int64& response_length, CefString& redirectUrl )= 0
          Retrieve response header information.
 virtual bool ProcessRequest( CefRefPtr< CefRequest > request, CefRefPtr< CefCallback > callback )= 0
          Begin processing the request.
 virtual bool ReadResponse( void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr< CefCallback > callback )= 0
          Read response data.
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

Cancel

public virtual void Cancel()= 0;
Request processing has been canceled.

CanGetCookie

public virtual bool CanGetCookie( const CefCookie& cookie );
Return true if the specified cookie can be sent with the request or false otherwise. If false is returned for any cookie then no cookies will be sent with the request.

CanSetCookie

public virtual bool CanSetCookie( const CefCookie& cookie );
Return true if the specified cookie returned with the response can be set or false otherwise.

GetResponseHeaders

public virtual void GetResponseHeaders( CefRefPtr< CefResponse > response, int64& response_length, CefString& redirectUrl )= 0;
Retrieve response header information. If the response length is not known set |response_length| to -1 and ReadResponse() will be called until it returns false. If the response length is known set |response_length| to a positive value and ReadResponse() will be called until it returns false or the specified number of bytes have been read. Use the |response| object to set the mime type, http status code and other optional header values. To redirect the request to a new URL set |redirectUrl| to the new URL. If an error occured while setting up the request you can call SetError() on |response| to indicate the error condition.

ProcessRequest

public virtual bool ProcessRequest( CefRefPtr< CefRequest > request, CefRefPtr< CefCallback > callback )= 0;
Begin processing the request. To handle the request return true and call CefCallback::Continue() once the response header information is available (CefCallback::Continue() can also be called from inside this method if header information is available immediately). To cancel the request return false.

ReadResponse

public virtual bool ReadResponse( void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr< CefCallback > callback )= 0;
Read response data. If data is available immediately copy up to |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of bytes copied, and return true. To read the data at a later time set |bytes_read| to 0, return true and call CefCallback::Continue() when the data is available. To indicate response completion return false.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 3.3578.1860.g36610bd
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt