api.txt 113 KB
Newer Older
1
import android.app.Activity;
2
import android.app.PendingIntent;
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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.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.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;
35
36
37
38
import androidx.annotation.AnyThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
39
40
41
42
43
import java.io.File;
import java.io.InputStream;
import java.lang.Boolean;
import java.lang.CharSequence;
import java.lang.Class;
44
import java.lang.Deprecated;
45
import java.lang.Double;
46
47
48
import java.lang.Exception;
import java.lang.Float;
import java.lang.Integer;
49
import java.lang.Long;
50
51
52
import java.lang.Object;
import java.lang.Runnable;
import java.lang.RuntimeException;
53
import java.lang.SafeVarargs;
54
55
56
import java.lang.String;
import java.lang.Throwable;
import java.lang.Void;
57
58
59
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
60
61
import java.net.InetAddress;
import java.nio.ByteBuffer;
62
import java.security.cert.X509Certificate;
63
import java.util.AbstractSequentialList;
64
import java.util.Collection;
65
66
67
68
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
import org.mozilla.geckoview.AllowOrDeny;
69
import org.mozilla.geckoview.Autocomplete;
70
import org.mozilla.geckoview.Autofill;
71
72
import org.mozilla.geckoview.CompositorController;
import org.mozilla.geckoview.ContentBlocking;
73
import org.mozilla.geckoview.ContentBlockingController;
74
import org.mozilla.geckoview.DeprecationSchedule;
75
76
77
78
79
80
81
import org.mozilla.geckoview.GeckoDisplay;
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;
82
import org.mozilla.geckoview.Image;
83
import org.mozilla.geckoview.MediaElement;
84
import org.mozilla.geckoview.MediaSession;
85
86
import org.mozilla.geckoview.OverscrollEdgeEffect;
import org.mozilla.geckoview.PanZoomController;
87
import org.mozilla.geckoview.ProfilerController;
88
89
90
91
92
93
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;
94
import org.mozilla.geckoview.SlowScriptResponse;
95
import org.mozilla.geckoview.StorageController;
96
import org.mozilla.geckoview.WebExtension;
97
import org.mozilla.geckoview.WebExtensionController;
98
import org.mozilla.geckoview.WebMessage;
99
100
import org.mozilla.geckoview.WebNotification;
import org.mozilla.geckoview.WebNotificationDelegate;
101
102
103
import org.mozilla.geckoview.WebPushController;
import org.mozilla.geckoview.WebPushDelegate;
import org.mozilla.geckoview.WebPushSubscription;
104
105
106
107
import org.mozilla.geckoview.WebRequest;
import org.mozilla.geckoview.WebRequestError;
import org.mozilla.geckoview.WebResponse;

108
109
package org.mozilla.geckoview {

110
111
112
113
114
  @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;
115
116
  }

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
  public class Autocomplete {
    ctor protected Autocomplete();
  }

  public static class Autocomplete.LoginEntry {
    ctor @AnyThread protected LoginEntry();
    field @Nullable public final String formActionOrigin;
    field @Nullable public final String guid;
    field @Nullable public final String httpRealm;
    field @NonNull public final String origin;
    field @NonNull public final String password;
    field @NonNull public final String username;
  }

  public static class Autocomplete.LoginEntry.Builder {
    ctor @AnyThread public Builder();
    method @AnyThread @NonNull public Autocomplete.LoginEntry build();
    method @AnyThread @NonNull public Autocomplete.LoginEntry.Builder formActionOrigin(@Nullable String);
    method @AnyThread @NonNull public Autocomplete.LoginEntry.Builder guid(@Nullable String);
    method @AnyThread @NonNull public Autocomplete.LoginEntry.Builder httpRealm(@Nullable String);
    method @AnyThread @NonNull public Autocomplete.LoginEntry.Builder origin(@NonNull String);
    method @AnyThread @NonNull public Autocomplete.LoginEntry.Builder password(@NonNull String);
    method @AnyThread @NonNull public Autocomplete.LoginEntry.Builder username(@NonNull String);
  }

  public static class Autocomplete.LoginSaveOption extends Autocomplete.SaveOption {
    ctor public LoginSaveOption(@NonNull Autocomplete.LoginEntry);
  }

  public static class Autocomplete.LoginSaveOption.Hint {
    ctor protected Hint();
    field public static final int GENERATED = 1;
    field public static final int LOW_CONFIDENCE = 2;
    field public static final int NONE = 0;
  }

  public static class Autocomplete.LoginSelectOption extends Autocomplete.SelectOption {
    ctor public LoginSelectOption(@NonNull Autocomplete.LoginEntry);
  }

  public static class Autocomplete.LoginSelectOption.Hint {
    ctor public Hint();
    field public static final int DUPLICATE_USERNAME = 4;
    field public static final int GENERATED = 1;
    field public static final int INSECURE_FORM = 2;
    field public static final int MATCHING_ORIGIN = 8;
    field public static final int NONE = 0;
  }

  public static interface Autocomplete.LoginStorageDelegate {
167
    method @Nullable @UiThread default public GeckoResult<Autocomplete.LoginEntry[]> onLoginFetch(@NonNull String);
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
    method @UiThread default public void onLoginSave(@NonNull Autocomplete.LoginEntry);
    method @UiThread default public void onLoginUsed(@NonNull Autocomplete.LoginEntry, int);
  }

  public abstract static class Autocomplete.Option<T> {
    ctor public Option(@NonNull T, int);
    field public final int hint;
    field @NonNull public final T value;
  }

  public abstract static class Autocomplete.SaveOption<T> extends Autocomplete.Option {
    ctor public SaveOption(@NonNull T, int);
  }

  public abstract static class Autocomplete.SelectOption<T> extends Autocomplete.Option {
    ctor public SelectOption(@NonNull T, int);
  }

  public static class Autocomplete.UsedField {
    ctor protected UsedField();
    field public static final int PASSWORD = 1;
  }

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
  public class Autofill {
    ctor public Autofill();
  }

  public static interface Autofill.Delegate {
    method @UiThread default public void onAutofill(@NonNull GeckoSession, int, @Nullable Autofill.Node);
  }

  public static final class Autofill.Hint {
    method @AnyThread @Nullable public static String toString(int);
    field public static final int EMAIL_ADDRESS = 0;
    field public static final int NONE = -1;
    field public static final int PASSWORD = 1;
    field public static final int URI = 2;
    field public static final int USERNAME = 3;
  }

  public static final class Autofill.InputType {
    method @AnyThread @Nullable public static String toString(int);
    field public static final int NONE = -1;
    field public static final int NUMBER = 1;
    field public static final int PHONE = 2;
    field public static final int TEXT = 0;
  }

  public static final class Autofill.Node {
    method @UiThread public void fillViewStructure(@NonNull View, @NonNull ViewStructure, int);
    method @AnyThread @Nullable public String getAttribute(@NonNull String);
    method @AnyThread @NonNull public Map<String,String> getAttributes();
    method @AnyThread @NonNull public Collection<Autofill.Node> getChildren();
    method @AnyThread @NonNull public Rect getDimensions();
    method @AnyThread @NonNull public String getDomain();
    method @AnyThread public boolean getEnabled();
    method @AnyThread public boolean getFocusable();
    method @AnyThread public boolean getFocused();
    method @AnyThread public int getHint();
    method @AnyThread public int getId();
    method @AnyThread public int getInputType();
    method @AnyThread @NonNull public String getTag();
    method @AnyThread @NonNull public String getValue();
    method @AnyThread public boolean getVisible();
  }

  public static final class Autofill.Notify {
    method @AnyThread @Nullable public static String toString(int);
    field public static final int NODE_ADDED = 3;
    field public static final int NODE_BLURRED = 7;
    field public static final int NODE_FOCUSED = 6;
    field public static final int NODE_REMOVED = 4;
    field public static final int NODE_UPDATED = 5;
    field public static final int SESSION_CANCELED = 2;
    field public static final int SESSION_COMMITTED = 1;
    field public static final int SESSION_STARTED = 0;
  }

  public static final class Autofill.Session {
    method @UiThread public void fillViewStructure(@NonNull View, @NonNull ViewStructure, int);
    method @AnyThread @NonNull public Rect getDefaultDimensions();
    method @AnyThread @NonNull public Autofill.Node getRoot();
250
251
  }

252
253
254
  @UiThread public class BasicSelectionActionDelegate implements ActionMode.Callback GeckoSession.SelectionActionDelegate {
    ctor public BasicSelectionActionDelegate(@NonNull Activity);
    ctor public BasicSelectionActionDelegate(@NonNull Activity, boolean);
255
    method public boolean areExternalActionsEnabled();
256
    method public void clearSelection();
257
    method public void enableExternalActions(boolean);
258
259
    method @Nullable public GeckoSession.SelectionActionDelegate.Selection getSelection();
    method public boolean isActionAvailable();
260
261
262
263
264
265
266
267
    method public void onGetContentRect(@Nullable ActionMode, @Nullable View, @NonNull Rect);
    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 @NonNull protected final Activity mActivity;
268
    field protected boolean mRepopulatedMenu;
269
270
271
272
    field @Nullable protected GeckoSession.SelectionActionDelegate.Selection mSelection;
    field @Nullable protected GeckoSession mSession;
    field @NonNull protected final Matrix mTempMatrix;
    field @NonNull protected final RectF mTempRect;
273
274
275
    field protected final boolean mUseFloatingToolbar;
  }

276
277
  @UiThread public final class CompositorController {
    method public void addDrawCallback(@NonNull Runnable);
278
    method public int getClearColor();
279
280
    method @Nullable public Runnable getFirstPaintCallback();
    method public void removeDrawCallback(@NonNull Runnable);
281
    method public void setClearColor(int);
282
    method public void setFirstPaintCallback(@Nullable Runnable);
283
284
  }

285
  @AnyThread public class ContentBlocking {
286
287
288
    ctor protected ContentBlocking();
    field public static final ContentBlocking.SafeBrowsingProvider GOOGLE_LEGACY_SAFE_BROWSING_PROVIDER;
    field public static final ContentBlocking.SafeBrowsingProvider GOOGLE_SAFE_BROWSING_PROVIDER;
289
290
291
292
293
294
295
296
297
298
  }

  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;
299
    field public static final int NONE = 0;
300
    field public static final int SOCIAL = 8;
301
    field public static final int STP = 256;
302
303
    field public static final int STRICT = 254;
    field public static final int TEST = 32;
304
305
306
  }

  public static class ContentBlocking.BlockEvent {
307
308
309
310
311
    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();
312
    field @NonNull public final String uri;
313
314
  }

315
316
317
318
  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;
319
    field public static final int ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS = 5;
320
321
322
323
324
325
326
327
328
329
330
331
    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;
  }

332
  public static interface ContentBlocking.Delegate {
333
    method @UiThread default public void onContentBlocked(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
334
335
336
    method @UiThread default public void onContentLoaded(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
  }

337
338
339
340
341
342
343
  public static class ContentBlocking.EtpLevel {
    ctor public EtpLevel();
    field public static final int DEFAULT = 1;
    field public static final int NONE = 0;
    field public static final int STRICT = 2;
  }

344
345
346
347
348
349
350
351
  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;
352
353
  }

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
  @AnyThread public static class ContentBlocking.SafeBrowsingProvider extends RuntimeSettings {
    method @NonNull public static ContentBlocking.SafeBrowsingProvider.Builder from(@NonNull ContentBlocking.SafeBrowsingProvider);
    method @Nullable public String getAdvisoryName();
    method @Nullable public String getAdvisoryUrl();
    method @Nullable public Boolean getDataSharingEnabled();
    method @Nullable public String getDataSharingUrl();
    method @Nullable public String getGetHashUrl();
    method @NonNull public String[] getLists();
    method @NonNull public String getName();
    method @Nullable public String getReportMalwareMistakeUrl();
    method @Nullable public String getReportPhishingMistakeUrl();
    method @Nullable public String getReportUrl();
    method @Nullable public String getUpdateUrl();
    method @Nullable public String getVersion();
    method @NonNull public static ContentBlocking.SafeBrowsingProvider.Builder withName(@NonNull String);
    field public static final Parcelable.Creator<ContentBlocking.SafeBrowsingProvider> CREATOR;
  }

  @AnyThread public static class ContentBlocking.SafeBrowsingProvider.Builder {
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder advisoryName(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder advisoryUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider build();
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder dataSharingEnabled(boolean);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder dataSharingUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder getHashUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder lists(@NonNull String...);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder reportMalwareMistakeUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder reportPhishingMistakeUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder reportUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder updateUrl(@NonNull String);
    method @NonNull public ContentBlocking.SafeBrowsingProvider.Builder version(@NonNull String);
  }

387
  @AnyThread public static class ContentBlocking.Settings extends RuntimeSettings {
388
    method public int getAntiTrackingCategories();
389
390
    method public int getCookieBehavior();
    method public int getCookieLifetime();
391
    method public boolean getCookiePurging();
392
    method public int getEnhancedTrackingProtectionLevel();
393
    method public int getSafeBrowsingCategories();
394
395
396
    method @NonNull public String[] getSafeBrowsingMalwareTable();
    method @NonNull public String[] getSafeBrowsingPhishingTable();
    method @NonNull public Collection<ContentBlocking.SafeBrowsingProvider> getSafeBrowsingProviders();
397
    method public boolean getStrictSocialTrackingProtection();
398
    method @NonNull public ContentBlocking.Settings setAntiTracking(int);
399
400
    method @NonNull public ContentBlocking.Settings setCookieBehavior(int);
    method @NonNull public ContentBlocking.Settings setCookieLifetime(int);
401
    method @NonNull public ContentBlocking.Settings setCookiePurging(boolean);
402
    method @NonNull public ContentBlocking.Settings setEnhancedTrackingProtectionLevel(int);
403
    method @NonNull public ContentBlocking.Settings setSafeBrowsing(int);
404
405
406
    method @NonNull public ContentBlocking.Settings setSafeBrowsingMalwareTable(@NonNull String...);
    method @NonNull public ContentBlocking.Settings setSafeBrowsingPhishingTable(@NonNull String...);
    method @NonNull public ContentBlocking.Settings setSafeBrowsingProviders(@NonNull ContentBlocking.SafeBrowsingProvider...);
407
    method @NonNull public ContentBlocking.Settings setStrictSocialTrackingProtection(boolean);
408
    field public static final Parcelable.Creator<ContentBlocking.Settings> CREATOR;
409
410
  }

411
  @AnyThread public static class ContentBlocking.Settings.Builder extends RuntimeSettings.Builder {
412
    ctor public Builder();
413
    method @NonNull public ContentBlocking.Settings.Builder antiTracking(int);
414
415
    method @NonNull public ContentBlocking.Settings.Builder cookieBehavior(int);
    method @NonNull public ContentBlocking.Settings.Builder cookieLifetime(int);
416
    method @NonNull public ContentBlocking.Settings.Builder cookiePurging(boolean);
417
    method @NonNull public ContentBlocking.Settings.Builder enhancedTrackingProtectionLevel(int);
418
    method @NonNull public ContentBlocking.Settings.Builder safeBrowsing(int);
419
420
421
    method @NonNull public ContentBlocking.Settings.Builder safeBrowsingMalwareTable(@NonNull String[]);
    method @NonNull public ContentBlocking.Settings.Builder safeBrowsingPhishingTable(@NonNull String[]);
    method @NonNull public ContentBlocking.Settings.Builder safeBrowsingProviders(@NonNull ContentBlocking.SafeBrowsingProvider...);
422
    method @NonNull public ContentBlocking.Settings.Builder strictSocialTrackingProtection(boolean);
423
    method @NonNull protected ContentBlocking.Settings newSettings(@Nullable ContentBlocking.Settings);
424
425
  }

426
427
428
  @AnyThread public class ContentBlockingController {
    ctor public ContentBlockingController();
    method @UiThread public void addException(@NonNull GeckoSession);
429
    method @NonNull @UiThread public GeckoResult<Boolean> checkException(@NonNull GeckoSession);
430
    method @UiThread public void clearExceptionList();
431
    method @NonNull @UiThread public GeckoResult<List<ContentBlockingController.LogEntry>> getLog(@NonNull GeckoSession);
432
    method @UiThread public void removeException(@NonNull GeckoSession);
433
434
    method @AnyThread public void removeException(@NonNull ContentBlockingController.ContentBlockingException);
    method @AnyThread public void restoreExceptionList(@NonNull List<ContentBlockingController.ContentBlockingException>);
435
    method @NonNull @UiThread public GeckoResult<List<ContentBlockingController.ContentBlockingException>> saveExceptionList();
436
437
438
439
440
441
  }

  @AnyThread public static class ContentBlockingController.ContentBlockingException {
    method @NonNull public static ContentBlockingController.ContentBlockingException fromJson(@NonNull JSONObject);
    method @NonNull public JSONObject toJson();
    field @NonNull public final String uri;
442
443
  }

444
445
446
447
448
449
450
451
452
453
  public static class ContentBlockingController.Event {
    ctor protected Event();
    field public static final int BLOCKED_CRYPTOMINING_CONTENT = 2048;
    field public static final int BLOCKED_FINGERPRINTING_CONTENT = 64;
    field public static final int BLOCKED_SOCIALTRACKING_CONTENT = 65536;
    field public static final int BLOCKED_TRACKING_CONTENT = 4096;
    field public static final int BLOCKED_UNSAFE_CONTENT = 16384;
    field public static final int COOKIES_BLOCKED_ALL = 1073741824;
    field public static final int COOKIES_BLOCKED_BY_PERMISSION = 268435456;
    field public static final int COOKIES_BLOCKED_FOREIGN = 128;
454
    field public static final int COOKIES_BLOCKED_SOCIALTRACKER = 16777216;
455
456
457
458
459
460
461
    field public static final int COOKIES_BLOCKED_TRACKER = 536870912;
    field public static final int COOKIES_LOADED = 32768;
    field public static final int COOKIES_LOADED_SOCIALTRACKER = 524288;
    field public static final int COOKIES_LOADED_TRACKER = 262144;
    field public static final int COOKIES_PARTITIONED_FOREIGN = -2147483648;
    field public static final int LOADED_CRYPTOMINING_CONTENT = 2097152;
    field public static final int LOADED_FINGERPRINTING_CONTENT = 1024;
462
463
    field public static final int LOADED_LEVEL_1_TRACKING_CONTENT = 8192;
    field public static final int LOADED_LEVEL_2_TRACKING_CONTENT = 1048576;
464
    field public static final int LOADED_SOCIALTRACKING_CONTENT = 131072;
465
    field public static final int REPLACED_TRACKING_CONTENT = 16;
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
  }

  @AnyThread public static class ContentBlockingController.LogEntry {
    ctor protected LogEntry();
    field @NonNull public final List<ContentBlockingController.LogEntry.BlockingData> blockingData;
    field @NonNull public final String origin;
  }

  public static class ContentBlockingController.LogEntry.BlockingData {
    ctor protected BlockingData();
    field public final boolean blocked;
    field public final int category;
    field public final int count;
  }

481
482
  public class CrashReporter {
    ctor public CrashReporter();
483
484
    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);
485
    method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull File, @NonNull File, @NonNull String);
486
    method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull String, @NonNull File, @NonNull JSONObject);
487
488
  }

489
490
491
492
493
  @Documented @Retention(value=java.lang.annotation.RetentionPolicy.RUNTIME) @Target(value={java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PACKAGE, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE}) public interface DeprecationSchedule {
    element public String id();
    element public int version();
  }

494
  public class GeckoDisplay {
495
    ctor protected GeckoDisplay(GeckoSession);
496
    method @NonNull @UiThread public GeckoResult<Bitmap> capturePixels();
497
    method @UiThread public void safeAreaInsetsChanged(int, int, int, int);
498
    method @UiThread public void screenOriginChanged(int, int);
499
    method @NonNull @UiThread public GeckoDisplay.ScreenshotBuilder screenshot();
500
    method @UiThread public void setDynamicToolbarMaxHeight(int);
501
    method @UiThread public void setVerticalClipping(int);
502
503
504
505
    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();
506
507
  }

508
509
510
  public static final class GeckoDisplay.ScreenshotBuilder {
    method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder aspectPreservingSize(int);
    method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder bitmap(@Nullable Bitmap);
511
    method @NonNull @UiThread public GeckoResult<Bitmap> capture();
512
513
514
515
516
517
    method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder scale(float);
    method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder size(int, int);
    method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder source(int, int, int, int);
    method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder source(@NonNull Rect);
  }

518
  @AnyThread public class GeckoResult<T> {
519
    ctor public GeckoResult();
520
521
    ctor public GeckoResult(Handler);
    ctor public GeckoResult(GeckoResult<T>);
522
523
    method @NonNull public GeckoResult<Void> accept(@Nullable GeckoResult.Consumer<T>);
    method @NonNull public GeckoResult<Void> accept(@Nullable GeckoResult.Consumer<T>, @Nullable GeckoResult.Consumer<Throwable>);
524
    method @NonNull @SafeVarargs public static <V> GeckoResult<List<V>> allOf(@NonNull GeckoResult<V>);
525
    method @NonNull public static <V> GeckoResult<List<V>> allOf(@Nullable List<GeckoResult<V>>);
526
    method @AnyThread @NonNull public static GeckoResult<AllowOrDeny> allow();
527
    method @NonNull public synchronized GeckoResult<Boolean> cancel();
528
529
    method public synchronized void complete(@Nullable T);
    method public synchronized void completeExceptionally(@NonNull Throwable);
530
    method @AnyThread @NonNull public static GeckoResult<AllowOrDeny> deny();
531
532
533
534
    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();
535
536
    method @NonNull public <U> GeckoResult<U> map(@Nullable GeckoResult.OnValueMapper<T,U>);
    method @NonNull public <U> GeckoResult<U> map(@Nullable GeckoResult.OnValueMapper<T,U>, @Nullable GeckoResult.OnExceptionMapper);
537
538
    method @Nullable public synchronized T poll();
    method @Nullable public synchronized T poll(long);
539
    method public void setCancellationDelegate(@Nullable GeckoResult.CancellationDelegate);
540
541
542
    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);
543
544
    field @Deprecated @DeprecationSchedule(id="allowdeny",version=92) public static final GeckoResult<AllowOrDeny> ALLOW;
    field @Deprecated @DeprecationSchedule(id="allowdeny",version=92) public static final GeckoResult<AllowOrDeny> DENY;
545
546
  }

547
548
549
550
  @AnyThread public static interface GeckoResult.CancellationDelegate {
    method @NonNull default public GeckoResult<Boolean> cancel();
  }

551
552
553
554
  public static interface GeckoResult.Consumer<T> {
    method @AnyThread public void accept(@Nullable T);
  }

555
  public static interface GeckoResult.OnExceptionListener<V> {
556
    method @AnyThread @Nullable public GeckoResult<V> onException(@NonNull Throwable);
557
558
  }

559
560
561
562
  public static interface GeckoResult.OnExceptionMapper {
    method @AnyThread @Nullable public Throwable onException(@NonNull Throwable);
  }

563
  public static interface GeckoResult.OnValueListener<T,U> {
564
    method @AnyThread @Nullable public GeckoResult<U> onValue(@Nullable T);
565
566
  }

567
568
569
570
  public static interface GeckoResult.OnValueMapper<T,U> {
    method @AnyThread @Nullable public U onValue(@Nullable T);
  }

571
572
  public static final class GeckoResult.UncaughtException extends RuntimeException {
    ctor public UncaughtException(Throwable);
573
574
  }

575
  public final class GeckoRuntime implements Parcelable {
576
    method @AnyThread public void appendAppNotesToCrashReport(@NonNull String);
577
578
    method @UiThread public void attachTo(@NonNull Context);
    method @UiThread public void configurationChanged(@NonNull Configuration);
579
580
581
582
583
584
585
586
587
    method @NonNull @UiThread public static GeckoRuntime create(@NonNull Context);
    method @NonNull @UiThread public static GeckoRuntime create(@NonNull Context, @NonNull GeckoRuntimeSettings);
    method @Nullable @UiThread public GeckoRuntime.ActivityDelegate getActivityDelegate();
    method @NonNull @UiThread public ContentBlockingController getContentBlockingController();
    method @NonNull @UiThread public static synchronized GeckoRuntime getDefault(@NonNull Context);
    method @Nullable @UiThread public GeckoRuntime.Delegate getDelegate();
    method @Nullable @UiThread public Autocomplete.LoginStorageDelegate getLoginStorageDelegate();
    method @Nullable @UiThread public File getProfileDir();
    method @NonNull @UiThread public ProfilerController getProfilerController();
588
    method @AnyThread @NonNull public GeckoRuntimeSettings getSettings();
589
590
591
592
    method @NonNull @UiThread public StorageController getStorageController();
    method @NonNull @UiThread public WebExtensionController getWebExtensionController();
    method @Nullable @UiThread public WebNotificationDelegate getWebNotificationDelegate();
    method @NonNull @UiThread public WebPushController getWebPushController();
593
594
595
    method @UiThread public void orientationChanged();
    method @UiThread public void orientationChanged(int);
    method @AnyThread public void readFromParcel(@NonNull Parcel);
596
    method @UiThread public void setActivityDelegate(@Nullable GeckoRuntime.ActivityDelegate);
597
    method @UiThread public void setDelegate(@Nullable GeckoRuntime.Delegate);
598
    method @UiThread public void setLoginStorageDelegate(@Nullable Autocomplete.LoginStorageDelegate);
599
    method @UiThread public void setServiceWorkerDelegate(@Nullable GeckoRuntime.ServiceWorkerDelegate);
600
    method @UiThread public void setWebNotificationDelegate(@Nullable WebNotificationDelegate);
601
602
603
604
605
606
    method @AnyThread public void shutdown();
    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";
607
608
  }

609
  public static interface GeckoRuntime.ActivityDelegate {
610
    method @Nullable @UiThread public GeckoResult<Intent> onStartActivityForResult(@NonNull PendingIntent);
611
612
  }

613
  public static interface GeckoRuntime.Delegate {
614
    method @UiThread public void onShutdown();
615
616
  }

617
  @UiThread public static interface GeckoRuntime.ServiceWorkerDelegate {
618
    method @NonNull @UiThread public GeckoResult<GeckoSession> onOpenWindow(@NonNull String);
619
620
  }

621
  @AnyThread public final class GeckoRuntimeSettings extends RuntimeSettings {
622
    method public boolean getAboutConfigEnabled();
623
    method public int getAllowInsecureConnections();
624
    method @NonNull public String[] getArguments();
625
    method public boolean getAutomaticFontSizeAdjustment();
626
    method @Nullable public String getConfigFilePath();
627
    method public boolean getConsoleOutputEnabled();
628
629
630
631
    method @NonNull public ContentBlocking.Settings getContentBlocking();
    method @Nullable public Class<?> getCrashHandler();
    method @Nullable public Float getDisplayDensityOverride();
    method @Nullable public Integer getDisplayDpiOverride();
632
    method public boolean getDoubleTapZoomingEnabled();
633
    method @NonNull public Bundle getExtras();
634
635
    method public boolean getFontInflationEnabled();
    method public float getFontSizeFactor();
636
    method public boolean getForceUserScalableEnabled();
637
638
    method public int getGlMsaaLevel();
    method public boolean getInputAutoZoomEnabled();
639
    method public boolean getJavaScriptEnabled();
640
    method @Nullable public String[] getLocales();
641
    method public boolean getLoginAutofillEnabled();
642
    method public boolean getPauseForDebuggerEnabled();
643
    method public int getPreferredColorScheme();
644
    method public boolean getRemoteDebuggingEnabled();
645
646
    method @Nullable public GeckoRuntime getRuntime();
    method @Nullable public Rect getScreenSizeOverride();
647
    method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
648
    method public int getTorSecurityLevel();
649
650
    method public boolean getUseMaxScreenDepth();
    method public boolean getWebFontsEnabled();
651
    method public boolean getWebManifestEnabled();
652
    method @NonNull public GeckoRuntimeSettings setAboutConfigEnabled(boolean);
653
    method @NonNull public GeckoRuntimeSettings setAllowInsecureConnections(int);
654
655
    method @NonNull public GeckoRuntimeSettings setAutomaticFontSizeAdjustment(boolean);
    method @NonNull public GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
656
    method @NonNull public GeckoRuntimeSettings setDoubleTapZoomingEnabled(boolean);
657
658
    method @NonNull public GeckoRuntimeSettings setFontInflationEnabled(boolean);
    method @NonNull public GeckoRuntimeSettings setFontSizeFactor(float);
659
    method @NonNull public GeckoRuntimeSettings setForceUserScalableEnabled(boolean);
660
661
    method @NonNull public GeckoRuntimeSettings setGlMsaaLevel(int);
    method @NonNull public GeckoRuntimeSettings setInputAutoZoomEnabled(boolean);
662
663
    method @NonNull public GeckoRuntimeSettings setJavaScriptEnabled(boolean);
    method public void setLocales(@Nullable String[]);
664
    method @NonNull public GeckoRuntimeSettings setLoginAutofillEnabled(boolean);
665
666
    method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
    method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
667
    method @NonNull public GeckoRuntimeSettings setTorSecurityLevel(int);
668
    method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
669
    method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean);
670
    field public static final int ALLOW_ALL = 0;
671
672
673
    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;
674
    field public static final Parcelable.Creator<GeckoRuntimeSettings> CREATOR;
675
676
    field public static final int HTTPS_ONLY = 2;
    field public static final int HTTPS_ONLY_PRIVATE = 1;
677
678
  }

679
  @AnyThread public static final class GeckoRuntimeSettings.Builder extends RuntimeSettings.Builder {
680
    ctor public Builder();
681
    method @NonNull public GeckoRuntimeSettings.Builder aboutConfigEnabled(boolean);
682
    method @NonNull public GeckoRuntimeSettings.Builder allowInsecureConnections(int);
683
684
    method @NonNull public GeckoRuntimeSettings.Builder arguments(@NonNull String[]);
    method @NonNull public GeckoRuntimeSettings.Builder automaticFontSizeAdjustment(boolean);
685
    method @NonNull public GeckoRuntimeSettings.Builder configFilePath(@Nullable String);
686
687
688
    method @NonNull public GeckoRuntimeSettings.Builder consoleOutput(boolean);
    method @NonNull public GeckoRuntimeSettings.Builder contentBlocking(@NonNull ContentBlocking.Settings);
    method @NonNull public GeckoRuntimeSettings.Builder crashHandler(@Nullable Class<?>);
689
    method @NonNull public GeckoRuntimeSettings.Builder debugLogging(boolean);
690
691
    method @NonNull public GeckoRuntimeSettings.Builder displayDensityOverride(float);
    method @NonNull public GeckoRuntimeSettings.Builder displayDpiOverride(int);
692
    method @NonNull public GeckoRuntimeSettings.Builder doubleTapZoomingEnabled(boolean);
693
694
695
    method @NonNull public GeckoRuntimeSettings.Builder extras(@NonNull Bundle);
    method @NonNull public GeckoRuntimeSettings.Builder fontInflation(boolean);
    method @NonNull public GeckoRuntimeSettings.Builder fontSizeFactor(float);
696
    method @NonNull public GeckoRuntimeSettings.Builder forceUserScalableEnabled(boolean);
697
698
    method @NonNull public GeckoRuntimeSettings.Builder glMsaaLevel(int);
    method @NonNull public GeckoRuntimeSettings.Builder inputAutoZoomEnabled(boolean);
699
700
    method @NonNull public GeckoRuntimeSettings.Builder javaScriptEnabled(boolean);
    method @NonNull public GeckoRuntimeSettings.Builder locales(@Nullable String[]);
701
    method @NonNull public GeckoRuntimeSettings.Builder loginAutofillEnabled(boolean);
702
703
704
705
    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);
706
    method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
707
    method @NonNull public GeckoRuntimeSettings.Builder torSecurityLevel(int);
708
709
    method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
    method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
710
    method @NonNull public GeckoRuntimeSettings.Builder webManifest(boolean);
711
712
713
    method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
  }

714
  public class GeckoSession {
715
    ctor public GeckoSession();
716
    ctor public GeckoSession(@Nullable GeckoSessionSettings);
717
    method @NonNull @UiThread public GeckoDisplay acquireDisplay();
718
    method @UiThread public void autofill(@NonNull SparseArray<CharSequence>);
719
720
    method @UiThread public void close();
    method @AnyThread public void exitFullScreen();
721
722
723
    method @NonNull @UiThread public SessionAccessibility getAccessibility();
    method @Nullable @UiThread public Autofill.Delegate getAutofillDelegate();
    method @NonNull @UiThread public Autofill.Session getAutofillSession();
724
725
726
    method @UiThread public void getClientBounds(@NonNull RectF);
    method @UiThread public void getClientToScreenMatrix(@NonNull Matrix);
    method @UiThread public void getClientToSurfaceMatrix(@NonNull Matrix);
727
    method @NonNull @UiThread public CompositorController getCompositorController();
728
    method @AnyThread @Nullable public ContentBlocking.Delegate getContentBlockingDelegate();
729
    method @Nullable @UiThread public GeckoSession.ContentDelegate getContentDelegate();
730
731
732
    method @AnyThread @NonNull public static String getDefaultUserAgent();
    method @AnyThread @NonNull public SessionFinder getFinder();
    method @AnyThread @Nullable public GeckoSession.HistoryDelegate getHistoryDelegate();
733
    method @AnyThread @Deprecated @DeprecationSchedule(version=91,id="media-element") @Nullable public GeckoSession.MediaDelegate getMediaDelegate();
734
    method @AnyThread @Nullable public MediaSession.Delegate getMediaSessionDelegate();
735
736
    method @Nullable @UiThread public GeckoSession.NavigationDelegate getNavigationDelegate();
    method @NonNull @UiThread public OverscrollEdgeEffect getOverscrollEdgeEffect();
737
738
    method @UiThread public void getPageToScreenMatrix(@NonNull Matrix);
    method @UiThread public void getPageToSurfaceMatrix(@NonNull Matrix);
739
740
741
    method @NonNull @UiThread public PanZoomController getPanZoomController();
    method @Nullable @UiThread public GeckoSession.PermissionDelegate getPermissionDelegate();
    method @Nullable @UiThread public GeckoSession.ProgressDelegate getProgressDelegate();
742
    method @AnyThread @Nullable public GeckoSession.PromptDelegate getPromptDelegate();
743
    method @Nullable @UiThread public GeckoSession.ScrollDelegate getScrollDelegate();
744
745
746
747
748
    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();
749
    method @NonNull @UiThread public WebExtension.SessionController getWebExtensionController();
750
751
    method @AnyThread public void goBack();
    method @AnyThread public void goForward();
752
    method @AnyThread public void gotoHistoryIndex(int);
753
    method @AnyThread public boolean isOpen();
754
    method @AnyThread public void load(@NonNull GeckoSession.Loader);
755
756
    method @AnyThread public void loadUri(@NonNull String);
    method @UiThread public void open(@NonNull GeckoRuntime);
757
    method @AnyThread public void purgeHistory();
758
759
    method @UiThread public void releaseDisplay(@NonNull GeckoDisplay);
    method @AnyThread public void reload();
760
    method @AnyThread public void reload(int);
761
762
    method @AnyThread public void restoreState(@NonNull GeckoSession.SessionState);
    method @AnyThread public void setActive(boolean);
763
    method @UiThread public void setAutofillDelegate(@Nullable Autofill.Delegate);
764
765
766
767
    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);
768
    method @AnyThread @Deprecated @DeprecationSchedule(version=91,id="media-element") public void setMediaDelegate(@Nullable GeckoSession.MediaDelegate);
769
    method @AnyThread public void setMediaSessionDelegate(@Nullable MediaSession.Delegate);
770
771
772
773
774
775
776
777
    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);
778
779
780
781
782
783
784
    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;
785
786
    field public static final int HEADER_FILTER_CORS_SAFELISTED = 1;
    field public static final int HEADER_FILTER_UNRESTRICTED_UNSAFE = 2;
787
788
    field public static final int LOAD_FLAGS_ALLOW_POPUPS = 8;
    field public static final int LOAD_FLAGS_BYPASS_CACHE = 1;
789
    field public static final int LOAD_FLAGS_BYPASS_CLASSIFIER = 16;
790
791
    field public static final int LOAD_FLAGS_BYPASS_PROXY = 2;
    field public static final int LOAD_FLAGS_EXTERNAL = 4;
792
    field public static final int LOAD_FLAGS_FORCE_ALLOW_DATA_URI = 32;
793
    field public static final int LOAD_FLAGS_NONE = 0;
794
    field public static final int LOAD_FLAGS_REPLACE_HISTORY = 64;
795
    field @Nullable protected GeckoSession.Window mWindow;
796
797
798
  }

  public static interface GeckoSession.ContentDelegate {
799
800
801
    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);
802
    method @UiThread default public void onExternalResponse(@NonNull GeckoSession, @NonNull WebResponse);
803
    method @UiThread default public void onFirstComposite(@NonNull GeckoSession);
804
    method @UiThread default public void onFirstContentfulPaint(@NonNull GeckoSession);
805
806
    method @UiThread default public void onFocusRequest(@NonNull GeckoSession);
    method @UiThread default public void onFullScreen(@NonNull GeckoSession, boolean);
807
    method @UiThread default public void onKill(@NonNull GeckoSession);
808
    method @UiThread default public void onMetaViewportFitChange(@NonNull GeckoSession, @NonNull String);
809
    method @UiThread default public void onPaintStatusReset(@NonNull GeckoSession);
810
    method @Nullable @UiThread default public GeckoResult<SlowScriptResponse> onSlowScript(@NonNull GeckoSession, @NonNull String);
811
812
    method @UiThread default public void onTitleChange(@NonNull GeckoSession, @Nullable String);
    method @UiThread default public void onWebAppManifest(@NonNull GeckoSession, @NonNull JSONObject);
813
814
  }

815
  public static class GeckoSession.ContentDelegate.ContextElement {
816
    ctor protected ContextElement(@Nullable String, @Nullable String, @Nullable String, @Nullable String, @NonNull String, @Nullable String);
817
818
819
820
    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;
821
822
823
824
825
    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;
826
    field public final int type;
827
828
  }

829
  @AnyThread public static class GeckoSession.FinderResult {
830
    ctor protected FinderResult();
831
    field @Nullable public final RectF clientRect;
832
833
834
    field public final int current;
    field public final int flags;
    field public final boolean found;
835
836
    field @Nullable public final String linkUri;
    field @NonNull public final String searchString;
837
838
839
840
841
    field public final int total;
    field public final boolean wrapped;
  }

  public static interface GeckoSession.HistoryDelegate {
842
    method @Nullable @UiThread default public GeckoResult<boolean[]> getVisited(@NonNull GeckoSession, @NonNull String[]);
843
    method @UiThread default public void onHistoryStateChange(@NonNull GeckoSession, @NonNull GeckoSession.HistoryDelegate.HistoryList);
844
    method @Nullable @UiThread default public GeckoResult<Boolean> onVisited(@NonNull GeckoSession, @NonNull String, @Nullable String, int);
845
846
847
848
849
850
851
852
    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;
  }

853
854
855
856
857
858
859
860
861
  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();
  }

862
863
864
865
866
867
  @AnyThread public static class GeckoSession.Loader {
    ctor public Loader();
    method @NonNull public GeckoSession.Loader additionalHeaders(@NonNull Map<String,String>);
    method @NonNull public GeckoSession.Loader data(@NonNull byte[], @Nullable String);
    method @NonNull public GeckoSession.Loader data(@NonNull String, @Nullable String);
    method @NonNull public GeckoSession.Loader flags(int);
868
    method @NonNull public GeckoSession.Loader headerFilter(int);
869
870
871
872
873
874
875
    method @NonNull public GeckoSession.Loader referrer(@NonNull GeckoSession);
    method @NonNull public GeckoSession.Loader referrer(@NonNull Uri);
    method @NonNull public GeckoSession.Loader referrer(@NonNull String);
    method @NonNull public GeckoSession.Loader uri(@NonNull String);
    method @NonNull public GeckoSession.Loader uri(@NonNull Uri);
  }

876
877
878
  @Deprecated @DeprecationSchedule(version=91,id="media-element") public static interface GeckoSession.MediaDelegate {
    method @Deprecated @DeprecationSchedule(version=91,id="media-element") @UiThread default public void onMediaAdd(@NonNull GeckoSession, @NonNull MediaElement);
    method @Deprecated @DeprecationSchedule(version=91,id="media-element") @UiThread default public void onMediaRemove(@NonNull GeckoSession, @NonNull MediaElement);
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
    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;
898
899
900
  }

  public static interface GeckoSession.NavigationDelegate {
901
902
    method @UiThread default public void onCanGoBack(@NonNull GeckoSession, boolean);
    method @UiThread default public void onCanGoForward(@NonNull GeckoSession, boolean);
903
904
    method @Nullable @UiThread default public GeckoResult<String> onLoadError(@NonNull GeckoSession, @Nullable String, @NonNull WebRequestError);
    method @Nullable @UiThread default public GeckoResult<AllowOrDeny> onLoadRequest(@NonNull GeckoSession, @NonNull GeckoSession.NavigationDelegate.LoadRequest);
905
    method @UiThread default public void onLocationChange(@NonNull GeckoSession, @Nullable String);
906
907
    method @Nullable @UiThread default public GeckoResult<GeckoSession> onNewSession(@NonNull GeckoSession, @NonNull String);
    method @Nullable @UiThread default public GeckoResult<AllowOrDeny> onSubframeLoadRequest(@NonNull GeckoSession, @NonNull GeckoSession.NavigationDelegate.LoadRequest);
908
    field public static final int LOAD_REQUEST_IS_REDIRECT = 8388608;
909
910
911
912
913
914
    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 {
915
    ctor protected LoadRequest();
916
    field public final boolean hasUserGesture;
917
    field public final boolean isDirectNavigation;
918
    field public final boolean isRedirect;
919
    field public final int target;
920
921
    field @Nullable public final String triggerUri;
    field @NonNull public final String uri;
922
923
924
  }

  public static interface GeckoSession.PermissionDelegate {
925
926
927
    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);
928
929
    field public static final int PERMISSION_AUTOPLAY_AUDIBLE = 5;
    field public static final int PERMISSION_AUTOPLAY_INAUDIBLE = 4;
930
931
    field public static final int PERMISSION_DESKTOP_NOTIFICATION = 1;
    field public static final int PERMISSION_GEOLOCATION = 0;
932
    field public static final int PERMISSION_MEDIA_KEY_SYSTEM_ACCESS = 6;
933
    field public static final int PERMISSION_PERSISTENT_STORAGE = 2;
934
    field public static final int PERMISSION_XR = 3;
935
936
937
  }

  public static interface GeckoSession.PermissionDelegate.Callback {
938
939
    method @UiThread default public void grant();
    method @UiThread default public void reject();
940
941
942
  }

  public static interface GeckoSession.PermissionDelegate.MediaCallback {
943
944
945
    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();
946
947
948
  }

  public static class GeckoSession.PermissionDelegate.MediaSource {
949
    ctor protected MediaSource();
950
    field public static final int SOURCE_AUDIOCAPTURE = 3;
951
    field public static final int SOURCE_CAMERA = 0;
952
953
    field public static final int SOURCE_MICROPHONE = 2;
    field public static final int SOURCE_OTHER = 4;
954
955
956
    field public static final int SOURCE_SCREEN = 1;
    field public static final int TYPE_AUDIO = 1;
    field public static final int TYPE_VIDEO = 0;
957
958
959
    field @NonNull public final String id;
    field @Nullable public final String name;
    field @NonNull public final String rawId;
960
961
962
963
964
    field public final int source;
    field public final int type;
  }

  public static interface GeckoSession.ProgressDelegate {
965
966
967
968
969
    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);
970
971
972
  }

  public static class GeckoSession.ProgressDelegate.SecurityInformation {
973
    ctor protected SecurityInformation();
974
975
976
977
978
979
    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;
980
    field @Nullable public final X509Certificate certificate;
981
    field @NonNull public final String host;
982
983
984
985
    field public final boolean isException;
    field public final boolean isSecure;
    field public final int mixedModeActive;
    field public final int mixedModePassive;
986
    field @Nullable public final String origin;
987
988
989
990
    field public final int securityMode;
  }

  public static interface GeckoSession.PromptDelegate {
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAlertPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AlertPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAuthPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AuthPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onBeforeUnloadPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.BeforeUnloadPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onButtonPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ButtonPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onChoicePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ChoicePrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onColorPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ColorPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onDateTimePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.DateTimePrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onFilePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.FilePrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onLoginSave(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.LoginSaveOption>);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onLoginSelect(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.LoginSelectOption>);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onPopupPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.PopupPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onRepostConfirmPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.RepostConfirmPrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onSharePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.SharePrompt);
    method @Nullable @UiThread default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onTextPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.TextPrompt);
1005
1006
1007
1008
1009
1010
1011
1012
1013
  }

  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);
1014
1015
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String, @NonNull String);
1016
1017
1018
1019
1020
    field @NonNull public final GeckoSession.PromptDelegate.AuthPrompt.AuthOptions authOptions;
    field @Nullable public final String message;
  }

  public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions {
1021
    ctor protected AuthOptions();
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
    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;
  }

1045
1046
  public static class GeckoSession.PromptDelegate.AutocompleteRequest<T extends Autocomplete.Option<?>> extends GeckoSession.PromptDelegate.BasePrompt {
    ctor protected AutocompleteRequest(@NonNull T[]);
1047
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Autocomplete.Option<?>);
1048
1049
1050
    field @NonNull public final T[] options;
  }

1051
  public static class GeckoSession.PromptDelegate.BasePrompt {
1052
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse dismiss();
1053
    method @UiThread public boolean isComplete();
1054
    method @NonNull @UiThread protected GeckoSession.PromptDelegate.PromptResponse confirm();
1055
1056
1057
    field @Nullable public final String title;
  }

1058
1059
  public static class GeckoSession.PromptDelegate.BeforeUnloadPrompt extends GeckoSession.PromptDelegate.BasePrompt {
    ctor protected BeforeUnloadPrompt();
1060
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@Nullable AllowOrDeny);
1061
1062
  }

1063
1064
  public static class GeckoSession.PromptDelegate.ButtonPrompt extends GeckoSession.PromptDelegate.BasePrompt {
    ctor protected ButtonPrompt(@Nullable String, @Nullable String);
1065
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(int);
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
    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[]);
1077
1078
1079
1080
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String[]);
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice);
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[]);
1081
1082
1083
1084
1085
1086
    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 {
1087
    ctor protected Choice();
1088
    field public final boolean disabled;
1089
1090
    field @Nullable public final String icon;
    field @NonNull public final String id;
1091
    field @Nullable public final GeckoSession.PromptDelegate.ChoicePrompt.Choice[] items;
1092
    field @NonNull public final String label;
1093
1094
1095
1096
    field public final boolean selected;
    field public final boolean separator;
  }

1097
1098
1099
1100
1101
1102
1103
1104
1105
  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);
1106
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
1107
1108
1109
1110
1111
    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);
1112
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
    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[]);
1130
1131
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context, @NonNull Uri);
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context, @NonNull Uri[]);
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
    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);
1153
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull AllowOrDeny);
1154
    field @Nullable public final String targetUri;
1155
1156
  }

1157
  public static class GeckoSession.PromptDelegate.PromptResponse {
1158
1159
  }

1160
1161
  public static class GeckoSession.PromptDelegate.RepostConfirmPrompt extends GeckoSession.PromptDelegate.BasePrompt {
    ctor protected RepostConfirmPrompt();
1162
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@Nullable AllowOrDeny);
1163
1164
  }

1165
1166
  public static class GeckoSession.PromptDelegate.SharePrompt extends GeckoSession.PromptDelegate.BasePrompt {
    ctor protected SharePrompt(@Nullable String, @Nullable String, @Nullable String);
1167
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(int);
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
    field @Nullable public final String text;
    field @Nullable public final String uri;
  }

  public static class GeckoSession.PromptDelegate.SharePrompt.Result {
    ctor protected Result();
    field public static final int ABORT = 2;
    field public static final int FAILURE = 1;
    field public static final int SUCCESS = 0;
  }

1179
1180
  public static class GeckoSession.PromptDelegate.TextPrompt extends GeckoSession.PromptDelegate.BasePrompt {
    ctor protected TextPrompt(@Nullable String, @Nullable String, @Nullable String);
1181
    method @NonNull @UiThread public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
1182
1183
    field @Nullable public final String defaultValue;
    field @Nullable public final String message;
1184
1185
1186
  }

  public static interface GeckoSession.ScrollDelegate {
1187
    method @UiThread default public void onScrollChanged(@NonNull GeckoSession, int, int);
1188
1189
1190
  }

  public static interface GeckoSession.SelectionActionDelegate {
1191
    method @UiThread default public void onHideAction(@NonNull GeckoSession, int);