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