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

QQuickWebEngineView new window API refactoring


Improve the code and API in a few ways:
- Expose a more discoverable "request" argument in the signal.
- Use the request as the carrier of the backend WebContentsAdapter
  and get rid of our handle.
- Put the adoption method (renamed to openIn) on the request object
  and keep the view API clean of a context-specific adoptHandle method.
- Use an enum instead of strings for the new view destination.
- Do not let JavaScript own the request object since it won't be
  necessary until we want to support asynchronous view attachment.
  We can create the request object on the heap and let the JavaScript
  engine own the object once we want to support it.
- Move the request class to its own header.
- Replace tabs.currentView by currentWebView in the quicknanobrowser
  qml code since we now need this property on the root object anyway.

Change-Id: I40d7d15255f516ead9f3e414dd587bf345e6ca4b
Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
parent 185e8a02
Showing with 215 additions and 101 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