Skip to content

ContentFilterHandler

Dominique B edited this page Feb 2, 2016 · 2 revisions

ContentFilterHandler callbacks

See the ContentFilter object.

You must keep a strong reference to the ContentFilterHandler object, otherwise it gets destroyed and callbacks are not called, CEF Python keeps only a weak reference to this object.

CEF 1

The methods of this handler will always be called on the UI thread.

void OnData(str data, StreamReader substitute_data)

Set |substitute_data| to the replacement for the data in |data| if data should be modified.

void OnDrain(StreamReader remainder)

Called when there is no more data to be processed. It is expected that whatever data was retained in the last OnData() call, it should be returned now by setting |remainder| if appropriate.

Clone this wiki locally