roadlabs / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Implement LifespanHandler #139

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
By now, it is partially "Not yet ported to cefpython."

I am providing a patch, which is based on revision c1260fb985e6

The Patch additionally adds support for windowInfo and browserSupport arguments 
of OnBeforePopup.

Tested only on Linux 64.

Original issue reported on code.google.com by allestue...@gmail.com on 24 Sep 2014 at 4:22

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch. In OnBeforePopup it should be allowed for browserSettings 
and windowInfo to be optional/empty lists, so that it is backwards compatible.

Original comment by czarek.t...@gmail.com on 24 Sep 2014 at 7:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
OK, here's the updated patch.

Again, tested only on Linux64.

Original comment by allestue...@gmail.com on 28 Sep 2014 at 2:08

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in revision 6b141a8f54b4. The following fixes were applied to the patch:
 * Added usage example to wxpython.py. Please include tests next time.
 * LifespanHandler_OnAfterCreated returned cpp_bool instead of void
 * Callbacks that return cpp_bool should cast its value using bool() otherwise warnings appear during compilation
 * When using comparison operators please put the const value on the right, so that it is consistent with existing code base
 * OnAfterCreated callback cannot be included in allowedClientCallbacks list in SetClientCallback_CEF3. It is called during browser creation, thus will only work if set as a global client callback using cefpython.`SetGlobalClientCallback()`.

Original comment by czarek.t...@gmail.com on 14 Oct 2014 at 8:50