Files
tubestation/mobile/android/android-components/components/browser/engine-gecko
Ben Dean-Kawamura db4133a891 [components] Updating browser-engine-gecko to work with the new logins API
Switched the login saving interfaces to using `LoginEntry`, which
matches the change in `LoginValidationDelegate`.

The select login code still uses `Login`, but I changed how the
conversion from `GeckoView.LoginEntry` works.  Now it checks if the guid
is set, and ignores the login if not.  This is needed because a) guid is
no longer nullable and b) `areItemsTheSame()` in `BasicLoginAdapter.kt`
uses the guid to compare rows in the select list.  I'm pretty sure the
guid should always be set because those login entries ultimately come
from a `List<Login>`.

Removed the `GeckoView.LoginEntry` -> `Login` conversion from
`ext/Login.kt`.  It's now more dangerous to call, since it will throw if
guid is null.  I think it's better to force the calling code to write
the `!!` themselves to make this clear.
2021-10-13 20:30:28 -07:00
..

Android Components > Browser > Engine-Gecko

Engine implementation based on GeckoView.

Usage

Setting up the dependency

Use Gradle to download the library from maven.mozilla.org (Setup repository):

implementation "org.mozilla.components:browser-engine-gecko:{latest-version}"

Integration with the Glean SDK

Before using this component

Products sending telemetry and using this component must request a data-review following this process.

The Glean SDK can be used to collect Gecko Telemetry. Applications using both this component and the Glean SDK should setup the Gecko Telemetry delegate as shown below:

    val builder = GeckoRuntimeSettings.Builder()
    val runtimeSettings = builder
        .telemetryDelegate(GeckoGleanAdapter()) // Sets up the delegate!
        .build()
    // Create the Gecko runtime.
    GeckoRuntime.create(context, runtimeSettings)

Adding new metrics

New Gecko metrics can be added as described in the Firefox Telemetry docs.

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/