Move the requestID argument before the result

This tries to get the order of declaration to be consistent.
It also follows the order used by Chromium in some places
where the routing_id usually comes first, then the request_id
and then the result of the asynchronous request.

Change-Id: I88e164dee67e1631161a222f7dd7a4679c3d3acd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Refactor the way callbacks are stored

With the upcoming addition of a new type of callback result, this
patch allows storing multiple callback types in the same QHash instead
or requiring a different hash table just to please the type system.

This does so by managing the ref-counted callback pointers directly
instead of relying on a templated QExplicitlySharedDataPointer that
requires a different type for each different callback pointer type.

The ref-counting, construction and destruction is managed through
a run-time type enum.

Change-Id: I90ab2e1efc0c9703fc5b6ef57b38204ac8eea828
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Update the invoke wrapper to allow bool arguments

Forcing that arguments to be const references isn't necessary and
prevents base types to be passed by value.

Change-Id: I53ace8cf731ecaeee0b997af72d37843ef54e38f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Implement QWebEnginePage::selectedText

Change-Id: Idebde8da0befbea7ccc5942de1e09fcc61ce16d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Implement QWebEnginePage::findText

A few changes to the API:
- Return the success result asynchronously.
- FindWrapsAroundDocument and HighlightAllOccurrences are enabled by
  defaults and cannot be disabled.
- Found text isn't updating the selection on the page like QtWebKit
  did, but triggers a separate state not available. A find count and
  current index could be exposed, but isn't in this case to keep the
  API delta lower.

This also adds the possibility to pass bool results through the
CallbackDirectory and add a new tst_QWebEnginePage::findTextResult
test since the old test relied on the selection to be updated when
the searched text is found.

Change-Id: I8189b5aea8d832df183c6c1ae03e3f08198a9c45
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Update the 3rdparty submodule

Also add the matching patch files.

Change-Id: I7c9e2ace4070cb1bcbe43286e9d1ad207b389eb6
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix path service assertions

Registering a path provider did not turn out to be a
clean enough solution for overriding chromium paths
because of debug assertions that require the key range
not to collide with already registered path providers.
Instead of patching chromium or using workarounds switch
back to using PathService::Override and only replace the
jni-based default PathProviderAndroid on embedded android.

Change-Id: I4530bc8fa3eba36c0d2403729be9a792f3c2120f
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>