Chromium Embedded Framework (CEF)
129.0.1+g463bda9+chromium-129.0.6668.12
|
Implement this interface to filter resource response content. More...
#include "include/cef_response_filter.h"
Public Types | |
typedef cef_response_filter_status_t | FilterStatus |
Public Member Functions | |
virtual bool | InitFilter ()=0 |
Initialize the response filter. More... | |
virtual FilterStatus | Filter (void *data_in, size_t data_in_size, size_t &data_in_read, void *data_out, size_t data_out_size, size_t &data_out_written)=0 |
Called to filter a chunk of data. More... | |
Public Member Functions inherited from CefBaseRefCounted | |
virtual void | AddRef () const =0 |
Called to increment the reference count for the object. More... | |
virtual bool | Release () const =0 |
Called to decrement the reference count for the object. More... | |
virtual bool | HasOneRef () const =0 |
Returns true if the reference count is 1. More... | |
virtual bool | HasAtLeastOneRef () const =0 |
Returns true if the reference count is at least 1. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CefBaseRefCounted | |
virtual | ~CefBaseRefCounted () |
Implement this interface to filter resource response content.
The methods of this class will be called on the browser process IO thread.
|
pure virtual |
Called to filter a chunk of data.
Expected usage is as follows:
This method will be called repeatedly until the input buffer has been fully read (user sets |data_in_read| = |data_in_size|) and there is no more input data to filter (the resource response is complete). This method may then be called an additional time with an empty input buffer if the user filled the output buffer (set |data_out_written| = |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is still pending.
Calls to this method will stop when one of the following conditions is met:
Do not keep a reference to the buffers passed to this method.
|
pure virtual |
Initialize the response filter.
Will only be called a single time. The filter will not be installed if this method returns false.