gecko-dev/mobile/android/geckoview/api.txt

1324 строки
70 KiB
Plaintext

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.ActionMode;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewStructure;
import android.view.autofill.AutofillValue;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection;
import android.widget.FrameLayout;
import java.io.File;
import java.io.InputStream;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Class;
import java.lang.Exception;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Object;
import java.lang.Runnable;
import java.lang.RuntimeException;
import java.lang.String;
import java.lang.Throwable;
import java.lang.Void;
import java.net.InetAddress;
import java.nio.ByteBuffer;
import java.util.AbstractSequentialList;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
import org.mozilla.geckoview.AllowOrDeny;
import org.mozilla.geckoview.CompositorController;
import org.mozilla.geckoview.ContentBlocking;
import org.mozilla.geckoview.DynamicToolbarAnimator;
import org.mozilla.geckoview.GeckoDisplay;
import org.mozilla.geckoview.GeckoResponse;
import org.mozilla.geckoview.GeckoResult;
import org.mozilla.geckoview.GeckoRuntime;
import org.mozilla.geckoview.GeckoRuntimeSettings;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoSessionSettings;
import org.mozilla.geckoview.GeckoView;
import org.mozilla.geckoview.MediaElement;
import org.mozilla.geckoview.OverscrollEdgeEffect;
import org.mozilla.geckoview.PanZoomController;
import org.mozilla.geckoview.RuntimeSettings;
import org.mozilla.geckoview.RuntimeTelemetry;
import org.mozilla.geckoview.ScreenLength;
import org.mozilla.geckoview.SessionAccessibility;
import org.mozilla.geckoview.SessionFinder;
import org.mozilla.geckoview.SessionTextInput;
import org.mozilla.geckoview.StorageController;
import org.mozilla.geckoview.WebExtension;
import org.mozilla.geckoview.WebExtensionController;
import org.mozilla.geckoview.WebExtensionEventDispatcher;
import org.mozilla.geckoview.WebMessage;
import org.mozilla.geckoview.WebRequest;
import org.mozilla.geckoview.WebRequestError;
import org.mozilla.geckoview.WebResponse;
package org.mozilla.geckoview {
@AnyThread public final enum AllowOrDeny {
method public static AllowOrDeny valueOf(String);
method public static AllowOrDeny[] values();
enum_constant public static final AllowOrDeny ALLOW;
enum_constant public static final AllowOrDeny DENY;
}
@UiThread public class BasicSelectionActionDelegate implements ActionMode.Callback GeckoSession.SelectionActionDelegate {
ctor public BasicSelectionActionDelegate(@NonNull Activity);
ctor public BasicSelectionActionDelegate(@NonNull Activity, boolean);
method public boolean areExternalActionsEnabled();
method public void enableExternalActions(boolean);
method public void onGetContentRect(@Nullable ActionMode, @Nullable View, @NonNull Rect);
method protected void clearSelection();
method @NonNull protected String[] getAllActions();
method protected boolean isActionAvailable(@NonNull String);
method protected boolean performAction(@NonNull String, @NonNull MenuItem);
method protected void prepareAction(@NonNull String, @NonNull MenuItem);
field protected static final String ACTION_PROCESS_TEXT = "android.intent.action.PROCESS_TEXT";
field @Nullable protected ActionMode mActionMode;
field @Nullable protected List<String> mActions;
field @NonNull protected final Activity mActivity;
field protected boolean mRepopulatedMenu;
field @Nullable protected GeckoResponse<String> mResponse;
field @Nullable protected GeckoSession.SelectionActionDelegate.Selection mSelection;
field @Nullable protected GeckoSession mSession;
field @NonNull protected final Matrix mTempMatrix;
field @NonNull protected final RectF mTempRect;
field protected final boolean mUseFloatingToolbar;
}
@UiThread public final class CompositorController {
method public void addDrawCallback(@NonNull Runnable);
method public int getClearColor();
method @Nullable public Runnable getFirstPaintCallback();
method public void removeDrawCallback(@NonNull Runnable);
method public void setClearColor(int);
method public void setFirstPaintCallback(@Nullable Runnable);
}
@AnyThread public class ContentBlocking {
ctor public ContentBlocking();
}
public static class ContentBlocking.AntiTracking {
ctor protected AntiTracking();
field public static final int AD = 2;
field public static final int ANALYTIC = 4;
field public static final int CONTENT = 16;
field public static final int CRYPTOMINING = 64;
field public static final int DEFAULT = 46;
field public static final int FINGERPRINTING = 128;
field public static final int NONE = 0;
field public static final int SOCIAL = 8;
field public static final int STRICT = 254;
field public static final int TEST = 32;
}
public static class ContentBlocking.BlockEvent {
ctor public BlockEvent(@NonNull String, int, int, int, boolean);
method @UiThread public int getAntiTrackingCategory();
method @UiThread public int getCookieBehaviorCategory();
method @UiThread public int getSafeBrowsingCategory();
method @UiThread public boolean isBlocking();
field @NonNull public final String uri;
}
public static class ContentBlocking.CookieBehavior {
ctor protected CookieBehavior();
field public static final int ACCEPT_ALL = 0;
field public static final int ACCEPT_FIRST_PARTY = 1;
field public static final int ACCEPT_NONE = 2;
field public static final int ACCEPT_NON_TRACKERS = 4;
field public static final int ACCEPT_VISITED = 3;
}
public static class ContentBlocking.CookieLifetime {
ctor protected CookieLifetime();
field public static final int DAYS = 3;
field public static final int NORMAL = 0;
field public static final int RUNTIME = 2;
}
public static interface ContentBlocking.Delegate {
method @UiThread default public void onContentBlocked(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
method @UiThread default public void onContentLoaded(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
}
public static class ContentBlocking.SafeBrowsing {
ctor protected SafeBrowsing();
field public static final int DEFAULT = 15360;
field public static final int HARMFUL = 4096;
field public static final int MALWARE = 1024;
field public static final int NONE = 0;
field public static final int PHISHING = 8192;
field public static final int UNWANTED = 2048;
}
@AnyThread public static class ContentBlocking.Settings extends RuntimeSettings {
method public int getAntiTrackingCategories();
method public int getCookieBehavior();
method public int getCookieLifetime();
method public int getSafeBrowsingCategories();
method @NonNull public ContentBlocking.Settings setAntiTracking(int);
method @NonNull public ContentBlocking.Settings setCookieBehavior(int);
method @NonNull public ContentBlocking.Settings setCookieLifetime(int);
method @NonNull public ContentBlocking.Settings setSafeBrowsing(int);
field public static final Parcelable.Creator<ContentBlocking.Settings> CREATOR;
}
@AnyThread public static class ContentBlocking.Settings.Builder extends RuntimeSettings.Builder {
ctor public Builder();
method @NonNull public ContentBlocking.Settings.Builder antiTracking(int);
method @NonNull public ContentBlocking.Settings.Builder cookieBehavior(int);
method @NonNull public ContentBlocking.Settings.Builder cookieLifetime(int);
method @NonNull public ContentBlocking.Settings.Builder safeBrowsing(int);
method @NonNull protected ContentBlocking.Settings newSettings(@Nullable ContentBlocking.Settings);
}
public class CrashReporter {
ctor public CrashReporter();
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull Intent, @NonNull String);
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull Bundle, @NonNull String);
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull File, @NonNull File, @NonNull String);
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull File, @NonNull Map<String,String>, @NonNull String);
}
@UiThread public final class DynamicToolbarAnimator {
method @Nullable public DynamicToolbarAnimator.ToolbarChromeProxy getToolbarChromeProxy();
method public void hideToolbar(boolean);
method public boolean isPinned();
method public boolean isPinnedBy(@NonNull DynamicToolbarAnimator.PinReason);
method public void setMaxToolbarHeight(int);
method public void setPinned(boolean, @NonNull DynamicToolbarAnimator.PinReason);
method public void setToolbarChromeProxy(@Nullable DynamicToolbarAnimator.ToolbarChromeProxy);
method public void showToolbar(boolean);
}
@AnyThread public static final enum DynamicToolbarAnimator.PinReason {
method public static DynamicToolbarAnimator.PinReason valueOf(String);
method public static DynamicToolbarAnimator.PinReason[] values();
enum_constant public static final DynamicToolbarAnimator.PinReason ACTION_MODE;
enum_constant public static final DynamicToolbarAnimator.PinReason CARET_DRAG;
enum_constant public static final DynamicToolbarAnimator.PinReason CUSTOM_TAB;
enum_constant public static final DynamicToolbarAnimator.PinReason DISABLED;
enum_constant public static final DynamicToolbarAnimator.PinReason FULL_SCREEN;
enum_constant public static final DynamicToolbarAnimator.PinReason PAGE_LOADING;
enum_constant public static final DynamicToolbarAnimator.PinReason RELAYOUT;
field public final int value;
}
public static interface DynamicToolbarAnimator.ToolbarChromeProxy {
method @UiThread @Nullable default public Bitmap getBitmapOfToolbarChrome();
method @UiThread default public boolean isToolbarChromeVisible();
method @UiThread default public void toggleToolbarChrome(boolean);
}
public class GeckoDisplay {
ctor protected GeckoDisplay(GeckoSession);
method @UiThread @NonNull public GeckoResult<Bitmap> capturePixels();
method @UiThread public void screenOriginChanged(int, int);
method @UiThread public void setVerticalClipping(int);
method @UiThread public boolean shouldPinOnScreen();
method @UiThread public void surfaceChanged(@NonNull Surface, int, int);
method @UiThread public void surfaceChanged(@NonNull Surface, int, int, int, int);
method @UiThread public void surfaceDestroyed();
}
public interface GeckoResponse<T> {
method @AnyThread public void respond(@Nullable T);
}
@AnyThread public class GeckoResult<T> {
ctor public GeckoResult();
ctor public GeckoResult(Handler);
ctor public GeckoResult(GeckoResult<T>);
method @NonNull public GeckoResult<Void> accept(@Nullable GeckoResult.Consumer<T>);
method @NonNull public GeckoResult<Void> accept(@Nullable GeckoResult.Consumer<T>, @Nullable GeckoResult.Consumer<Throwable>);
method public synchronized void complete(@Nullable T);
method public synchronized void completeExceptionally(@NonNull Throwable);
method @NonNull public <U> GeckoResult<U> exceptionally(@NonNull GeckoResult.OnExceptionListener<U>);
method @NonNull public static <T> GeckoResult<T> fromException(@NonNull Throwable);
method @NonNull public static <U> GeckoResult<U> fromValue(@Nullable U);
method @Nullable public Looper getLooper();
method @Nullable public synchronized T poll();
method @Nullable public synchronized T poll(long);
method @NonNull public <U> GeckoResult<U> then(@NonNull GeckoResult.OnValueListener<T,U>);
method @NonNull public <U> GeckoResult<U> then(@Nullable GeckoResult.OnValueListener<T,U>, @Nullable GeckoResult.OnExceptionListener<U>);
method @NonNull public GeckoResult<T> withHandler(@Nullable Handler);
field public static final GeckoResult<AllowOrDeny> ALLOW;
field public static final GeckoResult<AllowOrDeny> DENY;
}
public static interface GeckoResult.Consumer<T> {
method @AnyThread public void accept(@Nullable T);
}
public static interface GeckoResult.OnExceptionListener<V> {
method @AnyThread @Nullable public GeckoResult<V> onException(@NonNull Throwable);
}
public static interface GeckoResult.OnValueListener<T,U> {
method @AnyThread @Nullable public GeckoResult<U> onValue(@Nullable T);
}
public static final class GeckoResult.UncaughtException extends RuntimeException {
ctor public UncaughtException(Throwable);
}
public final class GeckoRuntime implements Parcelable {
ctor public GeckoRuntime();
method @UiThread public void attachTo(@NonNull Context);
method @UiThread public void configurationChanged(@NonNull Configuration);
method @UiThread @NonNull public static GeckoRuntime create(@NonNull Context);
method @UiThread @NonNull public static GeckoRuntime create(@NonNull Context, @NonNull GeckoRuntimeSettings);
method @UiThread @NonNull public static synchronized GeckoRuntime getDefault(@NonNull Context);
method @UiThread @Nullable public GeckoRuntime.Delegate getDelegate();
method @UiThread @Nullable public File getProfileDir();
method @AnyThread @NonNull public GeckoRuntimeSettings getSettings();
method @UiThread @NonNull public StorageController getStorageController();
method @UiThread @NonNull public RuntimeTelemetry getTelemetry();
method @UiThread @NonNull public WebExtensionController getWebExtensionController();
method @UiThread public void orientationChanged();
method @UiThread public void orientationChanged(int);
method @AnyThread public void readFromParcel(@NonNull Parcel);
method @UiThread @NonNull public GeckoResult<Void> registerWebExtension(@NonNull WebExtension);
method @UiThread public void setDelegate(@Nullable GeckoRuntime.Delegate);
method @AnyThread public void shutdown();
method @UiThread @NonNull public GeckoResult<Void> unregisterWebExtension(@NonNull WebExtension);
field public static final String ACTION_CRASHED = "org.mozilla.gecko.ACTION_CRASHED";
field public static final Parcelable.Creator<GeckoRuntime> CREATOR;
field public static final String EXTRA_CRASH_FATAL = "fatal";
field public static final String EXTRA_EXTRAS_PATH = "extrasPath";
field public static final String EXTRA_MINIDUMP_PATH = "minidumpPath";
}
public static interface GeckoRuntime.Delegate {
method @UiThread public void onShutdown();
}
@AnyThread public final class GeckoRuntimeSettings extends RuntimeSettings {
method @NonNull public String[] getArguments();
method public boolean getAutomaticFontSizeAdjustment();
method public int getAutoplayDefault();
method @Nullable public String getConfigFilePath();
method public boolean getConsoleOutputEnabled();
method @NonNull public ContentBlocking.Settings getContentBlocking();
method @Nullable public Class<?> getCrashHandler();
method @Nullable public Float getDisplayDensityOverride();
method @Nullable public Integer getDisplayDpiOverride();
method public boolean getDoubleTapZoomingEnabled();
method @NonNull public Bundle getExtras();
method public boolean getFontInflationEnabled();
method public float getFontSizeFactor();
method public int getGlMsaaLevel();
method public boolean getInputAutoZoomEnabled();
method public boolean getJavaScriptEnabled();
method @Nullable public String[] getLocales();
method public boolean getPauseForDebuggerEnabled();
method public int getPreferredColorScheme();
method public boolean getRemoteDebuggingEnabled();
method @Nullable public GeckoRuntime getRuntime();
method @Nullable public Rect getScreenSizeOverride();
method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
method public boolean getUseContentProcessHint();
method public boolean getUseMaxScreenDepth();
method public boolean getWebFontsEnabled();
method @NonNull public GeckoRuntimeSettings setAutomaticFontSizeAdjustment(boolean);
method @NonNull public GeckoRuntimeSettings setAutoplayDefault(int);
method @NonNull public GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setDoubleTapZoomingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setFontInflationEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setFontSizeFactor(float);
method @NonNull public GeckoRuntimeSettings setGlMsaaLevel(int);
method @NonNull public GeckoRuntimeSettings setInputAutoZoomEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setJavaScriptEnabled(boolean);
method public void setLocales(@Nullable String[]);
method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
field public static final int AUTOPLAY_DEFAULT_ALLOWED = 0;
field public static final int AUTOPLAY_DEFAULT_BLOCKED = 1;
field public static final int COLOR_SCHEME_DARK = 1;
field public static final int COLOR_SCHEME_LIGHT = 0;
field public static final int COLOR_SCHEME_SYSTEM = -1;
field public static final Parcelable.Creator<GeckoRuntimeSettings> CREATOR;
}
@AnyThread public static final class GeckoRuntimeSettings.Builder extends RuntimeSettings.Builder {
ctor public Builder();
method @NonNull public GeckoRuntimeSettings.Builder arguments(@NonNull String[]);
method @NonNull public GeckoRuntimeSettings.Builder automaticFontSizeAdjustment(boolean);
method @NonNull public GeckoRuntimeSettings.Builder autoplayDefault(int);
method @NonNull public GeckoRuntimeSettings.Builder configFilePath(@Nullable String);
method @NonNull public GeckoRuntimeSettings.Builder consoleOutput(boolean);
method @NonNull public GeckoRuntimeSettings.Builder contentBlocking(@NonNull ContentBlocking.Settings);
method @NonNull public GeckoRuntimeSettings.Builder crashHandler(@Nullable Class<?>);
method @NonNull public GeckoRuntimeSettings.Builder debugLogging(boolean);
method @NonNull public GeckoRuntimeSettings.Builder displayDensityOverride(float);
method @NonNull public GeckoRuntimeSettings.Builder displayDpiOverride(int);
method @NonNull public GeckoRuntimeSettings.Builder doubleTapZoomingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder extras(@NonNull Bundle);
method @NonNull public GeckoRuntimeSettings.Builder fontInflation(boolean);
method @NonNull public GeckoRuntimeSettings.Builder fontSizeFactor(float);
method @NonNull public GeckoRuntimeSettings.Builder glMsaaLevel(int);
method @NonNull public GeckoRuntimeSettings.Builder inputAutoZoomEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder javaScriptEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder locales(@Nullable String[]);
method @NonNull public GeckoRuntimeSettings.Builder pauseForDebugger(boolean);
method @NonNull public GeckoRuntimeSettings.Builder preferredColorScheme(int);
method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
method @NonNull public GeckoRuntimeSettings.Builder useContentProcessHint(boolean);
method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
}
public class GeckoSession implements Parcelable {
ctor public GeckoSession();
ctor public GeckoSession(@Nullable GeckoSessionSettings);
method @UiThread @NonNull public GeckoDisplay acquireDisplay();
method @UiThread public void close();
method @AnyThread @NonNull public static String createDataUri(@NonNull byte[], @Nullable String);
method @AnyThread @NonNull public static String createDataUri(@NonNull String, @Nullable String);
method @AnyThread public void exitFullScreen();
method @UiThread @NonNull public SessionAccessibility getAccessibility();
method @UiThread public void getClientBounds(@NonNull RectF);
method @UiThread public void getClientToScreenMatrix(@NonNull Matrix);
method @UiThread public void getClientToSurfaceMatrix(@NonNull Matrix);
method @UiThread @NonNull public CompositorController getCompositorController();
method @AnyThread @Nullable public ContentBlocking.Delegate getContentBlockingDelegate();
method @UiThread @Nullable public GeckoSession.ContentDelegate getContentDelegate();
method @AnyThread @NonNull public static String getDefaultUserAgent();
method @UiThread @NonNull public DynamicToolbarAnimator getDynamicToolbarAnimator();
method @AnyThread @NonNull public SessionFinder getFinder();
method @AnyThread @Nullable public GeckoSession.HistoryDelegate getHistoryDelegate();
method @AnyThread @Nullable public GeckoSession.MediaDelegate getMediaDelegate();
method @AnyThread @Nullable public WebExtension.MessageDelegate getMessageDelegate(@NonNull WebExtension, @NonNull String);
method @UiThread @Nullable public GeckoSession.NavigationDelegate getNavigationDelegate();
method @UiThread @NonNull public OverscrollEdgeEffect getOverscrollEdgeEffect();
method @UiThread public void getPageToScreenMatrix(@NonNull Matrix);
method @UiThread public void getPageToSurfaceMatrix(@NonNull Matrix);
method @UiThread @NonNull public PanZoomController getPanZoomController();
method @UiThread @Nullable public GeckoSession.PermissionDelegate getPermissionDelegate();
method @UiThread @Nullable public GeckoSession.ProgressDelegate getProgressDelegate();
method @AnyThread @Nullable public GeckoSession.PromptDelegate getPromptDelegate();
method @UiThread @Nullable public GeckoSession.ScrollDelegate getScrollDelegate();
method @AnyThread @Nullable public GeckoSession.SelectionActionDelegate getSelectionActionDelegate();
method @AnyThread @NonNull public GeckoSessionSettings getSettings();
method @UiThread public void getSurfaceBounds(@NonNull Rect);
method @AnyThread @NonNull public SessionTextInput getTextInput();
method @AnyThread @NonNull public GeckoResult<String> getUserAgent();
method @AnyThread public void goBack();
method @AnyThread public void goForward();
method @AnyThread public void gotoHistoryIndex(int);
method @AnyThread public boolean isOpen();
method @AnyThread public void loadData(@NonNull byte[], @Nullable String);
method @AnyThread public void loadString(@NonNull String, @Nullable String);
method @AnyThread public void loadUri(@NonNull String);
method @AnyThread public void loadUri(@NonNull String, int);
method @AnyThread public void loadUri(@NonNull String, @Nullable String, int);
method @AnyThread public void loadUri(@NonNull String, @Nullable GeckoSession, int);
method @AnyThread public void loadUri(@NonNull Uri);
method @AnyThread public void loadUri(@NonNull Uri, int);
method @AnyThread public void loadUri(@NonNull Uri, @Nullable Uri, int);
method @UiThread public void open(@NonNull GeckoRuntime);
method @AnyThread public void readFromParcel(@NonNull Parcel);
method @UiThread public void releaseDisplay(@NonNull GeckoDisplay);
method @AnyThread public void reload();
method @AnyThread public void restoreState(@NonNull GeckoSession.SessionState);
method @AnyThread public void setActive(boolean);
method @AnyThread public void setContentBlockingDelegate(@Nullable ContentBlocking.Delegate);
method @UiThread public void setContentDelegate(@Nullable GeckoSession.ContentDelegate);
method @AnyThread public void setFocused(boolean);
method @AnyThread public void setHistoryDelegate(@Nullable GeckoSession.HistoryDelegate);
method @AnyThread public void setMediaDelegate(@Nullable GeckoSession.MediaDelegate);
method @AnyThread public void setMessageDelegate(@NonNull WebExtension, @Nullable WebExtension.MessageDelegate, @NonNull String);
method @UiThread public void setNavigationDelegate(@Nullable GeckoSession.NavigationDelegate);
method @UiThread public void setPermissionDelegate(@Nullable GeckoSession.PermissionDelegate);
method @UiThread public void setProgressDelegate(@Nullable GeckoSession.ProgressDelegate);
method @AnyThread public void setPromptDelegate(@Nullable GeckoSession.PromptDelegate);
method @UiThread public void setScrollDelegate(@Nullable GeckoSession.ScrollDelegate);
method @UiThread public void setSelectionActionDelegate(@Nullable GeckoSession.SelectionActionDelegate);
method @AnyThread public void stop();
method @UiThread protected void setShouldPinOnScreen(boolean);
field public static final Parcelable.Creator<GeckoSession> CREATOR;
field public static final int FINDER_DISPLAY_DIM_PAGE = 2;
field public static final int FINDER_DISPLAY_DRAW_LINK_OUTLINE = 4;
field public static final int FINDER_DISPLAY_HIGHLIGHT_ALL = 1;
field public static final int FINDER_FIND_BACKWARDS = 1;
field public static final int FINDER_FIND_LINKS_ONLY = 8;
field public static final int FINDER_FIND_MATCH_CASE = 2;
field public static final int FINDER_FIND_WHOLE_WORD = 4;
field public static final int LOAD_FLAGS_ALLOW_POPUPS = 8;
field public static final int LOAD_FLAGS_BYPASS_CACHE = 1;
field public static final int LOAD_FLAGS_BYPASS_CLASSIFIER = 16;
field public static final int LOAD_FLAGS_BYPASS_PROXY = 2;
field public static final int LOAD_FLAGS_EXTERNAL = 4;
field public static final int LOAD_FLAGS_FORCE_ALLOW_DATA_URI = 32;
field public static final int LOAD_FLAGS_NONE = 0;
field public static final int LOAD_FLAGS_REPLACE_HISTORY = 64;
field @Nullable protected GeckoSession.Window mWindow;
}
public static interface GeckoSession.ContentDelegate {
method @UiThread default public void onCloseRequest(@NonNull GeckoSession);
method @UiThread default public void onContextMenu(@NonNull GeckoSession, int, int, @NonNull GeckoSession.ContentDelegate.ContextElement);
method @UiThread default public void onCrash(@NonNull GeckoSession);
method @UiThread default public void onExternalResponse(@NonNull GeckoSession, @NonNull GeckoSession.WebResponseInfo);
method @UiThread default public void onFirstComposite(@NonNull GeckoSession);
method @UiThread default public void onFocusRequest(@NonNull GeckoSession);
method @UiThread default public void onFullScreen(@NonNull GeckoSession, boolean);
method @UiThread default public void onKill(@NonNull GeckoSession);
method @UiThread default public void onTitleChange(@NonNull GeckoSession, @Nullable String);
method @UiThread default public void onWebAppManifest(@NonNull GeckoSession, @NonNull JSONObject);
}
public static class GeckoSession.ContentDelegate.ContextElement {
ctor protected ContextElement(@Nullable String, @Nullable String, @Nullable String, @Nullable String, @NonNull String, @Nullable String);
field public static final int TYPE_AUDIO = 3;
field public static final int TYPE_IMAGE = 1;
field public static final int TYPE_NONE = 0;
field public static final int TYPE_VIDEO = 2;
field @Nullable public final String altText;
field @Nullable public final String baseUri;
field @Nullable public final String linkUri;
field @Nullable public final String srcUri;
field @Nullable public final String title;
field public final int type;
}
@AnyThread public static class GeckoSession.FinderResult {
ctor protected FinderResult();
field @Nullable public final RectF clientRect;
field public final int current;
field public final int flags;
field public final boolean found;
field @Nullable public final String linkUri;
field @NonNull public final String searchString;
field public final int total;
field public final boolean wrapped;
}
public static interface GeckoSession.HistoryDelegate {
method @UiThread @Nullable default public GeckoResult<boolean[]> getVisited(@NonNull GeckoSession, @NonNull String[]);
method @UiThread default public void onHistoryStateChange(@NonNull GeckoSession, @NonNull GeckoSession.HistoryDelegate.HistoryList);
method @UiThread @Nullable default public GeckoResult<Boolean> onVisited(@NonNull GeckoSession, @NonNull String, @Nullable String, int);
field public static final int VISIT_REDIRECT_PERMANENT = 4;
field public static final int VISIT_REDIRECT_SOURCE = 8;
field public static final int VISIT_REDIRECT_SOURCE_PERMANENT = 16;
field public static final int VISIT_REDIRECT_TEMPORARY = 2;
field public static final int VISIT_TOP_LEVEL = 1;
field public static final int VISIT_UNRECOVERABLE_ERROR = 32;
}
public static interface GeckoSession.HistoryDelegate.HistoryItem {
method @AnyThread @NonNull default public String getTitle();
method @AnyThread @NonNull default public String getUri();
}
public static interface GeckoSession.HistoryDelegate.HistoryList implements List {
method @AnyThread default public int getCurrentIndex();
}
public static interface GeckoSession.MediaDelegate {
method @UiThread default public void onMediaAdd(@NonNull GeckoSession, @NonNull MediaElement);
method @UiThread default public void onMediaRemove(@NonNull GeckoSession, @NonNull MediaElement);
method @UiThread default public void onRecordingStatusChanged(@NonNull GeckoSession, @NonNull GeckoSession.MediaDelegate.RecordingDevice[]);
}
public static class GeckoSession.MediaDelegate.RecordingDevice {
ctor protected RecordingDevice();
field public final long status;
field public final long type;
}
public static class GeckoSession.MediaDelegate.RecordingDevice.Status {
ctor protected Status();
field public static final long INACTIVE = 1L;
field public static final long RECORDING = 0L;
}
public static class GeckoSession.MediaDelegate.RecordingDevice.Type {
ctor protected Type();
field public static final long CAMERA = 0L;
field public static final long MICROPHONE = 1L;
}
public static interface GeckoSession.NavigationDelegate {
method @UiThread default public void onCanGoBack(@NonNull GeckoSession, boolean);
method @UiThread default public void onCanGoForward(@NonNull GeckoSession, boolean);
method @UiThread @Nullable default public GeckoResult<String> onLoadError(@NonNull GeckoSession, @Nullable String, @NonNull WebRequestError);
method @UiThread @Nullable default public GeckoResult<AllowOrDeny> onLoadRequest(@NonNull GeckoSession, @NonNull GeckoSession.NavigationDelegate.LoadRequest);
method @UiThread default public void onLocationChange(@NonNull GeckoSession, @Nullable String);
method @UiThread @Nullable default public GeckoResult<GeckoSession> onNewSession(@NonNull GeckoSession, @NonNull String);
field public static final int LOAD_REQUEST_IS_REDIRECT = 8388608;
field public static final int TARGET_WINDOW_CURRENT = 1;
field public static final int TARGET_WINDOW_NEW = 2;
field public static final int TARGET_WINDOW_NONE = 0;
}
public static class GeckoSession.NavigationDelegate.LoadRequest {
ctor protected LoadRequest();
field public final boolean isRedirect;
field public final int target;
field @Nullable public final String triggerUri;
field @NonNull public final String uri;
}
public static interface GeckoSession.PermissionDelegate {
method @UiThread default public void onAndroidPermissionsRequest(@NonNull GeckoSession, @Nullable String[], @NonNull GeckoSession.PermissionDelegate.Callback);
method @UiThread default public void onContentPermissionRequest(@NonNull GeckoSession, @Nullable String, int, @NonNull GeckoSession.PermissionDelegate.Callback);
method @UiThread default public void onMediaPermissionRequest(@NonNull GeckoSession, @NonNull String, @Nullable GeckoSession.PermissionDelegate.MediaSource[], @Nullable GeckoSession.PermissionDelegate.MediaSource[], @NonNull GeckoSession.PermissionDelegate.MediaCallback);
field public static final int PERMISSION_DESKTOP_NOTIFICATION = 1;
field public static final int PERMISSION_GEOLOCATION = 0;
field public static final int PERMISSION_PERSISTENT_STORAGE = 2;
}
public static interface GeckoSession.PermissionDelegate.Callback {
method @UiThread default public void grant();
method @UiThread default public void reject();
}
public static interface GeckoSession.PermissionDelegate.MediaCallback {
method @UiThread default public void grant(@Nullable String, @Nullable String);
method @UiThread default public void grant(@Nullable GeckoSession.PermissionDelegate.MediaSource, @Nullable GeckoSession.PermissionDelegate.MediaSource);
method @UiThread default public void reject();
}
public static class GeckoSession.PermissionDelegate.MediaSource {
ctor protected MediaSource();
field public static final int SOURCE_AUDIOCAPTURE = 3;
field public static final int SOURCE_CAMERA = 0;
field public static final int SOURCE_MICROPHONE = 2;
field public static final int SOURCE_OTHER = 4;
field public static final int SOURCE_SCREEN = 1;
field public static final int TYPE_AUDIO = 1;
field public static final int TYPE_VIDEO = 0;
field @NonNull public final String id;
field @Nullable public final String name;
field @NonNull public final String rawId;
field public final int source;
field public final int type;
}
public static interface GeckoSession.ProgressDelegate {
method @UiThread default public void onPageStart(@NonNull GeckoSession, @NonNull String);
method @UiThread default public void onPageStop(@NonNull GeckoSession, boolean);
method @UiThread default public void onProgressChange(@NonNull GeckoSession, int);
method @UiThread default public void onSecurityChange(@NonNull GeckoSession, @NonNull GeckoSession.ProgressDelegate.SecurityInformation);
method @UiThread default public void onSessionStateChange(@NonNull GeckoSession, @NonNull GeckoSession.SessionState);
}
public static class GeckoSession.ProgressDelegate.SecurityInformation {
ctor protected SecurityInformation();
field public static final int CONTENT_BLOCKED = 1;
field public static final int CONTENT_LOADED = 2;
field public static final int CONTENT_UNKNOWN = 0;
field public static final int SECURITY_MODE_IDENTIFIED = 1;
field public static final int SECURITY_MODE_UNKNOWN = 0;
field public static final int SECURITY_MODE_VERIFIED = 2;
field @NonNull public final String host;
field public final boolean isException;
field public final boolean isSecure;
field @NonNull public final String issuerCommonName;
field @NonNull public final String issuerOrganization;
field public final int mixedModeActive;
field public final int mixedModePassive;
field @NonNull public final String organization;
field @Nullable public final String origin;
field public final int securityMode;
field @NonNull public final String subjectName;
}
public static interface GeckoSession.PromptDelegate {
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAlertPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AlertPrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAuthPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AuthPrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onButtonPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ButtonPrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onChoicePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ChoicePrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onColorPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ColorPrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onDateTimePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.DateTimePrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onFilePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.FilePrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onPopupPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.PopupPrompt);
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onTextPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.TextPrompt);
}
public static class GeckoSession.PromptDelegate.AlertPrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected AlertPrompt(@Nullable String, @Nullable String);
field @Nullable public final String message;
}
public static class GeckoSession.PromptDelegate.AuthPrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected AuthPrompt(@Nullable String, @Nullable String, @NonNull GeckoSession.PromptDelegate.AuthPrompt.AuthOptions);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String, @NonNull String);
field @NonNull public final GeckoSession.PromptDelegate.AuthPrompt.AuthOptions authOptions;
field @Nullable public final String message;
}
public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions {
ctor protected AuthOptions();
field public final int flags;
field public final int level;
field @Nullable public final String password;
field @Nullable public final String uri;
field @Nullable public final String username;
}
public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions.Flags {
ctor protected Flags();
field public static final int CROSS_ORIGIN_SUB_RESOURCE = 32;
field public static final int HOST = 1;
field public static final int ONLY_PASSWORD = 8;
field public static final int PREVIOUS_FAILED = 16;
field public static final int PROXY = 2;
}
public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions.Level {
ctor protected Level();
field public static final int NONE = 0;
field public static final int PW_ENCRYPTED = 1;
field public static final int SECURE = 2;
}
public static class GeckoSession.PromptDelegate.BasePrompt {
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse dismiss();
method @UiThread public boolean isComplete();
method @UiThread @NonNull protected GeckoSession.PromptDelegate.PromptResponse confirm();
field @Nullable public final String title;
}
public static class GeckoSession.PromptDelegate.ButtonPrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected ButtonPrompt(@Nullable String, @Nullable String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(int);
field @Nullable public final String message;
}
public static class GeckoSession.PromptDelegate.ButtonPrompt.Type {
ctor protected Type();
field public static final int NEGATIVE = 2;
field public static final int POSITIVE = 0;
}
public static class GeckoSession.PromptDelegate.ChoicePrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected ChoicePrompt(@Nullable String, @Nullable String, int, @NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[]);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String[]);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[]);
field @NonNull public final GeckoSession.PromptDelegate.ChoicePrompt.Choice[] choices;
field @Nullable public final String message;
field public final int type;
}
public static class GeckoSession.PromptDelegate.ChoicePrompt.Choice {
ctor protected Choice();
field public final boolean disabled;
field @Nullable public final String icon;
field @NonNull public final String id;
field @Nullable public final GeckoSession.PromptDelegate.ChoicePrompt.Choice[] items;
field @NonNull public final String label;
field public final boolean selected;
field public final boolean separator;
}
public static class GeckoSession.PromptDelegate.ChoicePrompt.Type {
ctor protected Type();
field public static final int MENU = 1;
field public static final int MULTIPLE = 3;
field public static final int SINGLE = 2;
}
public static class GeckoSession.PromptDelegate.ColorPrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected ColorPrompt(@Nullable String, @Nullable String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
field @Nullable public final String defaultValue;
}
public static class GeckoSession.PromptDelegate.DateTimePrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected DateTimePrompt(@Nullable String, int, @Nullable String, @Nullable String, @Nullable String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
field @Nullable public final String defaultValue;
field @Nullable public final String maxValue;
field @Nullable public final String minValue;
field public final int type;
}
public static class GeckoSession.PromptDelegate.DateTimePrompt.Type {
ctor protected Type();
field public static final int DATE = 1;
field public static final int DATETIME_LOCAL = 5;
field public static final int MONTH = 2;
field public static final int TIME = 4;
field public static final int WEEK = 3;
}
public static class GeckoSession.PromptDelegate.FilePrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected FilePrompt(@Nullable String, int, int, @Nullable String[]);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context, @NonNull Uri);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context, @NonNull Uri[]);
field public final int capture;
field @Nullable public final String[] mimeTypes;
field public final int type;
}
public static class GeckoSession.PromptDelegate.FilePrompt.Capture {
ctor protected Capture();
field public static final int ANY = 1;
field public static final int ENVIRONMENT = 3;
field public static final int NONE = 0;
field public static final int USER = 2;
}
public static class GeckoSession.PromptDelegate.FilePrompt.Type {
ctor protected Type();
field public static final int MULTIPLE = 2;
field public static final int SINGLE = 1;
}
public static class GeckoSession.PromptDelegate.PopupPrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected PopupPrompt(@Nullable String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull AllowOrDeny);
field @Nullable public final String targetUri;
}
public static class GeckoSession.PromptDelegate.PromptResponse {
}
public static class GeckoSession.PromptDelegate.TextPrompt extends GeckoSession.PromptDelegate.BasePrompt {
ctor protected TextPrompt(@Nullable String, @Nullable String, @Nullable String);
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
field @Nullable public final String defaultValue;
field @Nullable public final String message;
}
public static interface GeckoSession.ScrollDelegate {
method @UiThread default public void onScrollChanged(@NonNull GeckoSession, int, int);
}
public static interface GeckoSession.SelectionActionDelegate {
method @UiThread default public void onHideAction(@NonNull GeckoSession, int);
method @UiThread default public void onShowActionRequest(@NonNull GeckoSession, @NonNull GeckoSession.SelectionActionDelegate.Selection, @NonNull String[], @NonNull GeckoResponse<String>);
field public static final String ACTION_COLLAPSE_TO_END = "org.mozilla.geckoview.COLLAPSE_TO_END";
field public static final String ACTION_COLLAPSE_TO_START = "org.mozilla.geckoview.COLLAPSE_TO_START";
field public static final String ACTION_COPY = "org.mozilla.geckoview.COPY";
field public static final String ACTION_CUT = "org.mozilla.geckoview.CUT";
field public static final String ACTION_DELETE = "org.mozilla.geckoview.DELETE";
field public static final String ACTION_HIDE = "org.mozilla.geckoview.HIDE";
field public static final String ACTION_PASTE = "org.mozilla.geckoview.PASTE";
field public static final String ACTION_SELECT_ALL = "org.mozilla.geckoview.SELECT_ALL";
field public static final String ACTION_UNSELECT = "org.mozilla.geckoview.UNSELECT";
field public static final int FLAG_IS_COLLAPSED = 1;
field public static final int FLAG_IS_EDITABLE = 2;
field public static final int FLAG_IS_PASSWORD = 4;
field public static final int HIDE_REASON_ACTIVE_SCROLL = 3;
field public static final int HIDE_REASON_ACTIVE_SELECTION = 2;
field public static final int HIDE_REASON_INVISIBLE_SELECTION = 1;
field public static final int HIDE_REASON_NO_SELECTION = 0;
}
public static class GeckoSession.SelectionActionDelegate.Selection {
ctor protected Selection();
field @Nullable public final RectF clientRect;
field public final int flags;
field @NonNull public final String text;
}
@AnyThread public static class GeckoSession.SessionState extends AbstractSequentialList implements GeckoSession.HistoryDelegate.HistoryList Parcelable {
ctor public SessionState(@NonNull GeckoSession.SessionState);
method @NonNull public static GeckoSession.SessionState fromString(@NonNull String);
method public void readFromParcel(@NonNull Parcel);
field public static final Parcelable.Creator<GeckoSession.SessionState> CREATOR;
}
public static interface GeckoSession.TextInputDelegate {
method @UiThread default public void hideSoftInput(@NonNull GeckoSession);
method @UiThread default public void notifyAutoFill(@NonNull GeckoSession, int, int);
method @UiThread default public void restartInput(@NonNull GeckoSession, int);
method @UiThread default public void showSoftInput(@NonNull GeckoSession);
method @UiThread default public void updateCursorAnchorInfo(@NonNull GeckoSession, @NonNull CursorAnchorInfo);
method @UiThread default public void updateExtractedText(@NonNull GeckoSession, @NonNull ExtractedTextRequest, @NonNull ExtractedText);
method @UiThread default public void updateSelection(@NonNull GeckoSession, int, int, int, int);
field public static final int AUTO_FILL_NOTIFY_CANCELED = 2;
field public static final int AUTO_FILL_NOTIFY_COMMITTED = 1;
field public static final int AUTO_FILL_NOTIFY_STARTED = 0;
field public static final int AUTO_FILL_NOTIFY_VIEW_ADDED = 3;
field public static final int AUTO_FILL_NOTIFY_VIEW_ENTERED = 6;
field public static final int AUTO_FILL_NOTIFY_VIEW_EXITED = 7;
field public static final int AUTO_FILL_NOTIFY_VIEW_REMOVED = 4;
field public static final int AUTO_FILL_NOTIFY_VIEW_UPDATED = 5;
field public static final int RESTART_REASON_BLUR = 1;
field public static final int RESTART_REASON_CONTENT_CHANGE = 2;
field public static final int RESTART_REASON_FOCUS = 0;
}
@AnyThread public static class GeckoSession.WebResponseInfo {
ctor protected WebResponseInfo();
field @Nullable public final long contentLength;
field @Nullable public final String contentType;
field @Nullable public final String filename;
field @NonNull public final String uri;
}
@AnyThread public final class GeckoSessionSettings implements Parcelable {
ctor public GeckoSessionSettings();
ctor public GeckoSessionSettings(@NonNull GeckoSessionSettings);
method public boolean getAllowJavascript();
method @Nullable public String getChromeUri();
method @Nullable public String getContextId();
method public int getDisplayMode();
method public boolean getFullAccessibilityTree();
method public int getScreenId();
method public boolean getSuspendMediaWhenInactive();
method public boolean getUseMultiprocess();
method public boolean getUsePrivateMode();
method public boolean getUseTrackingProtection();
method public int getUserAgentMode();
method @Nullable public String getUserAgentOverride();
method public int getViewportMode();
method public void readFromParcel(@NonNull Parcel);
method public void setAllowJavascript(boolean);
method public void setDisplayMode(int);
method public void setFullAccessibilityTree(boolean);
method public void setSuspendMediaWhenInactive(boolean);
method public void setUseTrackingProtection(boolean);
method public void setUserAgentMode(int);
method public void setUserAgentOverride(@Nullable String);
method public void setViewportMode(int);
field public static final Parcelable.Creator<GeckoSessionSettings> CREATOR;
field public static final int DISPLAY_MODE_BROWSER = 0;
field public static final int DISPLAY_MODE_FULLSCREEN = 3;
field public static final int DISPLAY_MODE_MINIMAL_UI = 1;
field public static final int DISPLAY_MODE_STANDALONE = 2;
field public static final int USER_AGENT_MODE_DESKTOP = 1;
field public static final int USER_AGENT_MODE_MOBILE = 0;
field public static final int USER_AGENT_MODE_VR = 2;
field public static final int VIEWPORT_MODE_DESKTOP = 1;
field public static final int VIEWPORT_MODE_MOBILE = 0;
}
@AnyThread public static final class GeckoSessionSettings.Builder {
ctor public Builder();
ctor public Builder(GeckoSessionSettings);
method @NonNull public GeckoSessionSettings.Builder allowJavascript(boolean);
method @NonNull public GeckoSessionSettings build();
method @NonNull public GeckoSessionSettings.Builder chromeUri(@NonNull String);
method @NonNull public GeckoSessionSettings.Builder contextId(@Nullable String);
method @NonNull public GeckoSessionSettings.Builder displayMode(int);
method @NonNull public GeckoSessionSettings.Builder fullAccessibilityTree(boolean);
method @NonNull public GeckoSessionSettings.Builder screenId(int);
method @NonNull public GeckoSessionSettings.Builder suspendMediaWhenInactive(boolean);
method @NonNull public GeckoSessionSettings.Builder useMultiprocess(boolean);
method @NonNull public GeckoSessionSettings.Builder usePrivateMode(boolean);
method @NonNull public GeckoSessionSettings.Builder useTrackingProtection(boolean);
method @NonNull public GeckoSessionSettings.Builder userAgentMode(int);
method @NonNull public GeckoSessionSettings.Builder userAgentOverride(@NonNull String);
method @NonNull public GeckoSessionSettings.Builder viewportMode(int);
}
public static class GeckoSessionSettings.Key<T> {
}
public class GeckoVRManager {
method @AnyThread public static synchronized void setExternalContext(long);
}
@UiThread public class GeckoView extends FrameLayout {
ctor public GeckoView(Context);
ctor public GeckoView(Context, AttributeSet);
method @UiThread @NonNull public GeckoResult<Bitmap> capturePixels();
method public void coverUntilFirstPaint(int);
method @NonNull public DynamicToolbarAnimator getDynamicToolbarAnimator();
method @NonNull public PanZoomController getPanZoomController();
method @AnyThread @Nullable public GeckoSession getSession();
method @UiThread @Nullable public GeckoSession releaseSession();
method @UiThread public void setSession(@NonNull GeckoSession);
method public void setVerticalClipping(int);
method public boolean shouldPinOnScreen();
field @NonNull protected final GeckoView.Display mDisplay;
field @Nullable protected GeckoSession mSession;
field @Nullable protected SurfaceView mSurfaceView;
}
@AnyThread public class GeckoWebExecutor {
ctor public GeckoWebExecutor(@NonNull GeckoRuntime);
method @NonNull public GeckoResult<WebResponse> fetch(@NonNull WebRequest);
method @NonNull public GeckoResult<WebResponse> fetch(@NonNull WebRequest, int);
method @NonNull public GeckoResult<InetAddress[]> resolve(@NonNull String);
method public void speculativeConnect(@NonNull String);
field public static final int FETCH_FLAGS_ANONYMOUS = 1;
field public static final int FETCH_FLAGS_NONE = 0;
field public static final int FETCH_FLAGS_NO_REDIRECTS = 2;
}
@AnyThread public class MediaElement {
method @Nullable public MediaElement.Delegate getDelegate();
method public void pause();
method public void play();
method public void seek(double);
method public void setDelegate(@Nullable MediaElement.Delegate);
method public void setMuted(boolean);
method public void setPlaybackRate(double);
method public void setVolume(double);
field public static final int MEDIA_ERROR_ABORTED = 1;
field public static final int MEDIA_ERROR_DECODE = 3;
field public static final int MEDIA_ERROR_NETWORK = 2;
field public static final int MEDIA_ERROR_NETWORK_NO_SOURCE = 0;
field public static final int MEDIA_ERROR_SRC_NOT_SUPPORTED = 4;
field public static final int MEDIA_READY_STATE_HAVE_CURRENT_DATA = 2;
field public static final int MEDIA_READY_STATE_HAVE_ENOUGH_DATA = 4;
field public static final int MEDIA_READY_STATE_HAVE_FUTURE_DATA = 3;
field public static final int MEDIA_READY_STATE_HAVE_METADATA = 1;
field public static final int MEDIA_READY_STATE_HAVE_NOTHING = 0;
field public static final int MEDIA_STATE_ABORT = 9;
field public static final int MEDIA_STATE_EMPTIED = 10;
field public static final int MEDIA_STATE_ENDED = 3;
field public static final int MEDIA_STATE_PAUSE = 2;
field public static final int MEDIA_STATE_PLAY = 0;
field public static final int MEDIA_STATE_PLAYING = 1;
field public static final int MEDIA_STATE_SEEKED = 5;
field public static final int MEDIA_STATE_SEEKING = 4;
field public static final int MEDIA_STATE_STALLED = 6;
field public static final int MEDIA_STATE_SUSPEND = 7;
field public static final int MEDIA_STATE_WAITING = 8;
field @Nullable protected MediaElement.Delegate mDelegate;
field @NonNull protected final GeckoSession mSession;
field protected final long mVideoId;
}
public static interface MediaElement.Delegate {
method @UiThread default public void onError(@NonNull MediaElement, int);
method @UiThread default public void onFullscreenChange(@NonNull MediaElement, boolean);
method @UiThread default public void onLoadProgress(@NonNull MediaElement, @NonNull MediaElement.LoadProgressInfo);
method @UiThread default public void onMetadataChange(@NonNull MediaElement, @NonNull MediaElement.Metadata);
method @UiThread default public void onPlaybackRateChange(@NonNull MediaElement, double);
method @UiThread default public void onPlaybackStateChange(@NonNull MediaElement, int);
method @UiThread default public void onReadyStateChange(@NonNull MediaElement, int);
method @UiThread default public void onTimeChange(@NonNull MediaElement, double);
method @UiThread default public void onVolumeChange(@NonNull MediaElement, double, boolean);
}
public static class MediaElement.LoadProgressInfo {
ctor protected LoadProgressInfo();
field @Nullable public final MediaElement.LoadProgressInfo.TimeRange[] buffered;
field public final long loadedBytes;
field public final long totalBytes;
}
public class MediaElement.LoadProgressInfo.TimeRange {
ctor protected TimeRange(double, double);
field public final double end;
field public final double start;
}
public static class MediaElement.Metadata {
ctor protected Metadata();
field public final int audioTrackCount;
field @Nullable public final String currentSource;
field public final double duration;
field public final long height;
field public final boolean isSeekable;
field public final int videoTrackCount;
field public final long width;
}
@UiThread public final class OverscrollEdgeEffect {
method public void draw(@NonNull Canvas);
method @Nullable public Runnable getInvalidationCallback();
method public void setInvalidationCallback(@Nullable Runnable);
method public void setTheme(@NonNull Context);
}
@UiThread public class PanZoomController {
ctor protected PanZoomController(GeckoSession);
method public float getScrollFactor();
method public boolean onMotionEvent(@NonNull MotionEvent);
method public boolean onMouseEvent(@NonNull MotionEvent);
method public boolean onTouchEvent(@NonNull MotionEvent);
method @UiThread public void scrollBy(@NonNull ScreenLength, @NonNull ScreenLength);
method @UiThread public void scrollBy(@NonNull ScreenLength, @NonNull ScreenLength, int);
method @UiThread public void scrollTo(@NonNull ScreenLength, @NonNull ScreenLength);
method @UiThread public void scrollTo(@NonNull ScreenLength, @NonNull ScreenLength, int);
method @UiThread public void scrollToBottom();
method @UiThread public void scrollToTop();
method public void setIsLongpressEnabled(boolean);
method public void setScrollFactor(float);
field public static final int SCROLL_BEHAVIOR_AUTO = 1;
field public static final int SCROLL_BEHAVIOR_SMOOTH = 0;
}
public abstract class RuntimeSettings implements Parcelable {
ctor protected RuntimeSettings();
ctor protected RuntimeSettings(@Nullable RuntimeSettings);
method @AnyThread public void readFromParcel(@NonNull Parcel);
method @AnyThread protected void updatePrefs(@NonNull RuntimeSettings);
}
public abstract static class RuntimeSettings.Builder<Settings extends RuntimeSettings> {
ctor public Builder();
method @AnyThread @NonNull public Settings build();
method @AnyThread @NonNull protected Settings getSettings();
method @AnyThread @NonNull protected abstract Settings newSettings(@Nullable Settings);
}
public final class RuntimeTelemetry {
method @AnyThread @NonNull public GeckoResult<JSONObject> getSnapshots(boolean);
}
public static interface RuntimeTelemetry.Delegate {
method @AnyThread default public void onTelemetryReceived(@NonNull RuntimeTelemetry.Metric);
}
public static class RuntimeTelemetry.Metric {
ctor protected Metric();
field @NonNull public final String name;
field @NonNull public final long[] values;
}
public class ScreenLength {
method @NonNull @AnyThread public static ScreenLength bottom();
method @NonNull @AnyThread public static ScreenLength fromPixels(double);
method @NonNull @AnyThread public static ScreenLength fromViewportHeight(double);
method @NonNull @AnyThread public static ScreenLength fromViewportWidth(double);
method @AnyThread public int getType();
method @AnyThread public double getValue();
method @NonNull @AnyThread public static ScreenLength top();
method @NonNull @AnyThread public static ScreenLength zero();
field public static final int DOCUMENT_HEIGHT = 4;
field public static final int DOCUMENT_WIDTH = 3;
field public static final int PIXEL = 0;
field public static final int VIEWPORT_HEIGHT = 2;
field public static final int VIEWPORT_WIDTH = 1;
}
@UiThread public class SessionAccessibility {
method @Nullable public View getView();
method public boolean onMotionEvent(@NonNull MotionEvent);
method @UiThread public void setView(@Nullable View);
}
@AnyThread public final class SessionFinder {
method public void clear();
method @NonNull public GeckoResult<GeckoSession.FinderResult> find(@Nullable String, int);
method public int getDisplayFlags();
method public void setDisplayFlags(int);
}
public final class SessionTextInput {
method @UiThread public void autofill(@NonNull SparseArray<CharSequence>);
method @UiThread @NonNull public GeckoSession.TextInputDelegate getDelegate();
method @AnyThread @NonNull public synchronized Handler getHandler(@NonNull Handler);
method @UiThread @Nullable public View getView();
method @AnyThread @Nullable public synchronized InputConnection onCreateInputConnection(@NonNull EditorInfo);
method @UiThread public boolean onKeyDown(int, @NonNull KeyEvent);
method @UiThread public boolean onKeyLongPress(int, @NonNull KeyEvent);
method @UiThread public boolean onKeyMultiple(int, int, @NonNull KeyEvent);
method @UiThread public boolean onKeyPreIme(int, @NonNull KeyEvent);
method @UiThread public boolean onKeyUp(int, @NonNull KeyEvent);
method @UiThread public void onProvideAutofillVirtualStructure(@NonNull ViewStructure, int);
method @UiThread public void setDelegate(@Nullable GeckoSession.TextInputDelegate);
method @UiThread public synchronized void setView(@Nullable View);
}
public final class StorageController {
ctor public StorageController();
method @AnyThread @NonNull public GeckoResult<Void> clearData(long);
method @AnyThread public void clearDataForSessionContext(@NonNull String);
method @AnyThread @NonNull public GeckoResult<Void> clearDataFromHost(@NonNull String, long);
}
public static class StorageController.ClearFlags {
ctor public ClearFlags();
field public static final long ALL = 512L;
field public static final long ALL_CACHES = 6L;
field public static final long AUTH_SESSIONS = 32L;
field public static final long COOKIES = 1L;
field public static final long DOM_STORAGES = 16L;
field public static final long IMAGE_CACHE = 4L;
field public static final long NETWORK_CACHE = 2L;
field public static final long PERMISSIONS = 64L;
field public static final long SITE_DATA = 471L;
field public static final long SITE_SETTINGS = 192L;
}
public class WebExtension {
ctor public WebExtension(@NonNull String, @NonNull String, long);
ctor public WebExtension(@NonNull String);
method @UiThread public void setMessageDelegate(@Nullable WebExtension.MessageDelegate, @NonNull String);
field public final long flags;
field @NonNull public final String id;
field @NonNull public final String location;
}
public static class WebExtension.Flags {
ctor protected Flags();
field public static final long ALLOW_CONTENT_MESSAGING = 1L;
field public static final long NONE = 0L;
}
@UiThread public static interface WebExtension.MessageDelegate {
method @Nullable default public void onConnect(@NonNull WebExtension.Port);
method @Nullable default public GeckoResult<Object> onMessage(@NonNull Object, @NonNull WebExtension.MessageSender);
}
@UiThread public static class WebExtension.MessageSender {
ctor protected MessageSender();
method public boolean isTopLevel();
field public static final int ENV_TYPE_CONTENT_SCRIPT = 2;
field public static final int ENV_TYPE_EXTENSION = 1;
field public final int environmentType;
field @Nullable public final GeckoSession session;
field @NonNull public final String url;
field @NonNull public final WebExtension webExtension;
}
@UiThread public static class WebExtension.Port {
ctor protected Port();
method public void disconnect();
method public void postMessage(@NonNull JSONObject);
method public void setDelegate(@Nullable WebExtension.PortDelegate);
field @NonNull public final String name;
field @NonNull public final WebExtension.MessageSender sender;
}
@UiThread public static interface WebExtension.PortDelegate {
method @NonNull default public void onDisconnect(@NonNull WebExtension.Port);
method default public void onPortMessage(@NonNull Object, @NonNull WebExtension.Port);
}
public class WebExtensionController {
ctor protected WebExtensionController(GeckoRuntime, WebExtensionEventDispatcher);
method @UiThread @Nullable public WebExtensionController.TabDelegate getTabDelegate();
method @UiThread public void setTabDelegate(@Nullable WebExtensionController.TabDelegate);
}
public static interface WebExtensionController.TabDelegate {
method @UiThread @NonNull default public GeckoResult<AllowOrDeny> onCloseTab(@Nullable WebExtension, @NonNull GeckoSession);
method @UiThread @Nullable default public GeckoResult<GeckoSession> onNewTab(@Nullable WebExtension, @Nullable String);
}
@AnyThread public abstract class WebMessage {
ctor protected WebMessage(@NonNull WebMessage.Builder);
field @NonNull public final Map<String,String> headers;
field @NonNull public final String uri;
}
@AnyThread public abstract static class WebMessage.Builder {
method @NonNull public WebMessage.Builder addHeader(@NonNull String, @NonNull String);
method @NonNull public WebMessage.Builder header(@NonNull String, @NonNull String);
method @NonNull public WebMessage.Builder uri(@NonNull String);
}
@AnyThread public class WebRequest extends WebMessage {
ctor public WebRequest(@NonNull String);
field public static final int CACHE_MODE_DEFAULT = 1;
field public static final int CACHE_MODE_FORCE_CACHE = 5;
field public static final int CACHE_MODE_NO_CACHE = 4;
field public static final int CACHE_MODE_NO_STORE = 2;
field public static final int CACHE_MODE_ONLY_IF_CACHED = 6;
field public static final int CACHE_MODE_RELOAD = 3;
field @Nullable public final ByteBuffer body;
field public final int cacheMode;
field @NonNull public final String method;
field @Nullable public final String referrer;
}
@AnyThread public static class WebRequest.Builder extends WebMessage.Builder {
ctor public Builder(@NonNull String);
method @NonNull public WebRequest.Builder body(@Nullable ByteBuffer);
method @NonNull public WebRequest build();
method @NonNull public WebRequest.Builder cacheMode(int);
method @NonNull public WebRequest.Builder method(@NonNull String);
method @NonNull public WebRequest.Builder referrer(@Nullable String);
}
@AnyThread public class WebRequestError extends Exception {
ctor public WebRequestError(int, int);
field public static final int ERROR_CATEGORY_CONTENT = 4;
field public static final int ERROR_CATEGORY_NETWORK = 3;
field public static final int ERROR_CATEGORY_PROXY = 6;
field public static final int ERROR_CATEGORY_SAFEBROWSING = 7;
field public static final int ERROR_CATEGORY_SECURITY = 2;
field public static final int ERROR_CATEGORY_UNKNOWN = 1;
field public static final int ERROR_CATEGORY_URI = 5;
field public static final int ERROR_CONNECTION_REFUSED = 67;
field public static final int ERROR_CONTENT_CRASHED = 68;
field public static final int ERROR_CORRUPTED_CONTENT = 52;
field public static final int ERROR_FILE_ACCESS_DENIED = 101;
field public static final int ERROR_FILE_NOT_FOUND = 85;
field public static final int ERROR_INVALID_CONTENT_ENCODING = 84;
field public static final int ERROR_MALFORMED_URI = 53;
field public static final int ERROR_NET_INTERRUPT = 35;
field public static final int ERROR_NET_RESET = 147;
field public static final int ERROR_NET_TIMEOUT = 51;
field public static final int ERROR_OFFLINE = 115;
field public static final int ERROR_PORT_BLOCKED = 131;
field public static final int ERROR_PROXY_CONNECTION_REFUSED = 38;
field public static final int ERROR_REDIRECT_LOOP = 99;
field public static final int ERROR_SAFEBROWSING_HARMFUL_URI = 71;
field public static final int ERROR_SAFEBROWSING_MALWARE_URI = 39;
field public static final int ERROR_SAFEBROWSING_PHISHING_URI = 87;
field public static final int ERROR_SAFEBROWSING_UNWANTED_URI = 55;
field public static final int ERROR_SECURITY_BAD_CERT = 50;
field public static final int ERROR_SECURITY_SSL = 34;
field public static final int ERROR_UNKNOWN = 17;
field public static final int ERROR_UNKNOWN_HOST = 37;
field public static final int ERROR_UNKNOWN_PROTOCOL = 69;
field public static final int ERROR_UNKNOWN_PROXY_HOST = 54;
field public static final int ERROR_UNKNOWN_SOCKET_TYPE = 83;
field public static final int ERROR_UNSAFE_CONTENT_TYPE = 36;
field public final int category;
field public final int code;
}
@AnyThread public class WebResponse extends WebMessage {
ctor protected WebResponse(@NonNull WebResponse.Builder);
field @Nullable public final InputStream body;
field public final boolean redirected;
field public final int statusCode;
}
@AnyThread public static class WebResponse.Builder extends WebMessage.Builder {
ctor public Builder(@NonNull String);
method @NonNull public WebResponse.Builder body(@NonNull InputStream);
method @NonNull public WebResponse build();
method @NonNull public WebResponse.Builder redirected(boolean);
method @NonNull public WebResponse.Builder statusCode(int);
}
}