This includes UI in private tabs.
Squashed commits:
[180e515e8] Connect to Session Observer and thence to AppLinksFeature.
[77922dcc0] browser-engine-system tests passing
[045717868] lint etc
[6f7b44cad] Thread another Boolean through EngineObserver -> Session onLoadRequest
[18693cad0] Start testing the feature.
[5e0a93556] Fixup tests to use shadow package manager, and catch some new bugs.
[3a5976dde] Split use cases up for menu and intercepting cases.
[f7eae96dd] Address reviewer comments re: dead code and docs
[b15ffb88c] Rename triggeredByUserInteraction to loadRequestTriggeredByUserInteraction
[edc49b573] Move session observer into member of feature
[91ed1f5ac] Add changelog entry
[098dc5067] Add boolean flag to prevent interception of links
[f92731a44] Add load request/trigger by user interaction to session.observer
[46385577d] Move opening to another use case, with test
[56da7e7c1] Change into using feature
[643c9f453] Remove duplicate copyright
[6b3f80bbc] Add testing of get and a fragment for open use cases
[669c84567] Add AppLinksRedirectConfig and supporting use cases.
There is a url redirect creation use case, a load URL use case and an interceptor.
[72896a567] AppLinksUseCases detects if a URL can be opened with another non-browser app
[939eb62fa] Initial commit of empty feature-app-links
This shifts responsibility of constructing a VisitType for any given visit on the
caller of HistoryTrackingDelegate implementation, which is normally the engine.
This is generally what we want: engine is normally best suited to determine a visit type
for a URI that's currently being opened.
Co-authored-by: Sebastian Kaspari <s.kaspari@googlemail.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
- The WebView instance is long-lived, as it's referenced in
SystemEngineSession, and we want to be able to keep engine
sessions around for the lifespan of the application.
- The WebView instance is created by the engine and using its
context (the application context).
- The EngineView, rendering engine sessions and WebViews,
is created using an activity context.
- The problem was that when the activity and EngineView were
destroyed, the WebView was not being detached and still
referenced the parent which referenced the activity context,
which would then not get gc'ed.
- We now detach the WebView when the EngineView is destroyed
and only destroy the WebView when the session is closed.
- This will allow re-using of engine sessions and their
WebViews in different activities and allow for proper
destruction.
The main change here is that EngineSessionHolder can now hold an EngineState and this state
is used when we need to create an EngineSession (which will clear the state). This has the
following advantages:
* When restoring we can just attach the EngineState and do not need to create the
EngineSession immediately. With that we do not load all the EngineSessions and everything
at once. Initially only the selected EngineSession will be created and loaded. That will
make the restore faster and use less resources when restoring a lot of sessions.
* (Not in this commit, for a follow-up) It allows us to close EngineSession instances and
just keep the EngineState around until we need the EngineSession again. That's something
we could do in low memory situations or when there are just too many sessions/tabs open
to be performant (e.g. only keep the last recently used EngineSession instances around).