Source code

Revision control

Other Tools

1
import android.app.Activity;
2
import android.content.Context;
3
import android.content.Intent;
4
import android.content.res.Configuration;
5
import android.graphics.Bitmap;
6
import android.graphics.Canvas;
7
import android.graphics.Matrix;
8
import android.graphics.Rect;
9
import android.graphics.RectF;
10
import android.graphics.Region;
11
import android.net.Uri;
12
import android.os.Bundle;
13
import android.os.Handler;
14
import android.os.Looper;
15
import android.os.Parcel;
16
import android.os.Parcelable;
17
import android.support.annotation.AnyThread;
18
import android.support.annotation.NonNull;
19
import android.support.annotation.Nullable;
20
import android.support.annotation.UiThread;
21
import android.util.AttributeSet;
22
import android.util.SparseArray;
23
import android.view.ActionMode;
24
import android.view.KeyEvent;
25
import android.view.Menu;
26
import android.view.MenuItem;
27
import android.view.MotionEvent;
28
import android.view.Surface;
29
import android.view.View;
30
import android.view.ViewStructure;
31
import android.view.autofill.AutofillValue;
32
import android.view.inputmethod.CursorAnchorInfo;
33
import android.view.inputmethod.EditorInfo;
34
import android.view.inputmethod.ExtractedText;
35
import android.view.inputmethod.ExtractedTextRequest;
36
import android.view.inputmethod.InputConnection;
37
import android.widget.FrameLayout;
38
import java.io.File;
39
import java.io.InputStream;
40
import java.lang.Boolean;
41
import java.lang.CharSequence;
42
import java.lang.Class;
43
import java.lang.Deprecated;
44
import java.lang.Exception;
45
import java.lang.Float;
46
import java.lang.Integer;
47
import java.lang.Long;
48
import java.lang.Object;
49
import java.lang.Runnable;
50
import java.lang.RuntimeException;
51
import java.lang.String;
52
import java.lang.Throwable;
53
import java.lang.Void;
54
import java.net.InetAddress;
55
import java.nio.ByteBuffer;
56
import java.security.cert.X509Certificate;
57
import java.util.AbstractSequentialList;
58
import java.util.Collection;
59
import java.util.List;
60
import java.util.Map;
61
import org.json.JSONObject;
62
import org.mozilla.geckoview.AllowOrDeny;
63
import org.mozilla.geckoview.Autofill;
64
import org.mozilla.geckoview.CompositorController;
65
import org.mozilla.geckoview.ContentBlocking;
66
import org.mozilla.geckoview.ContentBlockingController;
67
import org.mozilla.geckoview.DynamicToolbarAnimator;
68
import org.mozilla.geckoview.GeckoDisplay;
69
import org.mozilla.geckoview.GeckoResult;
70
import org.mozilla.geckoview.GeckoRuntime;
71
import org.mozilla.geckoview.GeckoRuntimeSettings;
72
import org.mozilla.geckoview.GeckoSession;
73
import org.mozilla.geckoview.GeckoSessionSettings;
74
import org.mozilla.geckoview.GeckoView;
75
import org.mozilla.geckoview.LoginStorage;
76
import org.mozilla.geckoview.MediaElement;
77
import org.mozilla.geckoview.OverscrollEdgeEffect;
78
import org.mozilla.geckoview.PanZoomController;
79
import org.mozilla.geckoview.RuntimeSettings;
80
import org.mozilla.geckoview.RuntimeTelemetry;
81
import org.mozilla.geckoview.ScreenLength;
82
import org.mozilla.geckoview.SessionAccessibility;
83
import org.mozilla.geckoview.SessionFinder;
84
import org.mozilla.geckoview.SessionTextInput;
85
import org.mozilla.geckoview.SlowScriptResponse;
86
import org.mozilla.geckoview.StorageController;
87
import org.mozilla.geckoview.WebExtension;
88
import org.mozilla.geckoview.WebExtensionController;
89
import org.mozilla.geckoview.WebMessage;
90
import org.mozilla.geckoview.WebNotification;
91
import org.mozilla.geckoview.WebNotificationDelegate;
92
import org.mozilla.geckoview.WebPushController;
93
import org.mozilla.geckoview.WebPushDelegate;
94
import org.mozilla.geckoview.WebPushSubscription;
95
import org.mozilla.geckoview.WebRequest;
96
import org.mozilla.geckoview.WebRequestError;
97
import org.mozilla.geckoview.WebResponse;
98
99
package org.mozilla.geckoview {
100
101
@AnyThread public final enum AllowOrDeny {
102
method public static AllowOrDeny valueOf(String);
103
method public static AllowOrDeny[] values();
104
enum_constant public static final AllowOrDeny ALLOW;
105
enum_constant public static final AllowOrDeny DENY;
106
}
107
108
public class Autofill {
109
ctor public Autofill();
110
}
111
112
public static interface Autofill.Delegate {
113
method @UiThread default public void onAutofill(@NonNull GeckoSession, int, @Nullable Autofill.Node);
114
}
115
116
public static final class Autofill.Hint {
117
method @AnyThread @Nullable public static String toString(int);
118
field public static final int EMAIL_ADDRESS = 0;
119
field public static final int NONE = -1;
120
field public static final int PASSWORD = 1;
121
field public static final int URI = 2;
122
field public static final int USERNAME = 3;
123
}
124
125
public static final class Autofill.InputType {
126
method @AnyThread @Nullable public static String toString(int);
127
field public static final int NONE = -1;
128
field public static final int NUMBER = 1;
129
field public static final int PHONE = 2;
130
field public static final int TEXT = 0;
131
}
132
133
public static final class Autofill.Node {
134
method @UiThread public void fillViewStructure(@NonNull View, @NonNull ViewStructure, int);
135
method @AnyThread @Nullable public String getAttribute(@NonNull String);
136
method @AnyThread @NonNull public Map<String,String> getAttributes();
137
method @AnyThread @NonNull public Collection<Autofill.Node> getChildren();
138
method @AnyThread @NonNull public Rect getDimensions();
139
method @AnyThread @NonNull public String getDomain();
140
method @AnyThread public boolean getEnabled();
141
method @AnyThread public boolean getFocusable();
142
method @AnyThread public boolean getFocused();
143
method @AnyThread public int getHint();
144
method @AnyThread public int getId();
145
method @AnyThread public int getInputType();
146
method @AnyThread @NonNull public String getTag();
147
method @AnyThread @NonNull public String getValue();
148
method @AnyThread public boolean getVisible();
149
}
150
151
public static final class Autofill.Notify {
152
method @AnyThread @Nullable public static String toString(int);
153
field public static final int NODE_ADDED = 3;
154
field public static final int NODE_BLURRED = 7;
155
field public static final int NODE_FOCUSED = 6;
156
field public static final int NODE_REMOVED = 4;
157
field public static final int NODE_UPDATED = 5;
158
field public static final int SESSION_CANCELED = 2;
159
field public static final int SESSION_COMMITTED = 1;
160
field public static final int SESSION_STARTED = 0;
161
}
162
163
public static final class Autofill.Session {
164
method @UiThread public void fillViewStructure(@NonNull View, @NonNull ViewStructure, int);
165
method @AnyThread @NonNull public Rect getDefaultDimensions();
166
method @AnyThread @NonNull public Autofill.Node getRoot();
167
}
168
169
@UiThread public class BasicSelectionActionDelegate implements ActionMode.Callback GeckoSession.SelectionActionDelegate {
170
ctor public BasicSelectionActionDelegate(@NonNull Activity);
171
ctor public BasicSelectionActionDelegate(@NonNull Activity, boolean);
172
method public boolean areExternalActionsEnabled();
173
method public void clearSelection();
174
method public void enableExternalActions(boolean);
175
method @Nullable public GeckoSession.SelectionActionDelegate.Selection getSelection();
176
method public boolean isActionAvailable();
177
method public void onGetContentRect(@Nullable ActionMode, @Nullable View, @NonNull Rect);
178
method @NonNull protected String[] getAllActions();
179
method protected boolean isActionAvailable(@NonNull String);
180
method protected boolean performAction(@NonNull String, @NonNull MenuItem);
181
method protected void prepareAction(@NonNull String, @NonNull MenuItem);
182
field protected static final String ACTION_PROCESS_TEXT = "android.intent.action.PROCESS_TEXT";
183
field @Nullable protected ActionMode mActionMode;
184
field @NonNull protected final Activity mActivity;
185
field protected boolean mRepopulatedMenu;
186
field @Nullable protected GeckoSession.SelectionActionDelegate.Selection mSelection;
187
field @Nullable protected GeckoSession mSession;
188
field @NonNull protected final Matrix mTempMatrix;
189
field @NonNull protected final RectF mTempRect;
190
field protected final boolean mUseFloatingToolbar;
191
}
192
193
@UiThread public final class CompositorController {
194
method public void addDrawCallback(@NonNull Runnable);
195
method public int getClearColor();
196
method @Nullable public Runnable getFirstPaintCallback();
197
method public void removeDrawCallback(@NonNull Runnable);
198
method public void setClearColor(int);
199
method public void setFirstPaintCallback(@Nullable Runnable);
200
}
201
202
@AnyThread public class ContentBlocking {
203
ctor public ContentBlocking();
204
}
205
206
public static class ContentBlocking.AntiTracking {
207
ctor protected AntiTracking();
208
field public static final int AD = 2;
209
field public static final int ANALYTIC = 4;
210
field public static final int CONTENT = 16;
211
field public static final int CRYPTOMINING = 64;
212
field public static final int DEFAULT = 46;
213
field public static final int FINGERPRINTING = 128;
214
field public static final int NONE = 0;
215
field public static final int SOCIAL = 8;
216
field public static final int STP = 256;
217
field public static final int STRICT = 254;
218
field public static final int TEST = 32;
219
}
220
221
public static class ContentBlocking.BlockEvent {
222
ctor public BlockEvent(@NonNull String, int, int, int, boolean);
223
method @UiThread public int getAntiTrackingCategory();
224
method @UiThread public int getCookieBehaviorCategory();
225
method @UiThread public int getSafeBrowsingCategory();
226
method @UiThread public boolean isBlocking();
227
field @NonNull public final String uri;
228
}
229
230
public static class ContentBlocking.CookieBehavior {
231
ctor protected CookieBehavior();
232
field public static final int ACCEPT_ALL = 0;
233
field public static final int ACCEPT_FIRST_PARTY = 1;
234
field public static final int ACCEPT_NONE = 2;
235
field public static final int ACCEPT_NON_TRACKERS = 4;
236
field public static final int ACCEPT_VISITED = 3;
237
}
238
239
public static class ContentBlocking.CookieLifetime {
240
ctor protected CookieLifetime();
241
field public static final int DAYS = 3;
242
field public static final int NORMAL = 0;
243
field public static final int RUNTIME = 2;
244
}
245
246
public static interface ContentBlocking.Delegate {
247
method @UiThread default public void onContentBlocked(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
248
method @UiThread default public void onContentLoaded(@NonNull GeckoSession, @NonNull ContentBlocking.BlockEvent);
249
}
250
251
public static class ContentBlocking.EtpLevel {
252
ctor public EtpLevel();
253
field public static final int DEFAULT = 1;
254
field public static final int NONE = 0;
255
field public static final int STRICT = 2;
256
}
257
258
public static class ContentBlocking.SafeBrowsing {
259
ctor protected SafeBrowsing();
260
field public static final int DEFAULT = 15360;
261
field public static final int HARMFUL = 4096;
262
field public static final int MALWARE = 1024;
263
field public static final int NONE = 0;
264
field public static final int PHISHING = 8192;
265
field public static final int UNWANTED = 2048;
266
}
267
268
@AnyThread public static class ContentBlocking.Settings extends RuntimeSettings {
269
method public int getAntiTrackingCategories();
270
method public int getCookieBehavior();
271
method public int getCookieLifetime();
272
method public int getEnhancedTrackingProtectionLevel();
273
method public int getSafeBrowsingCategories();
274
method @NonNull public ContentBlocking.Settings setAntiTracking(int);
275
method @NonNull public ContentBlocking.Settings setCookieBehavior(int);
276
method @NonNull public ContentBlocking.Settings setCookieLifetime(int);
277
method @NonNull public ContentBlocking.Settings setEnhancedTrackingProtectionLevel(int);
278
method @NonNull public ContentBlocking.Settings setSafeBrowsing(int);
279
method @NonNull public ContentBlocking.Settings setStrictSocialTrackingProtection(boolean);
280
field public static final Parcelable.Creator<ContentBlocking.Settings> CREATOR;
281
}
282
283
@AnyThread public static class ContentBlocking.Settings.Builder extends RuntimeSettings.Builder {
284
ctor public Builder();
285
method @NonNull public ContentBlocking.Settings.Builder antiTracking(int);
286
method @NonNull public ContentBlocking.Settings.Builder cookieBehavior(int);
287
method @NonNull public ContentBlocking.Settings.Builder cookieLifetime(int);
288
method @NonNull public ContentBlocking.Settings.Builder enhancedTrackingProtectionLevel(int);
289
method @NonNull public ContentBlocking.Settings.Builder safeBrowsing(int);
290
method @NonNull protected ContentBlocking.Settings newSettings(@Nullable ContentBlocking.Settings);
291
}
292
293
@AnyThread public class ContentBlockingController {
294
ctor public ContentBlockingController();
295
method @UiThread public void addException(@NonNull GeckoSession);
296
method @UiThread @NonNull public GeckoResult<Boolean> checkException(@NonNull GeckoSession);
297
method @UiThread public void clearExceptionList();
298
method @UiThread @NonNull public GeckoResult<List<ContentBlockingController.LogEntry>> getLog(@NonNull GeckoSession);
299
method @UiThread public void removeException(@NonNull GeckoSession);
300
method @AnyThread public void removeException(@NonNull ContentBlockingController.ContentBlockingException);
301
method @Deprecated @UiThread public void restoreExceptionList(@NonNull ContentBlockingController.ExceptionList);
302
method @AnyThread public void restoreExceptionList(@NonNull List<ContentBlockingController.ContentBlockingException>);
303
method @UiThread @NonNull public GeckoResult<List<ContentBlockingController.ContentBlockingException>> saveExceptionList();
304
}
305
306
@AnyThread public static class ContentBlockingController.ContentBlockingException {
307
method @NonNull public static ContentBlockingController.ContentBlockingException fromJson(@NonNull JSONObject);
308
method @NonNull public JSONObject toJson();
309
field @NonNull public final String uri;
310
}
311
312
public static class ContentBlockingController.Event {
313
ctor protected Event();
314
field public static final int BLOCKED_CRYPTOMINING_CONTENT = 2048;
315
field public static final int BLOCKED_FINGERPRINTING_CONTENT = 64;
316
field public static final int BLOCKED_SOCIALTRACKING_CONTENT = 65536;
317
field public static final int BLOCKED_TRACKING_CONTENT = 4096;
318
field public static final int BLOCKED_UNSAFE_CONTENT = 16384;
319
field public static final int COOKIES_BLOCKED_ALL = 1073741824;
320
field public static final int COOKIES_BLOCKED_BY_PERMISSION = 268435456;
321
field public static final int COOKIES_BLOCKED_FOREIGN = 128;
322
field public static final int COOKIES_BLOCKED_SOCIALTRACKER = 16777216;
323
field public static final int COOKIES_BLOCKED_TRACKER = 536870912;
324
field public static final int COOKIES_LOADED = 32768;
325
field public static final int COOKIES_LOADED_SOCIALTRACKER = 524288;
326
field public static final int COOKIES_LOADED_TRACKER = 262144;
327
field public static final int COOKIES_PARTITIONED_FOREIGN = -2147483648;
328
field public static final int LOADED_CRYPTOMINING_CONTENT = 2097152;
329
field public static final int LOADED_FINGERPRINTING_CONTENT = 1024;
330
field public static final int LOADED_LEVEL_1_TRACKING_CONTENT = 8192;
331
field public static final int LOADED_LEVEL_2_TRACKING_CONTENT = 1048576;
332
field public static final int LOADED_SOCIALTRACKING_CONTENT = 131072;
333
}
334
335
@Deprecated @AnyThread public class ContentBlockingController.ExceptionList {
336
ctor public ExceptionList(@NonNull String);
337
ctor public ExceptionList(@NonNull JSONObject);
338
method @NonNull public String[] getUris();
339
method @NonNull public JSONObject toJson();
340
}
341
342
@AnyThread public static class ContentBlockingController.LogEntry {
343
ctor protected LogEntry();
344
field @NonNull public final List<ContentBlockingController.LogEntry.BlockingData> blockingData;
345
field @NonNull public final String origin;
346
}
347
348
public static class ContentBlockingController.LogEntry.BlockingData {
349
ctor protected BlockingData();
350
field public final boolean blocked;
351
field public final int category;
352
field public final int count;
353
}
354
355
public class CrashReporter {
356
ctor public CrashReporter();
357
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull Intent, @NonNull String);
358
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull Bundle, @NonNull String);
359
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull Context, @NonNull File, @NonNull File, @NonNull String);
360
method @AnyThread @NonNull public static GeckoResult<String> sendCrashReport(@NonNull String, @NonNull File, @NonNull JSONObject);
361
}
362
363
@UiThread public final class DynamicToolbarAnimator {
364
method @Nullable public DynamicToolbarAnimator.ToolbarChromeProxy getToolbarChromeProxy();
365
method public void hideToolbar(boolean);
366
method public boolean isPinned();
367
method public boolean isPinnedBy(@NonNull DynamicToolbarAnimator.PinReason);
368
method public void setMaxToolbarHeight(int);
369
method public void setPinned(boolean, @NonNull DynamicToolbarAnimator.PinReason);
370
method public void setToolbarChromeProxy(@Nullable DynamicToolbarAnimator.ToolbarChromeProxy);
371
method public void showToolbar(boolean);
372
}
373
374
@AnyThread public static final enum DynamicToolbarAnimator.PinReason {
375
method public static DynamicToolbarAnimator.PinReason valueOf(String);
376
method public static DynamicToolbarAnimator.PinReason[] values();
377
enum_constant public static final DynamicToolbarAnimator.PinReason ACTION_MODE;
378
enum_constant public static final DynamicToolbarAnimator.PinReason CARET_DRAG;
379
enum_constant public static final DynamicToolbarAnimator.PinReason CUSTOM_TAB;
380
enum_constant public static final DynamicToolbarAnimator.PinReason DISABLED;
381
enum_constant public static final DynamicToolbarAnimator.PinReason FULL_SCREEN;
382
enum_constant public static final DynamicToolbarAnimator.PinReason PAGE_LOADING;
383
enum_constant public static final DynamicToolbarAnimator.PinReason RELAYOUT;
384
field public final int value;
385
}
386
387
public static interface DynamicToolbarAnimator.ToolbarChromeProxy {
388
method @UiThread @Nullable default public Bitmap getBitmapOfToolbarChrome();
389
method @UiThread default public boolean isToolbarChromeVisible();
390
method @UiThread default public void toggleToolbarChrome(boolean);
391
}
392
393
public class GeckoDisplay {
394
ctor protected GeckoDisplay(GeckoSession);
395
method @UiThread @NonNull public GeckoResult<Bitmap> capturePixels();
396
method @UiThread public void safeAreaInsetsChanged(int, int, int, int);
397
method @UiThread public void screenOriginChanged(int, int);
398
method @UiThread @NonNull public GeckoDisplay.ScreenshotBuilder screenshot();
399
method @UiThread public void setDynamicToolbarMaxHeight(int);
400
method @UiThread public void setVerticalClipping(int);
401
method @UiThread public boolean shouldPinOnScreen();
402
method @UiThread public void surfaceChanged(@NonNull Surface, int, int);
403
method @UiThread public void surfaceChanged(@NonNull Surface, int, int, int, int);
404
method @UiThread public void surfaceDestroyed();
405
}
406
407
public static final class GeckoDisplay.ScreenshotBuilder {
408
method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder aspectPreservingSize(int);
409
method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder bitmap(@Nullable Bitmap);
410
method @UiThread @NonNull public GeckoResult<Bitmap> capture();
411
method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder scale(float);
412
method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder size(int, int);
413
method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder source(int, int, int, int);
414
method @AnyThread @NonNull public GeckoDisplay.ScreenshotBuilder source(@NonNull Rect);
415
}
416
417
@AnyThread public class GeckoResult<T> {
418
ctor public GeckoResult();
419
ctor public GeckoResult(Handler);
420
ctor public GeckoResult(GeckoResult<T>);
421
method @NonNull public GeckoResult<Void> accept(@Nullable GeckoResult.Consumer<T>);
422
method @NonNull public GeckoResult<Void> accept(@Nullable GeckoResult.Consumer<T>, @Nullable GeckoResult.Consumer<Throwable>);
423
method @NonNull public static <V> GeckoResult<List<V>> allOf(@NonNull GeckoResult<V>);
424
method @NonNull public static <V> GeckoResult<List<V>> allOf(@Nullable List<GeckoResult<V>>);
425
method @NonNull public synchronized GeckoResult<Boolean> cancel();
426
method public synchronized void complete(@Nullable T);
427
method public synchronized void completeExceptionally(@NonNull Throwable);
428
method @NonNull public <U> GeckoResult<U> exceptionally(@NonNull GeckoResult.OnExceptionListener<U>);
429
method @NonNull public static <T> GeckoResult<T> fromException(@NonNull Throwable);
430
method @NonNull public static <U> GeckoResult<U> fromValue(@Nullable U);
431
method @Nullable public Looper getLooper();
432
method @Nullable public synchronized T poll();
433
method @Nullable public synchronized T poll(long);
434
method public void setCancellationDelegate(@Nullable GeckoResult.CancellationDelegate);
435
method @NonNull public <U> GeckoResult<U> then(@NonNull GeckoResult.OnValueListener<T,U>);
436
method @NonNull public <U> GeckoResult<U> then(@Nullable GeckoResult.OnValueListener<T,U>, @Nullable GeckoResult.OnExceptionListener<U>);
437
method @NonNull public GeckoResult<T> withHandler(@Nullable Handler);
438
field public static final GeckoResult<AllowOrDeny> ALLOW;
439
field public static final GeckoResult<AllowOrDeny> DENY;
440
}
441
442
@AnyThread public static interface GeckoResult.CancellationDelegate {
443
method @NonNull default public GeckoResult<Boolean> cancel();
444
}
445
446
public static interface GeckoResult.Consumer<T> {
447
method @AnyThread public void accept(@Nullable T);
448
}
449
450
public static interface GeckoResult.OnExceptionListener<V> {
451
method @AnyThread @Nullable public GeckoResult<V> onException(@NonNull Throwable);
452
}
453
454
public static interface GeckoResult.OnValueListener<T,U> {
455
method @AnyThread @Nullable public GeckoResult<U> onValue(@Nullable T);
456
}
457
458
public static final class GeckoResult.UncaughtException extends RuntimeException {
459
ctor public UncaughtException(Throwable);
460
}
461
462
public final class GeckoRuntime implements Parcelable {
463
method @UiThread public void attachTo(@NonNull Context);
464
method @UiThread public void configurationChanged(@NonNull Configuration);
465
method @UiThread @NonNull public static GeckoRuntime create(@NonNull Context);
466
method @UiThread @NonNull public static GeckoRuntime create(@NonNull Context, @NonNull GeckoRuntimeSettings);
467
method @UiThread @NonNull public ContentBlockingController getContentBlockingController();
468
method @UiThread @NonNull public static synchronized GeckoRuntime getDefault(@NonNull Context);
469
method @UiThread @Nullable public GeckoRuntime.Delegate getDelegate();
470
method @UiThread @Nullable public LoginStorage.Delegate getLoginStorageDelegate();
471
method @UiThread @Nullable public File getProfileDir();
472
method @AnyThread @NonNull public GeckoRuntimeSettings getSettings();
473
method @UiThread @NonNull public StorageController getStorageController();
474
method @UiThread @NonNull public RuntimeTelemetry getTelemetry();
475
method @UiThread @NonNull public WebExtensionController getWebExtensionController();
476
method @UiThread @Nullable public WebNotificationDelegate getWebNotificationDelegate();
477
method @UiThread @NonNull public WebPushController getWebPushController();
478
method @UiThread public void orientationChanged();
479
method @UiThread public void orientationChanged(int);
480
method @AnyThread public void readFromParcel(@NonNull Parcel);
481
method @UiThread @NonNull public GeckoResult<Void> registerWebExtension(@NonNull WebExtension);
482
method @UiThread public void setDelegate(@Nullable GeckoRuntime.Delegate);
483
method @UiThread public void setLoginStorageDelegate(@Nullable LoginStorage.Delegate);
484
method @UiThread public void setServiceWorkerDelegate(@Nullable GeckoRuntime.ServiceWorkerDelegate);
485
method @UiThread public void setWebNotificationDelegate(@Nullable WebNotificationDelegate);
486
method @AnyThread public void shutdown();
487
method @UiThread @NonNull public GeckoResult<Void> unregisterWebExtension(@NonNull WebExtension);
488
field public static final String ACTION_CRASHED = "org.mozilla.gecko.ACTION_CRASHED";
489
field public static final Parcelable.Creator<GeckoRuntime> CREATOR;
490
field public static final String EXTRA_CRASH_FATAL = "fatal";
491
field public static final String EXTRA_EXTRAS_PATH = "extrasPath";
492
field public static final String EXTRA_MINIDUMP_PATH = "minidumpPath";
493
}
494
495
public static interface GeckoRuntime.Delegate {
496
method @UiThread public void onShutdown();
497
}
498
499
@UiThread public static interface GeckoRuntime.ServiceWorkerDelegate {
500
method @UiThread @NonNull public GeckoResult<GeckoSession> onOpenWindow(@NonNull String);
501
}
502
503
@AnyThread public final class GeckoRuntimeSettings extends RuntimeSettings {
504
method public boolean getAboutConfigEnabled();
505
method @NonNull public String[] getArguments();
506
method public boolean getAutomaticFontSizeAdjustment();
507
method @Nullable public String getConfigFilePath();
508
method public boolean getConsoleOutputEnabled();
509
method @NonNull public ContentBlocking.Settings getContentBlocking();
510
method @Nullable public Class<?> getCrashHandler();
511
method @Nullable public Float getDisplayDensityOverride();
512
method @Nullable public Integer getDisplayDpiOverride();
513
method public boolean getDoubleTapZoomingEnabled();
514
method @NonNull public Bundle getExtras();
515
method public boolean getFontInflationEnabled();
516
method public float getFontSizeFactor();
517
method public boolean getForceUserScalableEnabled();
518
method public int getGlMsaaLevel();
519
method public boolean getInputAutoZoomEnabled();
520
method public boolean getJavaScriptEnabled();
521
method @Nullable public String[] getLocales();
522
method public boolean getPauseForDebuggerEnabled();
523
method public int getPreferredColorScheme();
524
method public boolean getRemoteDebuggingEnabled();
525
method @Nullable public GeckoRuntime getRuntime();
526
method @Nullable public Rect getScreenSizeOverride();
527
method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
528
method public boolean getUseMaxScreenDepth();
529
method public boolean getUseMultiprocess();
530
method public boolean getWebFontsEnabled();
531
method public boolean getWebManifestEnabled();
532
method @NonNull public GeckoRuntimeSettings setAboutConfigEnabled(boolean);
533
method @NonNull public GeckoRuntimeSettings setAutomaticFontSizeAdjustment(boolean);
534
method @NonNull public GeckoRuntimeSettings setConsoleOutputEnabled(boolean);
535
method @NonNull public GeckoRuntimeSettings setDoubleTapZoomingEnabled(boolean);
536
method @NonNull public GeckoRuntimeSettings setFontInflationEnabled(boolean);
537
method @NonNull public GeckoRuntimeSettings setFontSizeFactor(float);
538
method @NonNull public GeckoRuntimeSettings setForceUserScalableEnabled(boolean);
539
method @NonNull public GeckoRuntimeSettings setGlMsaaLevel(int);
540
method @NonNull public GeckoRuntimeSettings setInputAutoZoomEnabled(boolean);
541
method @NonNull public GeckoRuntimeSettings setJavaScriptEnabled(boolean);
542
method public void setLocales(@Nullable String[]);
543
method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
544
method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
545
method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
546
method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean);
547
field public static final int COLOR_SCHEME_DARK = 1;
548
field public static final int COLOR_SCHEME_LIGHT = 0;
549
field public static final int COLOR_SCHEME_SYSTEM = -1;
550
field public static final Parcelable.Creator<GeckoRuntimeSettings> CREATOR;
551
}
552
553
@AnyThread public static final class GeckoRuntimeSettings.Builder extends RuntimeSettings.Builder {
554
ctor public Builder();
555
method @NonNull public GeckoRuntimeSettings.Builder aboutConfigEnabled(boolean);
556
method @NonNull public GeckoRuntimeSettings.Builder arguments(@NonNull String[]);
557
method @NonNull public GeckoRuntimeSettings.Builder automaticFontSizeAdjustment(boolean);
558
method @NonNull public GeckoRuntimeSettings.Builder configFilePath(@Nullable String);
559
method @NonNull public GeckoRuntimeSettings.Builder consoleOutput(boolean);
560
method @NonNull public GeckoRuntimeSettings.Builder contentBlocking(@NonNull ContentBlocking.Settings);
561
method @NonNull public GeckoRuntimeSettings.Builder crashHandler(@Nullable Class<?>);
562
method @NonNull public GeckoRuntimeSettings.Builder debugLogging(boolean);
563
method @NonNull public GeckoRuntimeSettings.Builder displayDensityOverride(float);
564
method @NonNull public GeckoRuntimeSettings.Builder displayDpiOverride(int);
565
method @NonNull public GeckoRuntimeSettings.Builder doubleTapZoomingEnabled(boolean);
566
method @NonNull public GeckoRuntimeSettings.Builder extras(@NonNull Bundle);
567
method @NonNull public GeckoRuntimeSettings.Builder fontInflation(boolean);
568
method @NonNull public GeckoRuntimeSettings.Builder fontSizeFactor(float);
569
method @NonNull public GeckoRuntimeSettings.Builder forceUserScalableEnabled(boolean);
570
method @NonNull public GeckoRuntimeSettings.Builder glMsaaLevel(int);
571
method @NonNull public GeckoRuntimeSettings.Builder inputAutoZoomEnabled(boolean);
572
method @NonNull public GeckoRuntimeSettings.Builder javaScriptEnabled(boolean);
573
method @NonNull public GeckoRuntimeSettings.Builder locales(@Nullable String[]);
574
method @NonNull public GeckoRuntimeSettings.Builder pauseForDebugger(boolean);
575
method @NonNull public GeckoRuntimeSettings.Builder preferredColorScheme(int);
576
method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
577
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
578
method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
579
method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
580
method @NonNull public GeckoRuntimeSettings.Builder useMultiprocess(boolean);
581
method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
582
method @NonNull public GeckoRuntimeSettings.Builder webManifest(boolean);
583
method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
584
}
585
586
public class GeckoSession implements Parcelable {
587
ctor public GeckoSession();
588
ctor public GeckoSession(@Nullable GeckoSessionSettings);
589
method @UiThread @NonNull public GeckoDisplay acquireDisplay();
590
method @UiThread public void autofill(@NonNull SparseArray<CharSequence>);
591
method @UiThread public void close();
592
method @AnyThread @NonNull public static String createDataUri(@NonNull byte[], @Nullable String);
593
method @AnyThread @NonNull public static String createDataUri(@NonNull String, @Nullable String);
594
method @AnyThread public void exitFullScreen();
595
method @UiThread @NonNull public SessionAccessibility getAccessibility();
596
method @UiThread @Nullable public Autofill.Delegate getAutofillDelegate();
597
method @UiThread @NonNull public Autofill.Session getAutofillSession();
598
method @UiThread public void getClientBounds(@NonNull RectF);
599
method @UiThread public void getClientToScreenMatrix(@NonNull Matrix);
600
method @UiThread public void getClientToSurfaceMatrix(@NonNull Matrix);
601
method @UiThread @NonNull public CompositorController getCompositorController();
602
method @AnyThread @Nullable public ContentBlocking.Delegate getContentBlockingDelegate();
603
method @UiThread @Nullable public GeckoSession.ContentDelegate getContentDelegate();
604
method @AnyThread @NonNull public static String getDefaultUserAgent();
605
method @UiThread @NonNull public DynamicToolbarAnimator getDynamicToolbarAnimator();
606
method @AnyThread @NonNull public SessionFinder getFinder();
607
method @AnyThread @Nullable public GeckoSession.HistoryDelegate getHistoryDelegate();
608
method @AnyThread @Nullable public GeckoSession.MediaDelegate getMediaDelegate();
609
method @UiThread @Nullable public GeckoSession.NavigationDelegate getNavigationDelegate();
610
method @UiThread @NonNull public OverscrollEdgeEffect getOverscrollEdgeEffect();
611
method @UiThread public void getPageToScreenMatrix(@NonNull Matrix);
612
method @UiThread public void getPageToSurfaceMatrix(@NonNull Matrix);
613
method @UiThread @NonNull public PanZoomController getPanZoomController();
614
method @UiThread @Nullable public GeckoSession.PermissionDelegate getPermissionDelegate();
615
method @UiThread @Nullable public GeckoSession.ProgressDelegate getProgressDelegate();
616
method @AnyThread @Nullable public GeckoSession.PromptDelegate getPromptDelegate();
617
method @UiThread @Nullable public GeckoSession.ScrollDelegate getScrollDelegate();
618
method @AnyThread @Nullable public GeckoSession.SelectionActionDelegate getSelectionActionDelegate();
619
method @AnyThread @NonNull public GeckoSessionSettings getSettings();
620
method @UiThread public void getSurfaceBounds(@NonNull Rect);
621
method @AnyThread @NonNull public SessionTextInput getTextInput();
622
method @AnyThread @NonNull public GeckoResult<String> getUserAgent();
623
method @UiThread @NonNull public WebExtension.SessionController getWebExtensionController();
624
method @AnyThread public void goBack();
625
method @AnyThread public void goForward();
626
method @AnyThread public void gotoHistoryIndex(int);
627
method @AnyThread public boolean isOpen();
628
method @AnyThread public void loadData(@NonNull byte[], @Nullable String);
629
method @AnyThread public void loadString(@NonNull String, @Nullable String);
630
method @AnyThread public void loadUri(@NonNull String);
631
method @AnyThread public void loadUri(@NonNull String, @Nullable Map<String,String>);
632
method @AnyThread public void loadUri(@NonNull String, int);
633
method @AnyThread public void loadUri(@NonNull String, @Nullable String, int);
634
method @AnyThread public void loadUri(@NonNull String, @Nullable String, int, @Nullable Map<String,String>);
635
method @AnyThread public void loadUri(@NonNull String, @Nullable GeckoSession, int);
636
method @AnyThread public void loadUri(@NonNull String, @Nullable GeckoSession, int, @Nullable Map<String,String>);
637
method @AnyThread public void loadUri(@NonNull Uri);
638
method @AnyThread public void loadUri(@NonNull Uri, @Nullable Map<String,String>);
639
method @AnyThread public void loadUri(@NonNull Uri, int);
640
method @AnyThread public void loadUri(@NonNull Uri, @Nullable Uri, int);
641
method @AnyThread public void loadUri(@NonNull Uri, @Nullable Uri, int, @Nullable Map<String,String>);
642
method @UiThread public void open(@NonNull GeckoRuntime);
643
method @AnyThread public void purgeHistory();
644
method @AnyThread public void readFromParcel(@NonNull Parcel);
645
method @UiThread public void releaseDisplay(@NonNull GeckoDisplay);
646
method @AnyThread public void reload();
647
method @AnyThread public void reload(int);
648
method @AnyThread public void restoreState(@NonNull GeckoSession.SessionState);
649
method @AnyThread public void setActive(boolean);
650
method @UiThread public void setAutofillDelegate(@Nullable Autofill.Delegate);
651
method @AnyThread public void setContentBlockingDelegate(@Nullable ContentBlocking.Delegate);
652
method @UiThread public void setContentDelegate(@Nullable GeckoSession.ContentDelegate);
653
method @AnyThread public void setFocused(boolean);
654
method @AnyThread public void setHistoryDelegate(@Nullable GeckoSession.HistoryDelegate);
655
method @AnyThread public void setMediaDelegate(@Nullable GeckoSession.MediaDelegate);
656
method @UiThread public void setNavigationDelegate(@Nullable GeckoSession.NavigationDelegate);
657
method @UiThread public void setPermissionDelegate(@Nullable GeckoSession.PermissionDelegate);
658
method @UiThread public void setProgressDelegate(@Nullable GeckoSession.ProgressDelegate);
659
method @AnyThread public void setPromptDelegate(@Nullable GeckoSession.PromptDelegate);
660
method @UiThread public void setScrollDelegate(@Nullable GeckoSession.ScrollDelegate);
661
method @UiThread public void setSelectionActionDelegate(@Nullable GeckoSession.SelectionActionDelegate);
662
method @AnyThread public void stop();
663
method @UiThread protected void setShouldPinOnScreen(boolean);
664
field public static final Parcelable.Creator<GeckoSession> CREATOR;
665
field public static final int FINDER_DISPLAY_DIM_PAGE = 2;
666
field public static final int FINDER_DISPLAY_DRAW_LINK_OUTLINE = 4;
667
field public static final int FINDER_DISPLAY_HIGHLIGHT_ALL = 1;
668
field public static final int FINDER_FIND_BACKWARDS = 1;
669
field public static final int FINDER_FIND_LINKS_ONLY = 8;
670
field public static final int FINDER_FIND_MATCH_CASE = 2;
671
field public static final int FINDER_FIND_WHOLE_WORD = 4;
672
field public static final int LOAD_FLAGS_ALLOW_POPUPS = 8;
673
field public static final int LOAD_FLAGS_BYPASS_CACHE = 1;
674
field public static final int LOAD_FLAGS_BYPASS_CLASSIFIER = 16;
675
field public static final int LOAD_FLAGS_BYPASS_PROXY = 2;
676
field public static final int LOAD_FLAGS_EXTERNAL = 4;
677
field public static final int LOAD_FLAGS_FORCE_ALLOW_DATA_URI = 32;
678
field public static final int LOAD_FLAGS_NONE = 0;
679
field public static final int LOAD_FLAGS_REPLACE_HISTORY = 64;
680
field @Nullable protected GeckoSession.Window mWindow;
681
}
682
683
public static interface GeckoSession.ContentDelegate {
684
method @UiThread default public void onCloseRequest(@NonNull GeckoSession);
685
method @UiThread default public void onContextMenu(@NonNull GeckoSession, int, int, @NonNull GeckoSession.ContentDelegate.ContextElement);
686
method @UiThread default public void onCrash(@NonNull GeckoSession);
687
method @UiThread default public void onExternalResponse(@NonNull GeckoSession, @NonNull GeckoSession.WebResponseInfo);
688
method @UiThread default public void onFirstComposite(@NonNull GeckoSession);
689
method @UiThread default public void onFirstContentfulPaint(@NonNull GeckoSession);
690
method @UiThread default public void onFocusRequest(@NonNull GeckoSession);
691
method @UiThread default public void onFullScreen(@NonNull GeckoSession, boolean);
692
method @UiThread default public void onKill(@NonNull GeckoSession);
693
method @UiThread default public void onMetaViewportFitChange(@NonNull GeckoSession, @NonNull String);
694
method @UiThread @Nullable default public GeckoResult<SlowScriptResponse> onSlowScript(@NonNull GeckoSession, @NonNull String);
695
method @UiThread default public void onTitleChange(@NonNull GeckoSession, @Nullable String);
696
method @UiThread default public void onWebAppManifest(@NonNull GeckoSession, @NonNull JSONObject);
697
}
698
699
public static class GeckoSession.ContentDelegate.ContextElement {
700
ctor protected ContextElement(@Nullable String, @Nullable String, @Nullable String, @Nullable String, @NonNull String, @Nullable String);
701
field public static final int TYPE_AUDIO = 3;
702
field public static final int TYPE_IMAGE = 1;
703
field public static final int TYPE_NONE = 0;
704
field public static final int TYPE_VIDEO = 2;
705
field @Nullable public final String altText;
706
field @Nullable public final String baseUri;
707
field @Nullable public final String linkUri;
708
field @Nullable public final String srcUri;
709
field @Nullable public final String title;
710
field public final int type;
711
}
712
713
@AnyThread public static class GeckoSession.FinderResult {
714
ctor protected FinderResult();
715
field @Nullable public final RectF clientRect;
716
field public final int current;
717
field public final int flags;
718
field public final boolean found;
719
field @Nullable public final String linkUri;
720
field @NonNull public final String searchString;
721
field public final int total;
722
field public final boolean wrapped;
723
}
724
725
public static interface GeckoSession.HistoryDelegate {
726
method @UiThread @Nullable default public GeckoResult<boolean[]> getVisited(@NonNull GeckoSession, @NonNull String[]);
727
method @UiThread default public void onHistoryStateChange(@NonNull GeckoSession, @NonNull GeckoSession.HistoryDelegate.HistoryList);
728
method @UiThread @Nullable default public GeckoResult<Boolean> onVisited(@NonNull GeckoSession, @NonNull String, @Nullable String, int);
729
field public static final int VISIT_REDIRECT_PERMANENT = 4;
730
field public static final int VISIT_REDIRECT_SOURCE = 8;
731
field public static final int VISIT_REDIRECT_SOURCE_PERMANENT = 16;
732
field public static final int VISIT_REDIRECT_TEMPORARY = 2;
733
field public static final int VISIT_TOP_LEVEL = 1;
734
field public static final int VISIT_UNRECOVERABLE_ERROR = 32;
735
}
736
737
public static interface GeckoSession.HistoryDelegate.HistoryItem {
738
method @AnyThread @NonNull default public String getTitle();
739
method @AnyThread @NonNull default public String getUri();
740
}
741
742
public static interface GeckoSession.HistoryDelegate.HistoryList implements List {
743
method @AnyThread default public int getCurrentIndex();
744
}
745
746
public static interface GeckoSession.MediaDelegate {
747
method @UiThread default public void onMediaAdd(@NonNull GeckoSession, @NonNull MediaElement);
748
method @UiThread default public void onMediaRemove(@NonNull GeckoSession, @NonNull MediaElement);
749
method @UiThread default public void onRecordingStatusChanged(@NonNull GeckoSession, @NonNull GeckoSession.MediaDelegate.RecordingDevice[]);
750
}
751
752
public static class GeckoSession.MediaDelegate.RecordingDevice {
753
ctor protected RecordingDevice();
754
field public final long status;
755
field public final long type;
756
}
757
758
public static class GeckoSession.MediaDelegate.RecordingDevice.Status {
759
ctor protected Status();
760
field public static final long INACTIVE = 1L;
761
field public static final long RECORDING = 0L;
762
}
763
764
public static class GeckoSession.MediaDelegate.RecordingDevice.Type {
765
ctor protected Type();
766
field public static final long CAMERA = 0L;
767
field public static final long MICROPHONE = 1L;
768
}
769
770
public static interface GeckoSession.NavigationDelegate {
771
method @UiThread default public void onCanGoBack(@NonNull GeckoSession, boolean);
772
method @UiThread default public void onCanGoForward(@NonNull GeckoSession, boolean);
773
method @UiThread @Nullable default public GeckoResult<String> onLoadError(@NonNull GeckoSession, @Nullable String, @NonNull WebRequestError);
774
method @UiThread @Nullable default public GeckoResult<AllowOrDeny> onLoadRequest(@NonNull GeckoSession, @NonNull GeckoSession.NavigationDelegate.LoadRequest);
775
method @UiThread default public void onLocationChange(@NonNull GeckoSession, @Nullable String);
776
method @UiThread @Nullable default public GeckoResult<GeckoSession> onNewSession(@NonNull GeckoSession, @NonNull String);
777
field public static final int LOAD_REQUEST_IS_REDIRECT = 8388608;
778
field public static final int TARGET_WINDOW_CURRENT = 1;
779
field public static final int TARGET_WINDOW_NEW = 2;
780
field public static final int TARGET_WINDOW_NONE = 0;
781
}
782
783
public static class GeckoSession.NavigationDelegate.LoadRequest {
784
ctor protected LoadRequest();
785
field public final boolean hasUserGesture;
786
field public final boolean isDirectNavigation;
787
field public final boolean isRedirect;
788
field public final int target;
789
field @Nullable public final String triggerUri;
790
field @NonNull public final String uri;
791
}
792
793
public static interface GeckoSession.PermissionDelegate {
794
method @UiThread default public void onAndroidPermissionsRequest(@NonNull GeckoSession, @Nullable String[], @NonNull GeckoSession.PermissionDelegate.Callback);
795
method @UiThread default public void onContentPermissionRequest(@NonNull GeckoSession, @Nullable String, int, @NonNull GeckoSession.PermissionDelegate.Callback);
796
method @UiThread default public void onMediaPermissionRequest(@NonNull GeckoSession, @NonNull String, @Nullable GeckoSession.PermissionDelegate.MediaSource[], @Nullable GeckoSession.PermissionDelegate.MediaSource[], @NonNull GeckoSession.PermissionDelegate.MediaCallback);
797
field public static final int PERMISSION_AUTOPLAY_AUDIBLE = 5;
798
field public static final int PERMISSION_AUTOPLAY_INAUDIBLE = 4;
799
field public static final int PERMISSION_DESKTOP_NOTIFICATION = 1;
800
field public static final int PERMISSION_GEOLOCATION = 0;
801
field public static final int PERMISSION_MEDIA_KEY_SYSTEM_ACCESS = 6;
802
field public static final int PERMISSION_PERSISTENT_STORAGE = 2;
803
field public static final int PERMISSION_XR = 3;
804
}
805
806
public static interface GeckoSession.PermissionDelegate.Callback {
807
method @UiThread default public void grant();
808
method @UiThread default public void reject();
809
}
810
811
public static interface GeckoSession.PermissionDelegate.MediaCallback {
812
method @UiThread default public void grant(@Nullable String, @Nullable String);
813
method @UiThread default public void grant(@Nullable GeckoSession.PermissionDelegate.MediaSource, @Nullable GeckoSession.PermissionDelegate.MediaSource);
814
method @UiThread default public void reject();
815
}
816
817
public static class GeckoSession.PermissionDelegate.MediaSource {
818
ctor protected MediaSource();
819
field public static final int SOURCE_AUDIOCAPTURE = 3;
820
field public static final int SOURCE_CAMERA = 0;
821
field public static final int SOURCE_MICROPHONE = 2;
822
field public static final int SOURCE_OTHER = 4;
823
field public static final int SOURCE_SCREEN = 1;
824
field public static final int TYPE_AUDIO = 1;
825
field public static final int TYPE_VIDEO = 0;
826
field @NonNull public final String id;
827
field @Nullable public final String name;
828
field @NonNull public final String rawId;
829
field public final int source;
830
field public final int type;
831
}
832
833
public static interface GeckoSession.ProgressDelegate {
834
method @UiThread default public void onPageStart(@NonNull GeckoSession, @NonNull String);
835
method @UiThread default public void onPageStop(@NonNull GeckoSession, boolean);
836
method @UiThread default public void onProgressChange(@NonNull GeckoSession, int);
837
method @UiThread default public void onSecurityChange(@NonNull GeckoSession, @NonNull GeckoSession.ProgressDelegate.SecurityInformation);
838
method @UiThread default public void onSessionStateChange(@NonNull GeckoSession, @NonNull GeckoSession.SessionState);
839
}
840
841
public static class GeckoSession.ProgressDelegate.SecurityInformation {
842
ctor protected SecurityInformation();
843
field public static final int CONTENT_BLOCKED = 1;
844
field public static final int CONTENT_LOADED = 2;
845
field public static final int CONTENT_UNKNOWN = 0;
846
field public static final int SECURITY_MODE_IDENTIFIED = 1;
847
field public static final int SECURITY_MODE_UNKNOWN = 0;
848
field public static final int SECURITY_MODE_VERIFIED = 2;
849
field @Nullable public final X509Certificate certificate;
850
field @NonNull public final String host;
851
field public final boolean isException;
852
field public final boolean isSecure;
853
field public final int mixedModeActive;
854
field public final int mixedModePassive;
855
field @Nullable public final String origin;
856
field public final int securityMode;
857
}
858
859
public static interface GeckoSession.PromptDelegate {
860
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAlertPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AlertPrompt);
861
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAuthPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.AuthPrompt);
862
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onButtonPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ButtonPrompt);
863
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onChoicePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ChoicePrompt);
864
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onColorPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.ColorPrompt);
865
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onDateTimePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.DateTimePrompt);
866
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onFilePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.FilePrompt);
867
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onLoginStoragePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.LoginStoragePrompt);
868
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onPopupPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.PopupPrompt);
869
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onSharePrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.SharePrompt);
870
method @UiThread @Nullable default public GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onTextPrompt(@NonNull GeckoSession, @NonNull GeckoSession.PromptDelegate.TextPrompt);
871
}
872
873
public static class GeckoSession.PromptDelegate.AlertPrompt extends GeckoSession.PromptDelegate.BasePrompt {
874
ctor protected AlertPrompt(@Nullable String, @Nullable String);
875
field @Nullable public final String message;
876
}
877
878
public static class GeckoSession.PromptDelegate.AuthPrompt extends GeckoSession.PromptDelegate.BasePrompt {
879
ctor protected AuthPrompt(@Nullable String, @Nullable String, @NonNull GeckoSession.PromptDelegate.AuthPrompt.AuthOptions);
880
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
881
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String, @NonNull String);
882
field @NonNull public final GeckoSession.PromptDelegate.AuthPrompt.AuthOptions authOptions;
883
field @Nullable public final String message;
884
}
885
886
public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions {
887
ctor protected AuthOptions();
888
field public final int flags;
889
field public final int level;
890
field @Nullable public final String password;
891
field @Nullable public final String uri;
892
field @Nullable public final String username;
893
}
894
895
public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions.Flags {
896
ctor protected Flags();
897
field public static final int CROSS_ORIGIN_SUB_RESOURCE = 32;
898
field public static final int HOST = 1;
899
field public static final int ONLY_PASSWORD = 8;
900
field public static final int PREVIOUS_FAILED = 16;
901
field public static final int PROXY = 2;
902
}
903
904
public static class GeckoSession.PromptDelegate.AuthPrompt.AuthOptions.Level {
905
ctor protected Level();
906
field public static final int NONE = 0;
907
field public static final int PW_ENCRYPTED = 1;
908
field public static final int SECURE = 2;
909
}
910
911
public static class GeckoSession.PromptDelegate.BasePrompt {
912
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse dismiss();
913
method @UiThread public boolean isComplete();
914
method @UiThread @NonNull protected GeckoSession.PromptDelegate.PromptResponse confirm();
915
field @Nullable public final String title;
916
}
917
918
public static class GeckoSession.PromptDelegate.ButtonPrompt extends GeckoSession.PromptDelegate.BasePrompt {
919
ctor protected ButtonPrompt(@Nullable String, @Nullable String);
920
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(int);
921
field @Nullable public final String message;
922
}
923
924
public static class GeckoSession.PromptDelegate.ButtonPrompt.Type {
925
ctor protected Type();
926
field public static final int NEGATIVE = 2;
927
field public static final int POSITIVE = 0;
928
}
929
930
public static class GeckoSession.PromptDelegate.ChoicePrompt extends GeckoSession.PromptDelegate.BasePrompt {
931
ctor protected ChoicePrompt(@Nullable String, @Nullable String, int, @NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[]);
932
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
933
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String[]);
934
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice);
935
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[]);
936
field @NonNull public final GeckoSession.PromptDelegate.ChoicePrompt.Choice[] choices;
937
field @Nullable public final String message;
938
field public final int type;
939
}
940
941
public static class GeckoSession.PromptDelegate.ChoicePrompt.Choice {
942
ctor protected Choice();
943
field public final boolean disabled;
944
field @Nullable public final String icon;
945
field @NonNull public final String id;
946
field @Nullable public final GeckoSession.PromptDelegate.ChoicePrompt.Choice[] items;
947
field @NonNull public final String label;
948
field public final boolean selected;
949
field public final boolean separator;
950
}
951
952
public static class GeckoSession.PromptDelegate.ChoicePrompt.Type {
953
ctor protected Type();
954
field public static final int MENU = 1;
955
field public static final int MULTIPLE = 3;
956
field public static final int SINGLE = 2;
957
}
958
959
public static class GeckoSession.PromptDelegate.ColorPrompt extends GeckoSession.PromptDelegate.BasePrompt {
960
ctor protected ColorPrompt(@Nullable String, @Nullable String);
961
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
962
field @Nullable public final String defaultValue;
963
}
964
965
public static class GeckoSession.PromptDelegate.DateTimePrompt extends GeckoSession.PromptDelegate.BasePrompt {
966
ctor protected DateTimePrompt(@Nullable String, int, @Nullable String, @Nullable String, @Nullable String);
967
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
968
field @Nullable public final String defaultValue;
969
field @Nullable public final String maxValue;
970
field @Nullable public final String minValue;
971
field public final int type;
972
}
973
974
public static class GeckoSession.PromptDelegate.DateTimePrompt.Type {
975
ctor protected Type();
976
field public static final int DATE = 1;
977
field public static final int DATETIME_LOCAL = 5;
978
field public static final int MONTH = 2;
979
field public static final int TIME = 4;
980
field public static final int WEEK = 3;
981
}
982
983
public static class GeckoSession.PromptDelegate.FilePrompt extends GeckoSession.PromptDelegate.BasePrompt {
984
ctor protected FilePrompt(@Nullable String, int, int, @Nullable String[]);
985
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context, @NonNull Uri);
986
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull Context, @NonNull Uri[]);
987
field public final int capture;
988
field @Nullable public final String[] mimeTypes;
989
field public final int type;
990
}
991
992
public static class GeckoSession.PromptDelegate.FilePrompt.Capture {
993
ctor protected Capture();
994
field public static final int ANY = 1;
995
field public static final int ENVIRONMENT = 3;
996
field public static final int NONE = 0;
997
field public static final int USER = 2;
998
}
999
1000
public static class GeckoSession.PromptDelegate.FilePrompt.Type {
1001
ctor protected Type();
1002
field public static final int MULTIPLE = 2;
1003
field public static final int SINGLE = 1;
1004
}
1005
1006
public static class GeckoSession.PromptDelegate.LoginStoragePrompt extends GeckoSession.PromptDelegate.BasePrompt {
1007
ctor protected LoginStoragePrompt(int, int, @NonNull LoginStorage.LoginEntry[]);
1008
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull LoginStorage.LoginEntry);
1009
field public final int hint;
1010
field @NonNull public final LoginStorage.LoginEntry[] logins;
1011
field public final int type;
1012
}
1013
1014
public static class GeckoSession.PromptDelegate.LoginStoragePrompt.Hint {
1015
ctor protected Hint();
1016
field public static final int NONE = 0;
1017
}
1018
1019
public static class GeckoSession.PromptDelegate.LoginStoragePrompt.Type {
1020
ctor protected Type();
1021
field public static final int SAVE = 1;
1022
}
1023
1024
public static class GeckoSession.PromptDelegate.PopupPrompt extends GeckoSession.PromptDelegate.BasePrompt {
1025
ctor protected PopupPrompt(@Nullable String);
1026
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull AllowOrDeny);
1027
field @Nullable public final String targetUri;
1028
}
1029
1030
public static class GeckoSession.PromptDelegate.PromptResponse {
1031
}
1032
1033
public static class GeckoSession.PromptDelegate.SharePrompt extends GeckoSession.PromptDelegate.BasePrompt {
1034
ctor protected SharePrompt(@Nullable String, @Nullable String, @Nullable String);
1035
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(int);
1036
field @Nullable public final String text;
1037
field @Nullable public final String uri;
1038
}
1039
1040
public static class GeckoSession.PromptDelegate.SharePrompt.Result {
1041
ctor protected Result();
1042
field public static final int ABORT = 2;
1043
field public static final int FAILURE = 1;
1044
field public static final int SUCCESS = 0;
1045
}
1046
1047
public static class GeckoSession.PromptDelegate.TextPrompt extends GeckoSession.PromptDelegate.BasePrompt {
1048
ctor protected TextPrompt(@Nullable String, @Nullable String, @Nullable String);
1049
method @UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String);
1050
field @Nullable public final String defaultValue;
1051
field @Nullable public final String message;
1052
}
1053
1054
public static interface GeckoSession.ScrollDelegate {
1055
method @UiThread default public void onScrollChanged(@NonNull GeckoSession, int, int);
1056
}
1057
1058
public static interface GeckoSession.SelectionActionDelegate {
1059
method @UiThread default public void onHideAction(@NonNull GeckoSession, int);
1060
method @UiThread default public void onShowActionRequest(@NonNull GeckoSession, @NonNull GeckoSession.SelectionActionDelegate.Selection);
1061
field public static final String ACTION_COLLAPSE_TO_END = "org.mozilla.geckoview.COLLAPSE_TO_END";
1062
field public static final String ACTION_COLLAPSE_TO_START = "org.mozilla.geckoview.COLLAPSE_TO_START";
1063
field public static final String ACTION_COPY = "org.mozilla.geckoview.COPY";
1064
field public static final String ACTION_CUT = "org.mozilla.geckoview.CUT";
1065
field public static final String ACTION_DELETE = "org.mozilla.geckoview.DELETE";
1066
field public static final String ACTION_HIDE = "org.mozilla.geckoview.HIDE";
1067
field public static final String ACTION_PASTE = "org.mozilla.geckoview.PASTE";
1068
field public static final String ACTION_SELECT_ALL = "org.mozilla.geckoview.SELECT_ALL";
1069
field public static final String ACTION_UNSELECT = "org.mozilla.geckoview.UNSELECT";
1070
field public static final int FLAG_IS_COLLAPSED = 1;
1071
field public static final int FLAG_IS_EDITABLE = 2;
1072
field public static final int FLAG_IS_PASSWORD = 4;
1073
field public static final int HIDE_REASON_ACTIVE_SCROLL = 3;
1074
field public static final int HIDE_REASON_ACTIVE_SELECTION = 2;
1075
field public static final int HIDE_REASON_INVISIBLE_SELECTION = 1;
1076
field public static final int HIDE_REASON_NO_SELECTION = 0;
1077
}
1078
1079
public static class GeckoSession.SelectionActionDelegate.Selection {
1080
ctor protected Selection();
1081
method @AnyThread public void collapseToEnd();
1082
method @AnyThread public void collapseToStart();
1083
method @AnyThread public void copy();
1084
method @AnyThread public void cut();
1085
method @AnyThread public void delete();
1086
method @AnyThread public void execute(@NonNull String);
1087
method @AnyThread public void hide();
1088
method @AnyThread public boolean isActionAvailable(@NonNull String);
1089
method @AnyThread public void paste();
1090
method @AnyThread public void selectAll();
1091
method @AnyThread public void unselect();
1092
field @NonNull public final Collection<String> availableActions;
1093
field @Nullable public final RectF clientRect;
1094
field public final int flags;
1095
field @NonNull public final String text;
1096
}
1097
1098
@AnyThread public static class GeckoSession.SessionState extends AbstractSequentialList implements GeckoSession.HistoryDelegate.HistoryList Parcelable {
1099
ctor public SessionState(@NonNull GeckoSession.SessionState);
1100
method @NonNull public static GeckoSession.SessionState fromString(@NonNull String);
1101
method public void readFromParcel(@NonNull Parcel);
1102
field public static final Parcelable.Creator<GeckoSession.SessionState> CREATOR;
1103
}
1104
1105
public static interface GeckoSession.TextInputDelegate {
1106
method @UiThread default public void hideSoftInput(@NonNull GeckoSession);
1107
method @UiThread default public void restartInput(@NonNull GeckoSession, int);
1108
method @UiThread default public void showSoftInput(@NonNull GeckoSession);
1109
method @UiThread default public void updateCursorAnchorInfo(@NonNull GeckoSession, @NonNull CursorAnchorInfo);
1110
method @UiThread default public void updateExtractedText(@NonNull GeckoSession, @NonNull ExtractedTextRequest, @NonNull ExtractedText);
1111
method @UiThread default public void updateSelection(@NonNull GeckoSession, int, int, int, int);
1112
field public static final int RESTART_REASON_BLUR = 1;
1113
field public static final int RESTART_REASON_CONTENT_CHANGE = 2;
1114
field public static final int RESTART_REASON_FOCUS = 0;
1115
}
1116
1117
@AnyThread public static class GeckoSession.WebResponseInfo {
1118
ctor protected WebResponseInfo();
1119
field @Nullable public final long contentLength;
1120
field @Nullable public final String contentType;
1121
field @Nullable public final String filename;
1122
field @NonNull public final String uri;
1123
}
1124
1125
@AnyThread public final class GeckoSessionSettings implements Parcelable {
1126
ctor public GeckoSessionSettings();
1127
ctor public GeckoSessionSettings(@NonNull GeckoSessionSettings);
1128
method public boolean getAllowJavascript();
1129
method @Nullable public String getChromeUri();
1130
method @Nullable public String getContextId();
1131
method public int getDisplayMode();
1132
method public boolean getFullAccessibilityTree();
1133
method public int getScreenId();
1134
method public boolean getSuspendMediaWhenInactive();
1135
method public boolean getUsePrivateMode();
1136
method public boolean getUseTrackingProtection();
1137
method public int getUserAgentMode();
1138
method @Nullable public String getUserAgentOverride();
1139
method public int getViewportMode();
1140
method public void readFromParcel(@NonNull Parcel);
1141
method public void setAllowJavascript(boolean);
1142
method public void setDisplayMode(int);
1143
method public void setFullAccessibilityTree(boolean);
1144
method public void setSuspendMediaWhenInactive(boolean);
1145
method public void setUseTrackingProtection(boolean);
1146
method public void setUserAgentMode(int);
1147
method public void setUserAgentOverride(@Nullable String);
1148
method public void setViewportMode(int);
1149
field public static final Parcelable.Creator<GeckoSessionSettings> CREATOR;
1150
field public static final int DISPLAY_MODE_BROWSER = 0;
1151
field public static final int DISPLAY_MODE_FULLSCREEN = 3;
1152
field public static final int DISPLAY_MODE_MINIMAL_UI = 1;
1153
field public static final int DISPLAY_MODE_STANDALONE = 2;
1154
field public static final int USER_AGENT_MODE_DESKTOP = 1;
1155
field public static final int USER_AGENT_MODE_MOBILE = 0;
1156
field public static final int USER_AGENT_MODE_VR = 2;
1157
field public static final int VIEWPORT_MODE_DESKTOP = 1;
1158
field public static final int VIEWPORT_MODE_MOBILE = 0;
1159
}
1160
1161
@AnyThread public static final class GeckoSessionSettings.Builder {
1162
ctor public Builder();
1163
ctor public Builder(GeckoSessionSettings);
1164
method @NonNull public GeckoSessionSettings.Builder allowJavascript(boolean);
1165
method @NonNull public GeckoSessionSettings build();
1166
method @NonNull public GeckoSessionSettings.Builder chromeUri(@NonNull String);
1167
method @NonNull public GeckoSessionSettings.Builder contextId(@Nullable String);
1168
method @NonNull public GeckoSessionSettings.Builder displayMode(int);
1169
method @NonNull public GeckoSessionSettings.Builder fullAccessibilityTree(boolean);
1170
method @NonNull public GeckoSessionSettings.Builder screenId(int);
1171
method @NonNull public GeckoSessionSettings.Builder suspendMediaWhenInactive(boolean);
1172
method @NonNull public GeckoSessionSettings.Builder usePrivateMode(boolean);
1173
method @NonNull public GeckoSessionSettings.Builder useTrackingProtection(boolean);
1174
method @NonNull public GeckoSessionSettings.Builder userAgentMode(int);
1175
method @NonNull public GeckoSessionSettings.Builder userAgentOverride(@NonNull String);
1176
method @NonNull public GeckoSessionSettings.Builder viewportMode(int);
1177
}
1178
1179
public static class GeckoSessionSettings.Key<T> {
1180
}
1181
1182
public class GeckoVRManager {
1183
method @AnyThread public static synchronized void setExternalContext(long);
1184
}
1185
1186
@UiThread public class GeckoView extends FrameLayout {
1187
ctor public GeckoView(Context);
1188
ctor public GeckoView(Context, AttributeSet);
1189
method @UiThread @NonNull public GeckoResult<Bitmap> capturePixels();
1190
method public void coverUntilFirstPaint(int);
1191
method public boolean getAutofillEnabled();
1192
method @NonNull public DynamicToolbarAnimator getDynamicToolbarAnimator();
1193
method @NonNull public PanZoomController getPanZoomController();
1194
method @AnyThread @Nullable public GeckoSession getSession();
1195
method public int onGenericMotionEventForResult(@NonNull MotionEvent);
1196
method public int onTouchEventForResult(@NonNull MotionEvent);
1197
method @UiThread @Nullable public GeckoSession releaseSession();
1198
method public void setAutofillEnabled(boolean);
1199
method public void setDynamicToolbarMaxHeight(int);
1200
method @UiThread public void setSession(@NonNull GeckoSession);
1201
method public void setVerticalClipping(int);
1202
method public void setViewBackend(int);
1203
method public boolean shouldPinOnScreen();
1204
field public static final int BACKEND_SURFACE_VIEW = 1;
1205
field public static final int BACKEND_TEXTURE_VIEW = 2;
1206
field @NonNull protected final GeckoView.Display mDisplay;
1207
field @Nullable protected GeckoSession mSession;
1208
}
1209
1210
@AnyThread public class GeckoWebExecutor {
1211
ctor public GeckoWebExecutor(@NonNull GeckoRuntime);
1212
method @NonNull public GeckoResult<WebResponse> fetch(@NonNull WebRequest);
1213
method @NonNull public GeckoResult<WebResponse> fetch(@NonNull WebRequest, int);
1214
method @NonNull public GeckoResult<InetAddress[]> resolve(@NonNull String);
1215
method public void speculativeConnect(@NonNull String);
1216
field public static final int FETCH_FLAGS_ANONYMOUS = 1;
1217
field public static final int FETCH_FLAGS_NONE = 0;
1218
field public static final int FETCH_FLAGS_NO_REDIRECTS = 2;
1219
field public static final int FETCH_FLAGS_STREAM_FAILURE_TEST = 1024;
1220
}
1221
1222
public class LoginStorage {
1223
ctor public LoginStorage();
1224
}
1225
1226
public static interface LoginStorage.Delegate {
1227
method @UiThread @Nullable default public GeckoResult<LoginStorage.LoginEntry[]> onLoginFetch(@NonNull String);
1228
method @UiThread default public void onLoginSave(@NonNull LoginStorage.LoginEntry);
1229
method @UiThread default public void onLoginUsed(@NonNull LoginStorage.LoginEntry, int);
1230
}
1231
1232
public static class LoginStorage.LoginEntry {
1233
ctor @AnyThread protected LoginEntry();
1234
field @Nullable public final String formActionOrigin;
1235
field @Nullable public final String guid;
1236
field @Nullable public final String httpRealm;
1237
field @NonNull public final String origin;
1238
field @NonNull public final String password;
1239
field @NonNull public final String username;
1240
}
1241
1242
public static class LoginStorage.LoginEntry.Builder {
1243
ctor @AnyThread public Builder();
1244
method @AnyThread @NonNull public LoginStorage.LoginEntry build();
1245
method @AnyThread @NonNull public LoginStorage.LoginEntry.Builder formActionOrigin(@Nullable String);
1246
method @AnyThread @NonNull public LoginStorage.LoginEntry.Builder guid(@Nullable String);
1247
method @AnyThread @NonNull public LoginStorage.LoginEntry.Builder httpRealm(@Nullable String);
1248
method @AnyThread @NonNull public LoginStorage.LoginEntry.Builder origin(@NonNull String);
1249
method @AnyThread @NonNull public LoginStorage.LoginEntry.Builder password(@NonNull String);
1250
method @AnyThread @NonNull public LoginStorage.LoginEntry.Builder username(@NonNull String);
1251
}
1252
1253
public static class LoginStorage.UsedField {
1254
ctor public UsedField();
1255
field public static final int PASSWORD = 1;
1256
}
1257
1258
@AnyThread public class MediaElement {
1259
method @Nullable public MediaElement.Delegate getDelegate();
1260
method public void pause();
1261
method public void play();
1262
method public void seek(double);
1263
method public void setDelegate(@Nullable MediaElement.Delegate);
1264
method public void setMuted(boolean);
1265
method public void setPlaybackRate(double);
1266
method public void setVolume(double);
1267
field public static final int MEDIA_ERROR_ABORTED = 1;
1268
field public static final int MEDIA_ERROR_DECODE = 3;
1269
field public static final int MEDIA_ERROR_NETWORK = 2;
1270
field public static final int MEDIA_ERROR_NETWORK_NO_SOURCE = 0;
1271
field public static final int MEDIA_ERROR_SRC_NOT_SUPPORTED = 4;
1272
field public static final int MEDIA_READY_STATE_HAVE_CURRENT_DATA = 2;
1273
field public static final int MEDIA_READY_STATE_HAVE_ENOUGH_DATA = 4;
1274
field public static final int MEDIA_READY_STATE_HAVE_FUTURE_DATA = 3;
1275
field public static final int MEDIA_READY_STATE_HAVE_METADATA = 1;
1276
field public static final int MEDIA_READY_STATE_HAVE_NOTHING = 0;
1277
field public static final int MEDIA_STATE_ABORT = 9;
1278
field public static final int MEDIA_STATE_EMPTIED = 10;
1279
field public static final int MEDIA_STATE_ENDED = 3;
1280
field public static final int MEDIA_STATE_PAUSE = 2;
1281
field public static final int MEDIA_STATE_PLAY = 0;
1282
field public static final int MEDIA_STATE_PLAYING = 1;
1283
field public static final int MEDIA_STATE_SEEKED = 5;
1284
field public static final int MEDIA_STATE_SEEKING = 4;
1285
field public static final int MEDIA_STATE_STALLED = 6;
1286
field public static final int MEDIA_STATE_SUSPEND = 7;
1287
field public static final int MEDIA_STATE_WAITING = 8;
1288
field @Nullable protected MediaElement.Delegate mDelegate;
1289
field @NonNull protected final GeckoSession mSession;
1290
field protected final long mVideoId;
1291
}
1292
1293
public static interface MediaElement.Delegate {
1294
method @UiThread default public void onError(@NonNull MediaElement, int);
1295
method @UiThread default public void onFullscreenChange(@NonNull MediaElement, boolean);
1296
method @UiThread default public void onLoadProgress(@NonNull MediaElement, @NonNull MediaElement.LoadProgressInfo);
1297
method @UiThread default public void onMetadataChange(@NonNull MediaElement, @NonNull MediaElement.Metadata);
1298
method @UiThread default public void onPlaybackRateChange(@NonNull MediaElement, double);
1299
method @UiThread default public void onPlaybackStateChange(@NonNull MediaElement, int);
1300
method @UiThread default public void onReadyStateChange(@NonNull MediaElement, int);
1301
method @UiThread default public void onTimeChange(@NonNull MediaElement, double);
1302
method @UiThread default public void onVolumeChange(@NonNull MediaElement, double, boolean);
1303
}
1304
1305
public static class MediaElement.LoadProgressInfo {
1306
ctor protected LoadProgressInfo();
1307
field @Nullable public final MediaElement.LoadProgressInfo.TimeRange[] buffered;
1308
field public final long loadedBytes;
1309
field public final long totalBytes;
1310
}
1311
1312
public class MediaElement.LoadProgressInfo.TimeRange {
1313
ctor protected TimeRange(double, double);
1314
field public final double end;
1315
field public final double start;
1316
}
1317
1318
public static class MediaElement.Metadata {
1319
ctor protected Metadata();
1320
field public final int audioTrackCount;
1321
field @Nullable public final String currentSource;
1322
field public final double duration;
1323
field public final long height;
1324
field public final boolean isSeekable;
1325
field public final int videoTrackCount;
1326
field public final long width;
1327
}
1328
1329
@UiThread public final class OverscrollEdgeEffect {
1330
method public void draw(@NonNull Canvas);
1331
method @Nullable public Runnable getInvalidationCallback();
1332
method public void setInvalidationCallback(@Nullable Runnable);
1333
method public void setTheme(@NonNull Context);
1334
}
1335
1336
@UiThread public class PanZoomController {
1337
ctor protected PanZoomController(GeckoSession);
1338
method public float getScrollFactor();
1339
method public int onMotionEvent(@NonNull MotionEvent);
1340
method public int onMouseEvent(@NonNull MotionEvent);
1341
method public int onTouchEvent(@NonNull MotionEvent);
1342
method @UiThread public void scrollBy(@NonNull ScreenLength, @NonNull ScreenLength);
1343
method @UiThread public void scrollBy(@NonNull ScreenLength, @NonNull ScreenLength, int);
1344
method @UiThread public void scrollTo(@NonNull ScreenLength, @NonNull ScreenLength);
1345
method @UiThread public void scrollTo(@NonNull ScreenLength, @NonNull ScreenLength, int);
1346
method @UiThread public void scrollToBottom();
1347
method @UiThread public void scrollToTop();
1348
method public void setIsLongpressEnabled(boolean);
1349
method public void setScrollFactor(float);
1350
field public static final int INPUT_RESULT_HANDLED = 1;
1351
field public static final int INPUT_RESULT_HANDLED_CONTENT = 2;
1352
field public static final int INPUT_RESULT_UNHANDLED = 0;
1353
field public static final int SCROLL_BEHAVIOR_AUTO = 1;
1354
field public static final int SCROLL_BEHAVIOR_SMOOTH = 0;
1355
}
1356
1357
public abstract class RuntimeSettings implements Parcelable {
1358
ctor protected RuntimeSettings();
1359
ctor protected RuntimeSettings(@Nullable RuntimeSettings);
1360
method @AnyThread public void readFromParcel(@NonNull Parcel);
1361
method @AnyThread protected void updatePrefs(@NonNull RuntimeSettings);
1362
}
1363
1364
public abstract static class RuntimeSettings.Builder<Settings extends RuntimeSettings> {
1365
ctor public Builder();
1366
method @AnyThread @NonNull public Settings build();
1367
method @AnyThread @NonNull protected Settings getSettings();
1368
method @AnyThread @NonNull protected abstract Settings newSettings(@Nullable Settings);
1369
}
1370
1371
public final class RuntimeTelemetry {
1372
method @Deprecated @AnyThread @NonNull public GeckoResult<JSONObject> getSnapshots(boolean);
1373
}
1374
1375
public static interface RuntimeTelemetry.Delegate {
1376
method @AnyThread default public void onBooleanScalar(@NonNull RuntimeTelemetry.Metric<Boolean>);
1377
method @AnyThread default public void onHistogram(@NonNull RuntimeTelemetry.Histogram);
1378
method @AnyThread default public void onLongScalar(@NonNull RuntimeTelemetry.Metric<Long>);
1379
method @AnyThread default public void onStringScalar(@NonNull RuntimeTelemetry.Metric<String>);
1380
}
1381
1382
public static class RuntimeTelemetry.Histogram extends RuntimeTelemetry.Metric {
1383
ctor protected Histogram();
1384
field public final boolean isCategorical;
1385
}
1386
1387
public static class RuntimeTelemetry.Metric<T> {
1388
ctor protected Metric();
1389
field @NonNull public final String name;
1390
field @NonNull public final T value;
1391
}
1392
1393
public class ScreenLength {
1394
method @NonNull @AnyThread public static ScreenLength bottom();
1395
method @NonNull @AnyThread public static ScreenLength fromPixels(double);
1396
method @NonNull @AnyThread public static ScreenLength fromVisualViewportHeight(double);
1397
method @NonNull @AnyThread public static ScreenLength fromVisualViewportWidth(double);
1398
method @AnyThread public int getType();
1399
method @AnyThread public double getValue();
1400
method @NonNull @AnyThread public static ScreenLength top();
1401
method @NonNull @AnyThread public static ScreenLength zero();
1402
field public static final int DOCUMENT_HEIGHT = 4;
1403
field public static final int DOCUMENT_WIDTH = 3;
1404
field public static final int PIXEL = 0;
1405
field public static final int VISUAL_VIEWPORT_HEIGHT = 2;
1406
field public static final int VISUAL_VIEWPORT_WIDTH = 1;
1407
}
1408
1409
@UiThread public class SessionAccessibility {
1410
method @Nullable public View getView();
1411
method public boolean onMotionEvent(@NonNull MotionEvent);
1412
method @UiThread public void setView(@Nullable View);
1413
}
1414
1415
@AnyThread public final class SessionFinder {
1416
method public void clear();
1417
method @NonNull public GeckoResult<GeckoSession.FinderResult> find(@Nullable String, int);
1418
method public int getDisplayFlags();
1419
method public void setDisplayFlags(int);
1420
}
1421
1422
public final class SessionTextInput {
1423
method @UiThread @NonNull public GeckoSession.TextInputDelegate getDelegate();
1424
method @AnyThread @NonNull public synchronized Handler getHandler(@NonNull Handler);
1425
method @UiThread @Nullable public View getView();
1426
method @AnyThread @Nullable public synchronized InputConnection onCreateInputConnection(@NonNull EditorInfo);
1427
method @UiThread public boolean onKeyDown(int, @NonNull KeyEvent);
1428
method @UiThread public boolean onKeyLongPress(int, @NonNull KeyEvent);
1429
method @UiThread public boolean onKeyMultiple(int, int, @NonNull KeyEvent);
1430
method @UiThread public boolean onKeyPreIme(int, @NonNull KeyEvent);
1431
method @UiThread public boolean onKeyUp(int, @NonNull KeyEvent);
1432
method @UiThread public void setDelegate(@Nullable GeckoSession.TextInputDelegate);
1433
method @UiThread public synchronized void setView(@Nullable View);
1434
}
1435
1436
@AnyThread public final enum SlowScriptResponse {
1437
method public static SlowScriptResponse valueOf(String);
1438
method public static SlowScriptResponse[] values();
1439
enum_constant public static final SlowScriptResponse CONTINUE;
1440
enum_constant public static final SlowScriptResponse STOP;
1441
}
1442
1443
public final class StorageController {
1444
ctor public StorageController();
1445
method @AnyThread @NonNull public GeckoResult<Void> clearData(long);
1446
method @AnyThread public void clearDataForSessionContext(@NonNull String);
1447
method @AnyThread @NonNull public GeckoResult<Void> clearDataFromHost(@NonNull String, long);
1448
}
1449
1450
public static class StorageController.ClearFlags {
1451
ctor public ClearFlags();
1452
field public static final long ALL = 512L;
1453
field public static final long ALL_CACHES = 6L;
1454
field public static final long AUTH_SESSIONS = 32L;
1455
field public static final long COOKIES = 1L;
1456
field public static final long DOM_STORAGES = 16L;
1457
field public static final long IMAGE_CACHE = 4L;
1458
field public static final long NETWORK_CACHE = 2L;
1459
field public static final long PERMISSIONS = 64L;
1460
field public static final long SITE_DATA = 471L;
1461
field public static final long SITE_SETTINGS = 192L;
1462
}
1463
1464
public class WebExtension {
1465
ctor public WebExtension(@NonNull String, @NonNull String, long, @NonNull WebExtensionController);
1466
ctor public WebExtension(@NonNull String, @NonNull WebExtensionController);
1467
method @UiThread @Nullable public WebExtension.TabDelegate getTabDelegate();
1468
method @AnyThread public void setActionDelegate(@Nullable WebExtension.ActionDelegate);
1469
method @UiThread public void setMessageDelegate(@Nullable WebExtension.MessageDelegate, @NonNull String);
1470
method @UiThread public void setTabDelegate(@Nullable WebExtension.TabDelegate);
1471
field public final long flags;
1472
field @NonNull public final String id;
1473
field @NonNull public final String location;
1474
field @Nullable public final WebExtension.MetaData metaData;
1475
}
1476
1477
@AnyThread public static class WebExtension.Action {
1478
ctor protected Action();
1479
method @UiThread public void click();
1480
method @NonNull public WebExtension.Action withDefault(@NonNull WebExtension.Action);
1481
field @Nullable public final Integer badgeBackgroundColor;
1482
field @Nullable public final String badgeText;
1483
field @Nullable public final Integer badgeTextColor;
1484
field @Nullable public final Boolean enabled;
1485
field @Nullable public final WebExtension.Icon icon;
1486
field @Nullable public final String title;
1487
}
1488
1489
public static interface WebExtension.ActionDelegate {
1490
method @UiThread default public void onBrowserAction(@NonNull WebExtension, @Nullable GeckoSession, @NonNull WebExtension.Action);
1491
method @UiThread @Nullable default public GeckoResult<GeckoSession> onOpenPopup(@NonNull WebExtension, @NonNull WebExtension.Action);
1492
method @UiThread default public void onPageAction(@NonNull WebExtension, @Nullable GeckoSession, @NonNull WebExtension.Action);
1493
method @UiThread @Nullable default public GeckoResult<GeckoSession> onTogglePopup(@NonNull WebExtension, @NonNull WebExtension.Action);
1494
}
1495
1496
public static class WebExtension.BlocklistStateFlags {
1497
ctor public BlocklistStateFlags();
1498
field public static final int BLOCKED = 2;
1499
field public static final int NOT_BLOCKED = 0;
1500
field public static final int OUTDATED = 3;
1501
field public static final int SOFTBLOCKED = 1;
1502
field public static final int VULNERABLE_NO_UPDATE = 5;
1503
field public static final int VULNERABLE_UPDATE_AVAILABLE = 4;
1504
}
1505
1506
public static class WebExtension.CreateTabDetails {
1507
ctor protected CreateTabDetails();
1508
field @Nullable public final Boolean active;
1509
field @Nullable public final Boolean discarded;
1510
field @Nullable public final Integer index;
1511
field @Nullable public final Boolean openInReaderMode;
1512
field @Nullable public final Boolean pinned;
1513
field @Nullable public final String url;
1514
}
1515
1516
public static class WebExtension.DisabledFlags {
1517
ctor public DisabledFlags();
1518
field public static final int APP = 8;
1519
field public static final int BLOCKLIST = 4;
1520
field public static final int USER = 2;
1521
}
1522
1523
public static class WebExtension.Flags {
1524
ctor protected Flags();
1525
field public static final long ALLOW_CONTENT_MESSAGING = 1L;
1526
field public static final long NONE = 0L;
1527
}
1528
1529
public static class WebExtension.Icon {
1530
ctor protected Icon();
1531
method @AnyThread @NonNull public GeckoResult<Bitmap> get(int);
1532
}
1533
1534
public static class WebExtension.InstallException extends Exception {
1535
ctor protected InstallException();
1536
field public final int code;
1537
}
1538
1539
public static class WebExtension.InstallException.ErrorCodes {
1540
ctor protected ErrorCodes();
1541
field public static final int ERROR_CORRUPT_FILE = -3;
1542
field public static final int ERROR_FILE_ACCESS = -4;
1543
field public static final int ERROR_INCORRECT_HASH = -2;
1544
field public static final int ERROR_INCORRECT_ID = -7;
1545
field public static final int ERROR_NETWORK_FAILURE = -1;
1546
field public static final int ERROR_POSTPONED = -101;
1547
field public static final int ERROR_SIGNEDSTATE_REQUIRED = -5;
1548
field public static final int ERROR_UNEXPECTED_ADDON_TYPE = -6;
1549
field public static final int ERROR_USER_CANCELED = -100;
1550
}
1551
1552
@UiThread public static interface WebExtension.MessageDelegate {
1553
method @Nullable default public void onConnect(@NonNull WebExtension.Port);
1554
method @Nullable default public GeckoResult<Object> onMessage(@NonNull String, @NonNull Object, @NonNull WebExtension.MessageSender);
1555
}
1556
1557
@UiThread public static class WebExtension.MessageSender {
1558
ctor protected MessageSender();
1559
method public boolean isTopLevel();
1560
field public static final int ENV_TYPE_CONTENT_SCRIPT = 2;
1561
field public static final int ENV_TYPE_EXTENSION = 1;
1562
field public final int environmentType;
1563
field @Nullable public final GeckoSession session;
1564
field @NonNull public final String url;
1565
field @NonNull public final WebExtension webExtension;
1566
}
1567
1568
public class WebExtension.MetaData {
1569
ctor protected MetaData();
1570
field public final boolean allowedInPrivateBrowsing;
1571
field @NonNull public final String baseUrl;
1572
field public final int blocklistState;
1573
field @Nullable public final String creatorName;
1574
field @Nullable public final String creatorUrl;
1575
field @Nullable public final String description;
1576
field public final int disabledFlags;
1577
field public final boolean enabled;
1578
field @Nullable public final String homepageUrl;
1579
field @NonNull public final WebExtension.Icon icon;
1580
field public final boolean isRecommended;
1581
field @Nullable public final String name;
1582
field public final boolean openOptionsPageInTab;
1583
field @Nullable public final String optionsPageUrl;
1584
field @NonNull public final String[] origins;
1585
field @NonNull public final String[] permissions;
1586
field public final int signedState;
1587
field @NonNull public final String version;
1588
}
1589
1590
@UiThread public static class WebExtension.Port {
1591
ctor protected Port();
1592
method public void disconnect();
1593
method public void postMessage(@NonNull JSONObject);
1594
method public void setDelegate(@Nullable WebExtension.PortDelegate);
1595
field @NonNull public final String name;
1596
field @NonNull public final WebExtension.MessageSender sender;
1597
}
1598
1599
@UiThread public static interface WebExtension.PortDelegate {
1600
method @NonNull default public void onDisconnect(@NonNull WebExtension.Port);
1601
method default public void onPortMessage(@NonNull Object, @NonNull WebExtension.Port);
1602
}
1603
1604
public static class WebExtension.SessionController {
1605
method @AnyThread @Nullable public WebExtension.ActionDelegate getActionDelegate(@NonNull WebExtension);
1606
method @AnyThread @Nullable public WebExtension.MessageDelegate getMessageDelegate(@NonNull WebExtension, @NonNull String);
1607
method @AnyThread @Nullable public WebExtension.SessionTabDelegate getTabDelegate(@NonNull WebExtension);
1608
method @AnyThread public void setActionDelegate(@NonNull WebExtension, @Nullable WebExtension.ActionDelegate);
1609
method @AnyThread public void setMessageDelegate(@NonNull WebExtension, @Nullable WebExtension.MessageDelegate, @NonNull String);
1610
method @AnyThread public void setTabDelegate(@NonNull WebExtension, @Nullable WebExtension.SessionTabDelegate);
1611
}
1612
1613
public static interface WebExtension.SessionTabDelegate {
1614
method @UiThread @NonNull default public GeckoResult<AllowOrDeny> onCloseTab(@Nullable WebExtension, @NonNull GeckoSession);
1615
method @UiThread @NonNull default public GeckoResult<AllowOrDeny> onUpdateTab(@NonNull WebExtension, @NonNull GeckoSession, @NonNull WebExtension.UpdateTabDetails);
1616
}
1617
1618
public static class WebExtension.SignedStateFlags {
1619
ctor public SignedStateFlags();
1620
field public static final int MISSING = 0;
1621
field public static final int PRELIMINARY = 1;
1622
field public static final int PRIVILEGED = 4;
1623
field public static final int SIGNED = 2;
1624
field public static final int SYSTEM = 3;
1625
field public static final int UNKNOWN = -1;
1626
}
1627
1628
public static interface WebExtension.TabDelegate {
1629
method @UiThread @Nullable default public GeckoResult<GeckoSession> onNewTab(@NonNull WebExtension, @NonNull WebExtension.CreateTabDetails);
1630
}
1631
1632
public static class WebExtension.UpdateTabDetails {
1633
ctor protected UpdateTabDetails();
1634
field @Nullable public final Boolean active;
1635
field @Nullable public final Boolean autoDiscardable;
1636
field @Nullable public final Boolean highlighted;
1637
field @Nullable public final Boolean muted;
1638
field @Nullable public final Boolean pinned;
1639
field @Nullable public final String url;
1640
}
1641
1642
public class WebExtensionController {
1643
method @AnyThread @NonNull public GeckoResult<WebExtension> disable(@NonNull WebExtension, int);
1644
method @AnyThread @NonNull public GeckoResult<WebExtension> enable(@NonNull WebExtension, int);
1645
method @UiThread @Nullable public WebExtensionController.PromptDelegate getPromptDelegate();
1646
method @UiThread @Nullable @Deprecated public WebExtensionController.TabDelegate getTabDelegate();
1647
method @NonNull @AnyThread public GeckoResult<WebExtension> install(@NonNull String);
1648
method @AnyThread @NonNull public GeckoResult<List<WebExtension>> list();
1649
method @NonNull @AnyThread public GeckoResult<WebExtension> setAllowedInPrivateBrowsing(@NonNull WebExtension, boolean);
1650
method @UiThread public void setDebuggerDelegate(@NonNull WebExtensionController.DebuggerDelegate);
1651
method @UiThread public void setPromptDelegate(@Nullable WebExtensionController.PromptDelegate);
1652
method @AnyThread public void setTabActive(@NonNull GeckoSession, boolean);
1653
method @Deprecated @UiThread public void setTabDelegate(@Nullable WebExtensionController.TabDelegate);
1654
method @NonNull @AnyThread public GeckoResult<Void> uninstall(@NonNull WebExtension);
1655
method @AnyThread @NonNull public GeckoResult<WebExtension> update(@NonNull WebExtension);
1656
}
1657
1658
public static interface WebExtensionController.DebuggerDelegate {
1659
method @UiThread default public void onExtensionListUpdated();
1660
}
1661
1662
public static class WebExtensionController.EnableSource {
1663
ctor public EnableSource();
1664
field public static final int APP = 2;
1665
field public static final int USER = 1;
1666
}
1667
1668
@UiThread public static interface WebExtensionController.PromptDelegate {
1669
method @Nullable default public GeckoResult<AllowOrDeny> onInstallPrompt(@NonNull WebExtension);
1670
method @Nullable default public GeckoResult<AllowOrDeny> onUpdatePrompt(@NonNull WebExtension, @NonNull WebExtension, @NonNull String[], @NonNull String[]);
1671
}
1672
1673
@Deprecated public static interface WebExtensionController.TabDelegate {
1674
method @UiThread @NonNull default public GeckoResult<AllowOrDeny> onCloseTab(@Nullable WebExtension, @NonNull GeckoSession);
1675
method @UiThread @Nullable default public GeckoResult<GeckoSession> onNewTab(@Nullable WebExtension, @Nullable String);
1676
}
1677
1678
@AnyThread public abstract class WebMessage {
1679
ctor protected WebMessage(@NonNull WebMessage.Builder);
1680
field @NonNull public final Map<String,String> headers;
1681
field @NonNull public final String uri;
1682
}
1683
1684
@AnyThread public abstract static class WebMessage.Builder {
1685
method @NonNull public WebMessage.Builder addHeader(@NonNull String, @NonNull String);
1686
method @NonNull public WebMessage.Builder header(@NonNull String, @NonNull String);
1687
method @NonNull public WebMessage.Builder uri(@NonNull String);
1688
}
1689
1690
public class WebNotification {
1691
method @UiThread public void click();
1692
method @UiThread public void dismiss();
1693
field @Nullable public final String imageUrl;
1694
field @Nullable public final String lang;
1695
field @NonNull public final boolean requireInteraction;
1696
field @NonNull public final String tag;
1697
field @Nullable public final String text;
1698
field @Nullable public final String textDirection;
1699
field @Nullable public final String title;
1700
}
1701
1702
public interface WebNotificationDelegate {
1703
method @AnyThread default public void onCloseNotification(@NonNull WebNotification);
1704
method @AnyThread default public void onShowNotification(@NonNull WebNotification);
1705
}
1706
1707
public class WebPushController {
1708
method @UiThread public void onPushEvent(@NonNull String);
1709
method @UiThread public void onPushEvent(@NonNull String, @Nullable byte[]);
1710
method @UiThread public void onSubscriptionChanged(@NonNull String);
1711
method @UiThread public void setDelegate(@Nullable WebPushDelegate);
1712
}
1713
1714
public interface WebPushDelegate {
1715
method @UiThread @Nullable default public GeckoResult<WebPushSubscription> onGetSubscription(@NonNull String);
1716
method @UiThread @Nullable default public GeckoResult<WebPushSubscription> onSubscribe(@NonNull String, @Nullable byte[]);
1717
method @UiThread @Nullable default public GeckoResult<Void> onUnsubscribe(@NonNull String);
1718
}
1719
1720
public class WebPushSubscription implements Parcelable {
1721
ctor public WebPushSubscription(@NonNull String, @NonNull String, @Nullable byte[], @NonNull byte[], @NonNull byte[]);
1722
field public static final Parcelable.Creator<WebPushSubscription> CREATOR;
1723
field @Nullable public final byte[] appServerKey;
1724
field @NonNull public final byte[] authSecret;
1725
field @NonNull public final byte[] browserPublicKey;
1726
field @NonNull public final String endpoint;
1727
field @NonNull public final String scope;
1728
}
1729
1730
@AnyThread public class WebRequest extends WebMessage {
1731
ctor public WebRequest(@NonNull String);
1732
field public static final int CACHE_MODE_DEFAULT = 1;
1733
field public static final int CACHE_MODE_FORCE_CACHE = 5;
1734
field public static final int CACHE_MODE_NO_CACHE = 4;
1735
field public static final int CACHE_MODE_NO_STORE = 2;
1736
field public static final int CACHE_MODE_ONLY_IF_CACHED = 6;
1737
field public static final int CACHE_MODE_RELOAD = 3;
1738
field @Nullable public final ByteBuffer body;
1739
field public final int cacheMode;
1740
field @NonNull public final String method;
1741
field @Nullable public final String referrer;
1742
}
1743
1744
@AnyThread public static class WebRequest.Builder extends WebMessage.Builder {
1745
ctor public Builder(@NonNull String);
1746
method @NonNull public WebRequest.Builder body(@Nullable ByteBuffer);
1747
method @NonNull public WebRequest build();
1748
method @NonNull public WebRequest.Builder cacheMode(int);
1749
method @NonNull public WebRequest.Builder method(@NonNull String);
1750
method @NonNull public WebRequest.Builder referrer(@Nullable String);
1751
}
1752
1753
@AnyThread public class WebRequestError extends Exception {
1754
ctor public WebRequestError(int, int);
1755
ctor public WebRequestError(int, int, X509Certificate);
1756
field public static final int ERROR_CATEGORY_CONTENT = 4;
1757
field public static final int ERROR_CATEGORY_NETWORK = 3;
1758
field public static final int ERROR_CATEGORY_PROXY = 6;
1759
field public static final int ERROR_CATEGORY_SAFEBROWSING = 7;
1760
field public static final int ERROR_CATEGORY_SECURITY = 2;
1761
field public static final int ERROR_CATEGORY_UNKNOWN = 1;
1762
field public static final int ERROR_CATEGORY_URI = 5;
1763
field public static final int ERROR_CONNECTION_REFUSED = 67;
1764
field public static final int ERROR_CONTENT_CRASHED = 68;
1765
field public static final int ERROR_CORRUPTED_CONTENT = 52;
1766
field public static final int ERROR_FILE_ACCESS_DENIED = 101;
1767
field public static final int ERROR_FILE_NOT_FOUND = 85;
1768
field public static final int ERROR_INVALID_CONTENT_ENCODING = 84;
1769
field public static final int ERROR_MALFORMED_URI = 53;
1770
field public static final int ERROR_NET_INTERRUPT = 35;
1771
field public static final int ERROR_NET_RESET = 147;
1772
field public static final int ERROR_NET_TIMEOUT = 51;
1773
field public static final int ERROR_OFFLINE = 115;
1774
field public static final int ERROR_PORT_BLOCKED = 131;
1775
field public static final int ERROR_PROXY_CONNECTION_REFUSED = 38;
1776
field public static final int ERROR_REDIRECT_LOOP = 99;
1777
field public static final int ERROR_SAFEBROWSING_HARMFUL_URI = 71;
1778
field public static final int ERROR_SAFEBROWSING_MALWARE_URI = 39;
1779
field public static final int ERROR_SAFEBROWSING_PHISHING_URI = 87;
1780
field public static final int ERROR_SAFEBROWSING_UNWANTED_URI = 55;
1781
field public static final int ERROR_SECURITY_BAD_CERT = 50;
1782
field public static final int ERROR_SECURITY_SSL = 34;
1783
field public static final int ERROR_UNKNOWN = 17;
1784
field public static final int ERROR_UNKNOWN_HOST = 37;
1785
field public static final int ERROR_UNKNOWN_PROTOCOL = 69;
1786
field public static final int ERROR_UNKNOWN_PROXY_HOST = 54;
1787
field public static final int ERROR_UNKNOWN_SOCKET_TYPE = 83;
1788
field public static final int ERROR_UNSAFE_CONTENT_TYPE = 36;
1789
field public final int category;
1790
field @Nullable public final X509Certificate certificate;
1791
field public final int code;
1792
}
1793
1794
@AnyThread public class WebResponse extends WebMessage {
1795
ctor protected WebResponse(@NonNull WebResponse.Builder);
1796
method public void setReadTimeoutMillis(long);
1797
field public static final long DEFAULT_READ_TIMEOUT_MS = 30000L;
1798
field @Nullable public final InputStream body;
1799
field @Nullable public final X509Certificate certificate;
1800
field public final boolean isSecure;
1801
field public final boolean redirected;
1802
field public final int statusCode;
1803
}
1804
1805
@AnyThread public static class WebResponse.Builder extends WebMessage.Builder {
1806
ctor public Builder(@NonNull String);
1807
method @NonNull public WebResponse.Builder body(@NonNull InputStream);
1808
method @NonNull public WebResponse build();
1809
method @NonNull public WebResponse.Builder certificate(@NonNull X509Certificate);
1810
method @NonNull public WebResponse.Builder isSecure(boolean);
1811
method @NonNull public WebResponse.Builder redirected(boolean);
1812
method @NonNull public WebResponse.Builder statusCode(int);
1813
}
1814
1815
}
1816