Package org.mozilla.geckoview
package org.mozilla.geckoview
This package contains the public interfaces for the library.
GeckoRuntime
is the entry point for starting and initializing Gecko. You can use this to preload Gecko before you need to load a page or to configure features such as crash reporting.GeckoSession
is where most interesting work happens, such as loading pages. It relies onGeckoRuntime
to talk to Gecko.GeckoView
is the embeddableView
. This is the most common way of getting aGeckoSession
onto the screen.
Permissions
This library does not request any dangerous permissions in the manifest, though it's possible
that some web features may require them. For instance, WebRTC video calls would need the Manifest.permission.CAMERA
and Manifest.permission.RECORD_AUDIO
permissions. Declaring these are at the application's discretion. If you want full web
functionality, the following permissions should be declared:
Manifest.permission.ACCESS_COARSE_LOCATION
Manifest.permission.ACCESS_FINE_LOCATION
Manifest.permission.READ_EXTERNAL_STORAGE
Manifest.permission.WRITE_EXTERNAL_STORAGE
Manifest.permission.CAMERA
Manifest.permission.RECORD_AUDIO
-
ClassDescriptionThis represents a decision to allow or deny a request.The Autocomplete API provides a way to leverage Gecko's input form handling for autocompletion.Holds address information for a specific entry.Holds information required to process address saving requests.Holds information required to process address selection requests.Hint types for credit card selection requests.Holds credit card information for a specific entry.Holds information required to process credit card saving requests.Holds information required to process credit card selection requests.Hint types for credit card selection requests.Holds login information for a specific entry.Holds information required to process login saving requests.Holds information required to process login selection requests.Abstract base class for Autocomplete options.Abstract base class for saving options.Hint types for login saving requests.Abstract base class for saving options.Hint types for selection requests.Implement this interface to handle runtime login storage requests.Possible login entry field types for
Autocomplete.StorageDelegate.onLoginUsed(org.mozilla.geckoview.Autocomplete.LoginEntry, int)
.Represents an autofill node.Represents autofill data associated to aAutofill.Node
.Represents an autofill session.Class that implements a basic SelectionActionDelegate.Content Blocking API to hold and control anti-tracking, cookie and Safe Browsing settings.Holds content block event details.GeckoSession applications implement this interface to handle content blocking events.Possible settings for ETP.Holds configuration for a SafeBrowsing provider.ContentBlockingController is used to manage and modify the content blocking exception list.An entry in the content blocking log for a site.Data about why a given entry was blocked.Sends a crash report to the Mozilla Socorro crash report server.Additional metadata about a deprecation notice.This delegate is used to pass experiment information between the embedding application and GeckoView.An exception to be used when there is an issue retrieving or sending information to the experiment framework.Experiment exception error codes.Applications use a GeckoDisplay instance to provideGeckoSession
with aSurface
for displaying content.Interface that allows Gecko the request a new Surface from the application.Builder to construct screenshot requests.Wrapper class containing a Surface and associated information that the compositor should render in to.Helper class for constructing aGeckoDisplay.SurfaceInfo
object.GeckoResult<T>GeckoResult is a class that represents an asynchronous result.Interface used to delegate cancellation operations for aGeckoResult
.Replacement forConsumer
for devices with minApi < 24.An interface used to deliver exceptions to listeners of aGeckoResult
An interface used to mapGeckoResult
exceptions.An interface used to deliver values to listeners of aGeckoResult
An interface used to mapGeckoResult
values.This is used to allow GeckoRuntime to start activities via the embedding application (andActivity
).Settings builder used to construct the settings object.The trusted recursive resolver (TRR) modes.See the `WebContentIsolationStrategy` enum in `ProcessIsolation.cpp`.Contains information about a product's analysis status response.This is a Builder used by AnalysisStatusResponse classElement details for onContextMenu callbacks.Represent the result of a find-in-page operation.Thrown when failure occurs when printing from a website.An interface for recording new history visits and fetching the visited status for links.A representation of an entry in browser history.A representation of browser history, accessible as a `List`.Main entry point for loading URIs into aGeckoSession
.GeckoSession applications implement this interface to handle media events.Load request details.Represent the result of a save-pdf operation.GeckoSession applications implement this interface to handle requests for permissions from content, such as geolocation and notifications.Callback interface for notifying the result of a permission request.Represents a content permission -- including the type of permission, the present value of the permission, the URL the permission pertains to, and other information.Callback interface for notifying the result of a media permission request, including which media source(s) to use.Used for printing page content.Class representing security information for a site.GeckoSession applications implement this interface to handle prompts triggered by content in the GeckoSession, such as alerts, authentication dialogs, and select list pickers.AlertPrompt contains the information necessary to represent a JavaScript alert() call from content; it can only be dismissed, not confirmed.AuthPrompt contains the information necessary to represent an HTML authorization prompt generated by content.Auth prompt flags.Auth prompt levels.Request containing information required to resolve Autocomplete prompt requests.BeforeUnloadPrompt represents the onbeforeunload prompt.ButtonPrompt contains the information necessary to represent a JavaScript confirm() call from content.ChoicePrompt contains the information necessary to display a menu or list prompt generated by content.ColorPrompt contains the information necessary to represent a prompt for color input generated by content.DateTimePrompt contains the information necessary to represent a prompt for date and/or time input generated by content.FilePrompt contains the information necessary to represent a prompt for a file or files generated by content.Possible capture attribute values.Types of file prompts.Contains all the Identity credential prompts (FedCM)AccountSelectorPrompt contains the information necessary to represent a prompt that allows the user to select the account they would like to use.A representation of an Identity Credential Account.A representation of an Identity Credential Provider for an Account Selector PromptA representation of an Identity Credential Provider Accounts.PrivacyPolicyPrompt contains the information necessary to represent a prompt that allows the user to indicate if agrees or not with the privacy policy of the identity credential provider.ProviderSelectorPrompt contains the information necessary to represent a prompt that allows the user to select the identity credential provider they would like to use.A representation of an Identity Credential Provider.PopupPrompt contains the information necessary to represent a popup blocking request.PromptResponse is an opaque class created upon confirming or dismissing a prompt.RepostConfirmPrompt represents a prompt shown whenever the browser needs to resubmit POST data (e.g.SharePrompt contains the information necessary to represent a (v1) WebShare request.Possible results to aGeckoSession.PromptDelegate.SharePrompt
.TextPrompt contains the information necessary to represent a Javascript prompt() call from content.Contains information about a product recommendation.This is a Builder used by Recommendation classContains information about the analysis of a product's reviews.This is a Builder used by ReviewAnalysis classContains information about highlights of a product's reviews.GeckoSession applications implement this interface to handle content scroll events.Represents attributes of a clipboard permission.Represents attributes of a selection.Class representing a saved session state.Interface that SessionTextInput uses for performing operations such as opening and closing the software keyboard.WebResponseInfo contains information about a single web response.Settings builder used to construct the settings object.This value is for the display member of Web App ManifestsThe user agent string modeThe view port modeThis delegate is used to provide the GeckoView an Activity context for certain operations such as retrieving a PrintManager, which requires an Activity context.Interface for registering the external VR context with WebVR.GeckoWebExecutor is responsible for fetching aWebRequest
and delivering aWebResponse
to the caller viaGeckoWebExecutor.fetch(WebRequest)
.Represents an Web API image resource as used in web app manifests and media session metadata.Thrown whenever an image cannot be processed byImage.getBitmap(int)
The MediaSession API provides media controls and events for a GeckoSession.Implement this delegate to receive media session events.The representation of a media element's metadata.Flags for supported media session features.The representation of a media session's metadata.Holds the details of the media session's playback state.This delegate will be called whenever an orientation lock is called.Represents how aMotionEvent
was handled in Gecko.ProfilerController is used to manage GeckoProfiler related features.Base class for (nested) runtime settings.RuntimeSettings.Builder<Settings extends RuntimeSettings>Base class for (nested) runtime settings builders.ScreenLength is a class that represents a length on the screen using different units.SessionFinder
instances returned byGeckoSession.getFinder()
performs find-in-page operations.PdfFileSaver
instances returned byGeckoSession.getPdfFileSaver()
performs save operation.SessionTextInput
handles text input forGeckoSession
through key events or input methods.Used by a ContentDelegate to indicate what action to take on a slow script event.Manage runtime storage data.Flags used for data clearing operations.The translations controller coordinates the session and runtime messaging between GeckoView and the translations toolkit.Language display information.Runtime translation coordinates runtime messaging between the translations toolkit actor and GeckoView.Information about a language model.The runtime language settings a given language may have that dictates the app's translation offering behavior.Options for managing the translation language models.Builder for Model Management OptionsOperations toolkit can perform on the language models.Operation type for toolkit to operate on.Language translation options.Session translation coordinates session messaging between the translations toolkit actor and GeckoView.The translations session delegate is used for receiving translation events and information.DetectedLanguages is information that was detected about the page or user preferences.Options available for translating.Builder for making translation options.Translation pair is the from language and to language set on the translation state.The representation of the translation state.An exception to be used when there is an issue retrieving or sending information to the translations toolkit engine.Translation exception error codes.Represents a WebExtension that may be used by GeckoView.Represents either a Browser Action or a Page Action from the WebExtension API.Receives updates whenever a Browser action or a Page action has been defined by an extension.Describes the blocklist state for aWebExtension
.This delegate is used to handle calls from the |browsingData| WebExtension API.This class represents the current default settings for the "Clear Data" functionality in the browser.Types of data that a browser "Clear Data" UI might have access to.Provides details about creating a tab withtabs.create
.Represents a download for downloads API Instantiate usingWebExtensionController.createDownload(int)
Represents a possible reason why a download was interrupted.Represents a download in progress where the app is currently receiving data from the server.Interface for communicating the state of downloads to Web Extensions.Represents initial information on a download provided to Web ExtensionRepresents Web Extension API specific download requestExtension thrown when an error occurs during extension installation.Delegates that responds to messages sent from a WebExtension.Describes the sender of a message from a WebExtension.Holds all the information which the user has submited as part of a confirmation of a permissions prompt request.Port object that can be used for bidirectional communication with a WebExtension.Delegate that handles communication from a WebExtension on a specificWebExtension.Port
instance.This delegate is invoked whenever an extension uses the `tabs` WebExtension API to modify the state of a tab.Describes the signed status for aWebExtension
.This delegate is invoked whenever an extension uses the `tabs` WebExtension API and the request is not specific to an existing tab, e.g.Provides details about upating a tab withtabs.update
.This delegate will be called whenever the state of an extension has changed.Contains the possible values for thesource
parameter inWebExtensionController.enable(org.mozilla.geckoview.WebExtension, int)
andWebExtensionController.disable(org.mozilla.geckoview.WebExtension, int)
.This delegate is used to notify of extension process state changes.The method used by the embedder to install theWebExtension
.This delegate will be called whenever an extension is about to be installed or it needs new permissions, e.g during an update or because it calledpermissions.request
This is an abstract base class for HTTP request and response types.This is a Builder used by subclasses ofWebMessage
.This class represents a single Web Notification.This class represents a single Web Push subscription, as described in the Web Push API specification.WebRequest represents an HTTP[S] request.Builder offers a convenient way for constructingWebRequest
instances.WebRequestError is simply a container for error codes and categories used byGeckoSession.NavigationDelegate.onLoadError(GeckoSession, String, WebRequestError)
.WebResponse represents an HTTP[S] response.Builder offers a convenient way to create WebResponse instances.