This is a workaround for Firefox for Fire TV to play DRM content automatically.
Eventually we want to implement this API in a way that the app (or another component) can
handle those requests. See: https://github.com/mozilla-mobile/android-components/issues/1157
The goal is to provide our engines with ability to query for browser history
and to record visits and page metadata updates (e.g. title changes).
GeckoView's APIs are still being implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1494713,
so this works from the implementation notes. WebView's APIs are well known.
History delegate is optional. Absence of it in settings when configuring an engine as akin to
disabling history tracking.
This patch explicitly doesn't provide an implementation of a delegate.
I decided to move the mappings to the respective EngineSession instead
of having them in the Engine, since it wasn't possible to have them
easily accessible from there via the RequestInterceptor. It made more
sense to keep them hidden inside the session as a companion function for
easier testing.
On the same note, tests have also been included.
Added an interceptor the SystemEngine sample app.
Cleaned up the styling of the actual error page HTML to make them more
mobile friendly.
Background: We are going to reserve the name "strings.xml" for translatable strings. This avoids that
our L10N tools need to be able to parse and process all kinds of resources that are not strings.
If we want to load an error page, we can return it to the interceptor,
along with a custom URL to show on the screen.
Tests for the GeckoView implementation will follow up. This change
should unblock SystemEngine clients for now.
When we add the fullscreen view into the FrameLayout, we were taking the
original WebView and hiding it with View.GONE which doesn't take up any
layout space. View.INVISIBLE doesn't show the view, but continues to
use the space that it would if it did exist (drawing in the background).
For websites like YouTube and BBC.com/ideas, the video provided to us
was of a smaller size and resolution so it didn't take the fullscreen
and ended up shrinking to it's original size view size. 🤦
* Adding captureThumbnail to EngineSession
* Updating TabViewHolder to add thumbnail
* Adding thumbnail to Session
* Adding a new product flavor for systemEngine
We're only waiting until the page is fully loaded until we call
onNavigationStateChange, which causes the UI components to seem slow.
Now, we make the call when we receive a title from the SystemEngine.
This only includes the implementation for the SystemWebView that's based
off of what we currently do in Focus/Fire TV. Since this is needed for
those apps now, we can work with this implementation until GeckoView
provides us with a nicer API to do the equivalent for it. (Bug 1489669)
We also don't notify any observers since there isn't any
confirmation/information available that we can propagate to cients.
* Adding desktopMode property to Session
* Adding onDesktopModeChanged in Session
* Renaming RequestDesktopSite to RequestDesktopSiteUseCase to follow
the convention
* Implementing onDesktopModeChange in EngineObserver
Renaming:
On EngineSession.Observer
from onDesktopModeEnabled to onDesktopModeChange
from setDesktopMode to toggleDesktopMode
On Session
from onDesktopModeEnabledChanged to onDesktopModeChanged