Frage

How can one defines a custom scheme handler for CEF in Python using CEFPython?

I've found this thread that explains how to define a CefSchemeHandlerFactory and CefSchemeHandler in C++. But I can't find out how should I employ CefBase as a base type to implement these classes in Python and where is the documentation for equivalent classes in Python.

War es hilfreich?

Lösung

Custom scheme support is not yet implemented in CEF Python, see Issue 50 "Add custom scheme support":

https://code.google.com/p/cefpython/issues/detail?id=50

You could probably accomplish the same thing using OnBeforeResourceLoad() and/or GetResourceHandler(). See the RequestHandler wiki page:

https://code.google.com/p/cefpython/wiki/RequestHandler

There is the wxpython-response.py example that uses GetResourceHandler to intercept all resources being loaded:

https://code.google.com/p/cefpython/source/browse/cefpython/cef3/linux/binaries_64bit/wxpython-response.py?r=dfff7897665f

See also Issue 49 "Implement OnBeforeResourceLoad" (CEF Python 1), some comments might give you insight on how things are:

https://code.google.com/p/cefpython/issues/detail?id=49

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top