Commit 6d760436 authored by Jocelyn Turcotte's avatar Jocelyn Turcotte Committed by The Qt Project
Browse files

Refactor the callback mechanism used by runJavaScript


This prepares the way for other API made async like toHtml and
toPlainText.

Use a callback class with an implicit templated constructor to carry
the functor across the API boundary and avoid the intermediate helper
method as the ABI that we have to maintain.

Also pass the callback result through WebContentsAdapterClient using
a bookkeeping ID instead of transferring the callback to
WebContentsAdapter. This will allow other calls, which might not
already allow passing a callback functor, to use a consisten way
of carrying back the result to the top API layer.

Change-Id: Ia923767b9c1021a108c26da17d4c41878ef7cb95
Reviewed-by: default avatarPierre Rossi <pierre.rossi@gmail.com>
Showing with 59 additions and 49 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment