Backed out 2 changesets (bug 1546411, bug 1546135) for build bustages. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Wed, 24 Apr 2019 02:34:50 +0300
changeset 470814 358171d00f9a1251fff6269ca343fbe9e8ece858
parent 470813 71fa880095b091e20a73fd700cce94ee32253297
child 470815 0ebd471a1242aa288662526da42ab6ada428e45b
push id112879
push useraciure@mozilla.com
push dateWed, 24 Apr 2019 04:31:08 +0000
treeherdermozilla-inbound@cf705095c18d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1546411, 1546135
milestone68.0a1
backs outa66f1ffd23ea29db37a0f1b11141c1fe6699dddb
a322ec5c25e6e6ebe0e0bc11c281162408c95982
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1546411, bug 1546135) for build bustages. CLOSED TREE Backed out changeset a66f1ffd23ea (bug 1546411) Backed out changeset a322ec5c25e6 (bug 1546135)
build.gradle
mobile/android/geckoview/api.txt
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExecutorTest.kt
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExtensionTest.kt
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoWebExecutor.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtension.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionEventDispatcher.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequestError.java
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
--- a/build.gradle
+++ b/build.gradle
@@ -76,17 +76,17 @@ buildscript {
     ext.jacoco_version = '0.8.1'
 
     if (gradle.mozconfig.substs.MOZ_ANDROID_GOOGLE_PLAY_SERVICES) {
         ext.google_play_services_version = '15.0.1'
         ext.google_play_services_cast_version = '16.0.0'
     }
 
     dependencies {
-        classpath 'org.mozilla.apilint:apilint:0.2.1'
+        classpath 'org.mozilla.apilint:apilint:0.2.0'
         classpath 'com.android.tools.build:gradle:3.1.4'
         classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
         classpath 'org.apache.commons:commons-exec:1.3'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
     }
 }
 
 // A stream that processes bytes line by line, prepending a tag before sending
--- a/mobile/android/geckoview/api.txt
+++ b/mobile/android/geckoview/api.txt
@@ -45,16 +45,17 @@ import java.lang.Exception;
 import java.lang.Float;
 import java.lang.Integer;
 import java.lang.Object;
 import java.lang.Runnable;
 import java.lang.RuntimeException;
 import java.lang.String;
 import java.lang.Throwable;
 import java.lang.Void;
+import java.lang.annotation.Annotation;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.AbstractSequentialList;
 import java.util.List;
 import java.util.Map;
 import org.json.JSONObject;
 import org.mozilla.geckoview.AllowOrDeny;
 import org.mozilla.geckoview.CompositorController;
@@ -509,16 +510,19 @@ package org.mozilla.geckoview {
     method @AnyThread @NonNull default public String getTitle();
     method @AnyThread @NonNull default public String getUri();
   }
 
   public static interface GeckoSession.HistoryDelegate.HistoryList implements List {
     method @AnyThread default public int getCurrentIndex();
   }
 
+  public static interface GeckoSession.HistoryDelegate.VisitFlags implements Annotation {
+  }
+
   public static interface GeckoSession.MediaDelegate {
     method @UiThread default public void onMediaAdd(@NonNull GeckoSession, @NonNull MediaElement);
     method @UiThread default public void onMediaRemove(@NonNull GeckoSession, @NonNull MediaElement);
   }
 
   public static interface GeckoSession.NavigationDelegate {
     method @UiThread default public void onCanGoBack(@NonNull GeckoSession, boolean);
     method @UiThread default public void onCanGoForward(@NonNull GeckoSession, boolean);
@@ -535,16 +539,19 @@ package org.mozilla.geckoview {
   public static class GeckoSession.NavigationDelegate.LoadRequest {
     ctor protected LoadRequest();
     field public final boolean isRedirect;
     field public final int target;
     field @Nullable public final String triggerUri;
     field @NonNull public final String uri;
   }
 
+  public static interface GeckoSession.NavigationDelegate.TargetWindow implements Annotation {
+  }
+
   public static interface GeckoSession.PermissionDelegate {
     method @UiThread default public void onAndroidPermissionsRequest(@NonNull GeckoSession, @Nullable String[], @NonNull GeckoSession.PermissionDelegate.Callback);
     method @UiThread default public void onContentPermissionRequest(@NonNull GeckoSession, @Nullable String, int, @NonNull GeckoSession.PermissionDelegate.Callback);
     method @UiThread default public void onMediaPermissionRequest(@NonNull GeckoSession, @NonNull String, @Nullable GeckoSession.PermissionDelegate.MediaSource[], @Nullable GeckoSession.PermissionDelegate.MediaSource[], @NonNull GeckoSession.PermissionDelegate.MediaCallback);
     field public static final int PERMISSION_DESKTOP_NOTIFICATION = 1;
     field public static final int PERMISSION_GEOLOCATION = 0;
   }
 
@@ -573,16 +580,19 @@ package org.mozilla.geckoview {
     field public static final int TYPE_VIDEO = 0;
     field @NonNull public final String id;
     field @Nullable public final String name;
     field @NonNull public final String rawId;
     field public final int source;
     field public final int type;
   }
 
+  public static interface GeckoSession.PermissionDelegate.Permission implements Annotation {
+  }
+
   public static interface GeckoSession.ProgressDelegate {
     method @UiThread default public void onPageStart(@NonNull GeckoSession, @NonNull String);
     method @UiThread default public void onPageStop(@NonNull GeckoSession, boolean);
     method @UiThread default public void onProgressChange(@NonNull GeckoSession, int);
     method @UiThread default public void onSecurityChange(@NonNull GeckoSession, @NonNull GeckoSession.ProgressDelegate.SecurityInformation);
     method @UiThread default public void onSessionStateChange(@NonNull GeckoSession, @NonNull GeckoSession.SessionState);
   }
 
@@ -679,21 +689,27 @@ package org.mozilla.geckoview {
 
   public static interface GeckoSession.PromptDelegate.ChoiceCallback implements GeckoSession.PromptDelegate.AlertCallback {
     method @UiThread default public void confirm(@Nullable String);
     method @UiThread default public void confirm(@NonNull String[]);
     method @UiThread default public void confirm(@NonNull GeckoSession.PromptDelegate.Choice);
     method @UiThread default public void confirm(@Nullable GeckoSession.PromptDelegate.Choice[]);
   }
 
+  public static interface GeckoSession.PromptDelegate.DatetimeType implements Annotation {
+  }
+
   public static interface GeckoSession.PromptDelegate.FileCallback implements GeckoSession.PromptDelegate.AlertCallback {
     method @UiThread default public void confirm(@Nullable Context, @Nullable Uri);
     method @UiThread default public void confirm(@Nullable Context, @Nullable Uri[]);
   }
 
+  public static interface GeckoSession.PromptDelegate.FileType implements Annotation {
+  }
+
   public static interface GeckoSession.PromptDelegate.TextCallback implements GeckoSession.PromptDelegate.AlertCallback {
     method @UiThread default public void confirm(@Nullable String);
   }
 
   public static interface GeckoSession.ScrollDelegate {
     method @UiThread default public void onScrollChanged(@NonNull GeckoSession, int, int);
   }
 
@@ -713,16 +729,25 @@ package org.mozilla.geckoview {
     field public static final int FLAG_IS_EDITABLE = 2;
     field public static final int FLAG_IS_PASSWORD = 4;
     field public static final int HIDE_REASON_ACTIVE_SCROLL = 3;
     field public static final int HIDE_REASON_ACTIVE_SELECTION = 2;
     field public static final int HIDE_REASON_INVISIBLE_SELECTION = 1;
     field public static final int HIDE_REASON_NO_SELECTION = 0;
   }
 
+  public static interface GeckoSession.SelectionActionDelegate.Action implements Annotation {
+  }
+
+  public static interface GeckoSession.SelectionActionDelegate.Flag implements Annotation {
+  }
+
+  public static interface GeckoSession.SelectionActionDelegate.HideReason implements Annotation {
+  }
+
   public static class GeckoSession.SelectionActionDelegate.Selection {
     ctor protected Selection();
     field @Nullable public final RectF clientRect;
     field public final int flags;
     field @NonNull public final String text;
   }
 
   @AnyThread public static class GeckoSession.SessionState extends AbstractSequentialList implements GeckoSession.HistoryDelegate.HistoryList Parcelable {
@@ -748,16 +773,22 @@ package org.mozilla.geckoview {
     field public static final int AUTO_FILL_NOTIFY_VIEW_EXITED = 7;
     field public static final int AUTO_FILL_NOTIFY_VIEW_REMOVED = 4;
     field public static final int AUTO_FILL_NOTIFY_VIEW_UPDATED = 5;
     field public static final int RESTART_REASON_BLUR = 1;
     field public static final int RESTART_REASON_CONTENT_CHANGE = 2;
     field public static final int RESTART_REASON_FOCUS = 0;
   }
 
+  public static interface GeckoSession.TextInputDelegate.AutoFillNotification implements Annotation {
+  }
+
+  public static interface GeckoSession.TextInputDelegate.RestartReason implements Annotation {
+  }
+
   @AnyThread public static class GeckoSession.WebResponseInfo {
     ctor protected WebResponseInfo();
     field @Nullable public final long contentLength;
     field @Nullable public final String contentType;
     field @Nullable public final String filename;
     field @NonNull public final String uri;
   }
 
@@ -848,16 +879,19 @@ package org.mozilla.geckoview {
     method @NonNull public GeckoResult<WebResponse> fetch(@NonNull WebRequest, int);
     method @NonNull public GeckoResult<InetAddress[]> resolve(@NonNull String);
     method public void speculativeConnect(@NonNull String);
     field public static final int FETCH_FLAGS_ANONYMOUS = 1;
     field public static final int FETCH_FLAGS_NONE = 0;
     field public static final int FETCH_FLAGS_NO_REDIRECTS = 2;
   }
 
+  public static interface GeckoWebExecutor.FetchFlags implements Annotation {
+  }
+
   @AnyThread public class MediaElement {
     method @Nullable public MediaElement.Delegate getDelegate();
     method public void pause();
     method public void play();
     method public void seek(double);
     method public void setDelegate(@Nullable MediaElement.Delegate);
     method public void setMuted(boolean);
     method public void setPlaybackRate(double);
@@ -1014,30 +1048,24 @@ package org.mozilla.geckoview {
 
   public final class StorageController {
     ctor public StorageController();
     method @AnyThread public void clearAllSessionContextData();
     method @AnyThread public void clearSessionContextData(@NonNull String);
   }
 
   public class WebExtension {
-    ctor public WebExtension(@NonNull String, @NonNull String, long);
+    ctor public WebExtension(@NonNull String, @NonNull String, boolean);
     ctor public WebExtension(@NonNull String);
     method @UiThread public void setMessageDelegate(@Nullable WebExtension.MessageDelegate, @NonNull String);
-    field public final long flags;
+    field public final boolean allowContentMessaging;
     field @NonNull public final String id;
     field @NonNull public final String location;
   }
 
-  public static class WebExtension.Flags {
-    ctor protected Flags();
-    field public static final long ALLOW_CONTENT_MESSAGING = 1L;
-    field public static final long NONE = 0L;
-  }
-
   @UiThread public static interface WebExtension.MessageDelegate {
     method @Nullable default public void onConnect(@NonNull WebExtension.Port);
     method @Nullable default public GeckoResult<Object> onMessage(@NonNull Object, @NonNull WebExtension.MessageSender);
   }
 
   @UiThread public static class WebExtension.MessageSender {
     ctor protected MessageSender();
     method public boolean isTopLevel();
@@ -1093,16 +1121,19 @@ package org.mozilla.geckoview {
     ctor public Builder(@NonNull String);
     method @NonNull public WebRequest.Builder body(@Nullable ByteBuffer);
     method @NonNull public WebRequest build();
     method @NonNull public WebRequest.Builder cacheMode(int);
     method @NonNull public WebRequest.Builder method(@NonNull String);
     method @NonNull public WebRequest.Builder referrer(@Nullable String);
   }
 
+  public static interface WebRequest.CacheMode implements Annotation {
+  }
+
   @AnyThread public class WebRequestError extends Exception {
     ctor public WebRequestError(int, int);
     field public static final int ERROR_CATEGORY_CONTENT = 4;
     field public static final int ERROR_CATEGORY_NETWORK = 3;
     field public static final int ERROR_CATEGORY_PROXY = 6;
     field public static final int ERROR_CATEGORY_SAFEBROWSING = 7;
     field public static final int ERROR_CATEGORY_SECURITY = 2;
     field public static final int ERROR_CATEGORY_UNKNOWN = 1;
@@ -1132,16 +1163,22 @@ package org.mozilla.geckoview {
     field public static final int ERROR_UNKNOWN_PROTOCOL = 69;
     field public static final int ERROR_UNKNOWN_PROXY_HOST = 54;
     field public static final int ERROR_UNKNOWN_SOCKET_TYPE = 83;
     field public static final int ERROR_UNSAFE_CONTENT_TYPE = 36;
     field public final int category;
     field public final int code;
   }
 
+  public static interface WebRequestError.Error implements Annotation {
+  }
+
+  public static interface WebRequestError.ErrorCategory implements Annotation {
+  }
+
   @AnyThread public class WebResponse extends WebMessage {
     ctor protected WebResponse(@NonNull WebResponse.Builder);
     field @Nullable public final InputStream body;
     field public final boolean redirected;
     field public final int statusCode;
   }
 
   @AnyThread public static class WebResponse.Builder extends WebMessage.Builder {
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExecutorTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExecutorTest.kt
@@ -80,17 +80,17 @@ class WebExecutorTest {
     fun cleanup() {
         server.stop()
     }
 
     private fun fetch(request: WebRequest): WebResponse {
         return fetch(request, GeckoWebExecutor.FETCH_FLAGS_NONE)
     }
 
-    private fun fetch(request: WebRequest, flags: Int): WebResponse {
+    private fun fetch(request: WebRequest, @GeckoWebExecutor.FetchFlags flags: Int): WebResponse {
         return executor.fetch(request, flags).poll(env.defaultTimeoutMillis)!!
     }
 
     fun String.toDirectByteBuffer(): ByteBuffer {
         val chars = CharBuffer.wrap(this)
         val buffer = ByteBuffer.allocateDirect(this.length)
         Charset.forName("UTF-8").newEncoder().encode(chars, buffer, true)
 
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExtensionTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExtensionTest.kt
@@ -105,40 +105,30 @@ class WebExtensionTest : BaseSessionTest
                             message as String, equalTo("response: ${prefix}MessageResponse"))
                     messageResult.complete(null)
                     completed = true
                 }
                 return null
             }
         }
 
-        val messaging = createWebExtension(background, messageDelegate)
+        val messaging = WebExtension(if (background) MESSAGING_BACKGROUND else MESSAGING_CONTENT,
+                "{${UUID.randomUUID()}}", !background)
+        if (background) {
+            messaging.setMessageDelegate(messageDelegate, "browser")
+        } else {
+            sessionRule.session.setMessageDelegate(messageDelegate, "browser");
+        }
+
         sessionRule.waitForResult(sessionRule.runtime.registerWebExtension(messaging))
         sessionRule.waitForResult(messageResult)
 
         sessionRule.waitForResult(sessionRule.runtime.unregisterWebExtension(messaging))
     }
 
-    private fun createWebExtension(background: Boolean,
-                                   messageDelegate: WebExtension.MessageDelegate): WebExtension {
-        val webExtension: WebExtension
-        val uuid = "{${UUID.randomUUID()}}"
-
-        if (background) {
-            webExtension = WebExtension(MESSAGING_BACKGROUND, uuid, WebExtension.Flags.NONE)
-            webExtension.setMessageDelegate(messageDelegate, "browser")
-        } else {
-            webExtension = WebExtension(MESSAGING_CONTENT, uuid,
-                    WebExtension.Flags.ALLOW_CONTENT_MESSAGING)
-            sessionRule.session.setMessageDelegate(messageDelegate, "browser");
-        }
-
-        return webExtension
-    }
-
     @Test
     @WithDevToolsAPI
     fun contentMessaging() {
         mainSession.loadUri("example.com")
         sessionRule.waitForPageStop()
         testOnMessage(false)
     }
 
@@ -197,17 +187,23 @@ class WebExtensionTest : BaseSessionTest
 
             override fun onMessage(message: Any,
                                    sender: WebExtension.MessageSender): GeckoResult<Any>? {
                 // Ignored for this test
                 return null
             }
         }
 
-        val messaging = createWebExtension(background, messageDelegate)
+        val messaging = WebExtension(if (background) MESSAGING_BACKGROUND else MESSAGING_CONTENT,
+                "{${UUID.randomUUID()}}", !background)
+        if (background) {
+            messaging.setMessageDelegate(messageDelegate, "browser")
+        } else {
+            sessionRule.session.setMessageDelegate(messageDelegate, "browser");
+        }
 
         sessionRule.waitForResult(sessionRule.runtime.registerWebExtension(messaging))
         sessionRule.waitForResult(result)
         sessionRule.waitForResult(sessionRule.runtime.unregisterWebExtension(messaging))
     }
 
     @Test
     @WithDevToolsAPI
@@ -279,17 +275,23 @@ class WebExtensionTest : BaseSessionTest
                                    sender: WebExtension.MessageSender): GeckoResult<Any>? {
                 Assert.assertEquals(messaging, sender.webExtension)
 
                 // Ignored for this test
                 return null
             }
         }
 
-        messaging = createWebExtension(background, messageDelegate)
+        messaging = WebExtension(if (background) MESSAGING_BACKGROUND else MESSAGING_CONTENT,
+                "{${UUID.randomUUID()}}", !background)
+        if (background) {
+            messaging.setMessageDelegate(messageDelegate, "browser")
+        } else {
+            sessionRule.session.setMessageDelegate(messageDelegate, "browser");
+        }
 
         sessionRule.waitForResult(sessionRule.runtime.registerWebExtension(messaging))
         sessionRule.waitForResult(result)
         sessionRule.waitForResult(sessionRule.runtime.unregisterWebExtension(messaging))
     }
 
     @Test
     @WithDevToolsAPI
@@ -359,17 +361,23 @@ class WebExtensionTest : BaseSessionTest
                         result.complete(null)
                     }
                 }
 
                 return null
             }
         }
 
-        messaging = createWebExtension(background, messageDelegate)
+        messaging = WebExtension(if (background) MESSAGING_BACKGROUND else MESSAGING_CONTENT,
+                "{${UUID.randomUUID()}}", !background)
+        if (background) {
+            messaging.setMessageDelegate(messageDelegate, "browser")
+        } else {
+            sessionRule.session.setMessageDelegate(messageDelegate, "browser");
+        }
 
         sessionRule.waitForResult(sessionRule.runtime.registerWebExtension(messaging))
         sessionRule.waitForResult(result)
         sessionRule.waitForResult(sessionRule.runtime.unregisterWebExtension(messaging))
     }
 
     @Test
     @WithDevToolsAPI
@@ -428,17 +436,17 @@ class WebExtensionTest : BaseSessionTest
                     fail()
                 }
 
                 return null
             }
         }
 
         messaging = WebExtension("resource://android/assets/web_extensions/messaging-iframe/",
-                "{${UUID.randomUUID()}}", WebExtension.Flags.ALLOW_CONTENT_MESSAGING)
+                "{${UUID.randomUUID()}}", true)
         sessionRule.session.setMessageDelegate(messageDelegate, "browser");
 
         sessionRule.waitForResult(sessionRule.runtime.registerWebExtension(messaging))
         sessionRule.waitForResult(portTopLevel)
         sessionRule.waitForResult(portIframe)
         sessionRule.waitForResult(messageTopLevel)
         sessionRule.waitForResult(messageIframe)
         sessionRule.waitForResult(sessionRule.runtime.unregisterWebExtension(messaging))
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
@@ -1468,17 +1468,17 @@ import android.view.inputmethod.EditorIn
             icRestartInput(GeckoSession.TextInputDelegate.RESTART_REASON_FOCUS,
                            /* toggleSoftInput */ true);
         } else if (oldState != SessionTextInput.EditableListener.IME_STATE_DISABLED) {
             icRestartInput(GeckoSession.TextInputDelegate.RESTART_REASON_CONTENT_CHANGE,
                            /* toggleSoftInput */ false);
         }
     }
 
-    private void icRestartInput(@GeckoSession.RestartReason final int reason,
+    private void icRestartInput(@GeckoSession.TextInputDelegate.RestartReason final int reason,
                                 final boolean toggleSoftInput) {
         if (DEBUG) {
             assertOnIcThread();
         }
 
         ThreadUtils.postToUiThread(new Runnable() {
             @Override
             public void run() {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
@@ -335,18 +335,17 @@ public final class GeckoRuntime implemen
             public void sendSuccess(final Object response) {
                 complete(null);
             }
         };
 
         final GeckoBundle bundle = new GeckoBundle(3);
         bundle.putString("locationUri", webExtension.location);
         bundle.putString("id", webExtension.id);
-        bundle.putBoolean("allowContentMessaging",
-                (webExtension.flags & WebExtension.Flags.ALLOW_CONTENT_MESSAGING) > 0);
+        bundle.putBoolean("allowContentMessaging", webExtension.allowContentMessaging);
 
         mWebExtensionDispatcher.registerWebExtension(webExtension);
 
         EventDispatcher.getInstance().dispatch("GeckoView:RegisterWebExtension",
                 bundle, result);
 
         return result;
     }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -396,17 +396,17 @@ public class GeckoSession implements Par
      * If a delegate is already present, this delegate will replace the
      * existing one.
      *
      * This message delegate will be responsible for handling messaging between
      * a WebExtension content script running on the {@link GeckoSession}.
      *
      * Note: To receive messages from content scripts, the WebExtension needs
      * to explicitely allow it in {@link WebExtension#WebExtension} by setting
-     * {@link WebExtension.Flags#ALLOW_CONTENT_MESSAGING}.
+     * {@link WebExtension#allowContentMessaging} to <code>true</code>.
      *
      * @param delegate {@link WebExtension.MessageDelegate} that will receive
      *                 messages from this session.
      * @param nativeApp which native app id this message delegate will handle
      *                  messaging for.
      * @see WebExtension#setMessageDelegate
      */
     @AnyThread
@@ -802,17 +802,17 @@ public class GeckoSession implements Par
             public void handleMessage(final SelectionActionDelegate delegate,
                                       final String event,
                                       final GeckoBundle message,
                                       final EventCallback callback) {
                 if ("GeckoView:ShowSelectionAction".equals(event)) {
                     final SelectionActionDelegate.Selection selection =
                             new SelectionActionDelegate.Selection(message);
 
-                    final @SelectionActionDelegateAction String[] actions = message.getStringArray("actions");
+                    final @SelectionActionDelegate.Action String[] actions = message.getStringArray("actions");
                     final int seqNo = message.getInt("seqNo");
                     final GeckoResponse<String> response = new GeckoResponse<String>() {
                         @Override
                         public void respond(final String action) {
                             final GeckoBundle response = new GeckoBundle(2);
                             response.putString("id", action);
                             response.putInt("seqNo", seqNo);
                             callback.sendSuccess(response);
@@ -3150,30 +3150,47 @@ public class GeckoSession implements Par
          * @param manifest A parsed and validated {@link JSONObject} containing the manifest contents.
          * @see <a href="https://www.w3.org/TR/appmanifest/">Web App Manifest specification</a>
          */
         @UiThread
         default void onWebAppManifest(@NonNull GeckoSession session, @NonNull JSONObject manifest) {}
     }
 
     public interface SelectionActionDelegate {
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef(flag = true, value = {FLAG_IS_COLLAPSED,
+                                      FLAG_IS_EDITABLE})
+        /* package */ @interface Flag {}
+
         /**
          * The selection is collapsed at a single position.
          */
         final int FLAG_IS_COLLAPSED = 1;
         /**
          * The selection is inside editable content such as an input element or
          * contentEditable node.
          */
         final int FLAG_IS_EDITABLE = 2;
         /**
          * The selection is inside a password field.
          */
         final int FLAG_IS_PASSWORD = 4;
 
+        @Retention(RetentionPolicy.SOURCE)
+        @StringDef({ACTION_HIDE,
+                    ACTION_CUT,
+                    ACTION_COPY,
+                    ACTION_DELETE,
+                    ACTION_PASTE,
+                    ACTION_SELECT_ALL,
+                    ACTION_UNSELECT,
+                    ACTION_COLLAPSE_TO_START,
+                    ACTION_COLLAPSE_TO_END})
+        /* package */ @interface Action {}
+
         /**
          * Hide selection actions and cause {@link #onHideAction} to be called.
          */
         final String ACTION_HIDE = "org.mozilla.geckoview.HIDE";
         /**
          * Copy onto the clipboard then delete the selected content. Selection
          * must be editable.
          */
@@ -3213,17 +3230,17 @@ public class GeckoSession implements Par
         /**
          * Represents attributes of a selection.
          */
         class Selection {
             /**
              * Flags describing the current selection, as a bitwise combination
              * of the {@link #FLAG_IS_COLLAPSED FLAG_*} constants.
              */
-            public final @SelectionActionDelegateFlag int flags;
+            public final @Flag int flags;
 
             /**
              * Text content of the current selection. An empty string indicates the selection
              * is collapsed or the selection cannot be represented as plain text.
              */
             public final @NonNull String text;
 
             /**
@@ -3283,19 +3300,26 @@ public class GeckoSession implements Par
          * @param actions Array of built-in actions available; possible values
          * come from the {@link #ACTION_HIDE ACTION_*} constants.
          * @param response Callback object for performing built-in actions. For example,
          * {@code response.respond(actions[0])} performs the first action. May be used
          * multiple times to perform multiple actions at once.
          */
         @UiThread
         default void onShowActionRequest(@NonNull GeckoSession session, @NonNull Selection selection,
-                                         @NonNull @SelectionActionDelegateAction String[] actions,
+                                         @NonNull @Action String[] actions,
                                          @NonNull GeckoResponse<String> response) {}
 
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({HIDE_REASON_NO_SELECTION,
+                 HIDE_REASON_INVISIBLE_SELECTION,
+                 HIDE_REASON_ACTIVE_SELECTION,
+                 HIDE_REASON_ACTIVE_SCROLL})
+        /* package */ @interface HideReason {}
+
         /**
          * Actions are no longer available due to the user clearing the selection.
          */
         final int HIDE_REASON_NO_SELECTION = 0;
         /**
          * Actions are no longer available due to the user moving the selection out of view.
          * Previous actions are still available after a callback with this reason.
          */
@@ -3318,47 +3342,19 @@ public class GeckoSession implements Par
          * Previous actions are no longer available due to the user interacting with the
          * page. Applications typically hide the action toolbar in response.
          *
          * @param session The GeckoSession that initiated the callback.
          * @param reason The reason that actions are no longer available, as one of the
          * {@link #HIDE_REASON_NO_SELECTION HIDE_REASON_*} constants.
          */
         @UiThread
-        default void onHideAction(@NonNull GeckoSession session,
-                                  @SelectionActionDelegateHideReason int reason) {}
+        default void onHideAction(@NonNull GeckoSession session, @HideReason int reason) {}
     }
 
-    @Retention(RetentionPolicy.SOURCE)
-    @StringDef({
-            SelectionActionDelegate.ACTION_HIDE,
-            SelectionActionDelegate.ACTION_CUT,
-            SelectionActionDelegate.ACTION_COPY,
-            SelectionActionDelegate.ACTION_DELETE,
-            SelectionActionDelegate.ACTION_PASTE,
-            SelectionActionDelegate.ACTION_SELECT_ALL,
-            SelectionActionDelegate.ACTION_UNSELECT,
-            SelectionActionDelegate.ACTION_COLLAPSE_TO_START,
-            SelectionActionDelegate.ACTION_COLLAPSE_TO_END})
-    /* package */ @interface SelectionActionDelegateAction {}
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true, value = {
-            SelectionActionDelegate.FLAG_IS_COLLAPSED,
-            SelectionActionDelegate.FLAG_IS_EDITABLE})
-            /* package */ @interface SelectionActionDelegateFlag {}
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({
-            SelectionActionDelegate.HIDE_REASON_NO_SELECTION,
-            SelectionActionDelegate.HIDE_REASON_INVISIBLE_SELECTION,
-            SelectionActionDelegate.HIDE_REASON_ACTIVE_SELECTION,
-            SelectionActionDelegate.HIDE_REASON_ACTIVE_SCROLL})
-    /* package */ @interface SelectionActionDelegateHideReason {}
-
     public interface NavigationDelegate {
         /**
         * A view has started loading content from the network.
         * @param session The GeckoSession that initiated the callback.
         * @param url The resource being loaded.
         */
         @UiThread
         default void onLocationChange(@NonNull GeckoSession session, @Nullable String url) {}
@@ -3374,16 +3370,19 @@ public class GeckoSession implements Par
         /**
         * The view's ability to go forward has changed.
         * @param session The GeckoSession that initiated the callback.
         * @param canGoForward The new value for the ability.
         */
         @UiThread
         default void onCanGoForward(@NonNull GeckoSession session, boolean canGoForward) {}
 
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({TARGET_WINDOW_NONE, TARGET_WINDOW_CURRENT, TARGET_WINDOW_NEW})
+        /* package */ @interface TargetWindow {}
         public static final int TARGET_WINDOW_NONE = 0;
         public static final int TARGET_WINDOW_CURRENT = 1;
         public static final int TARGET_WINDOW_NEW = 2;
 
         // Match with nsIWebNavigation.idl.
         /**
          * The load request was triggered by an HTTP redirect.
          */
@@ -3495,21 +3494,16 @@ public class GeckoSession implements Par
         @UiThread
         default @Nullable GeckoResult<String> onLoadError(@NonNull GeckoSession session,
                                                           @Nullable String uri,
                                                           @NonNull WebRequestError error) {
             return null;
         }
     }
 
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({NavigationDelegate.TARGET_WINDOW_NONE, NavigationDelegate.TARGET_WINDOW_CURRENT,
-            NavigationDelegate.TARGET_WINDOW_NEW})
-    /* package */ @interface TargetWindow {}
-
     /**
      * GeckoSession applications implement this interface to handle prompts triggered by
      * content in the GeckoSession, such as alerts, authentication dialogs, and select list
      * pickers.
      **/
     public interface PromptDelegate {
         /**
          * Callback interface for notifying the result of a prompt, and for accessing the
@@ -3944,16 +3938,21 @@ public class GeckoSession implements Par
          *                 HTML color format.
          */
         @UiThread
         default void onColorPrompt(@NonNull GeckoSession session, @Nullable String title,
                                    @Nullable String value, @NonNull TextCallback callback) {
             callback.dismiss();
         }
 
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({DATETIME_TYPE_DATE, DATETIME_TYPE_MONTH, DATETIME_TYPE_WEEK,
+                 DATETIME_TYPE_TIME, DATETIME_TYPE_DATETIME_LOCAL})
+        /* package */ @interface DatetimeType {}
+
         /**
          * Prompt for year, month, and day.
          */
         static final int DATETIME_TYPE_DATE = 1;
 
         /**
          * Prompt for year and month.
          */
@@ -4013,16 +4012,19 @@ public class GeckoSession implements Par
              *
              * @param context An application Context for parsing URIs.
              * @param uris Array of URI objects for the selected files.
              */
             @UiThread
             default void confirm(@Nullable Context context, @Nullable Uri[] uris) {}
         }
 
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({FILE_TYPE_SINGLE, FILE_TYPE_MULTIPLE})
+        /* package */ @interface FileType {}
         static final int FILE_TYPE_SINGLE = 1;
         static final int FILE_TYPE_MULTIPLE = 2;
 
         /**
          * Display a file prompt.
          *
          * @param session GeckoSession that triggered the prompt
          * @param title Title for the prompt dialog.
@@ -4052,26 +4054,16 @@ public class GeckoSession implements Par
          */
         @UiThread
         default @Nullable GeckoResult<AllowOrDeny> onPopupRequest(@NonNull GeckoSession session,
                                                                   @Nullable String targetUri) {
             return null;
         }
     }
 
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({PromptDelegate.FILE_TYPE_SINGLE, PromptDelegate.FILE_TYPE_MULTIPLE})
-            /* package */ @interface FileType {}
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({PromptDelegate.DATETIME_TYPE_DATE, PromptDelegate.DATETIME_TYPE_MONTH,
-            PromptDelegate.DATETIME_TYPE_WEEK, PromptDelegate.DATETIME_TYPE_TIME,
-            PromptDelegate.DATETIME_TYPE_DATETIME_LOCAL})
-    /* package */ @interface DatetimeType {}
-
     /**
      * GeckoSession applications implement this interface to handle content scroll
      * events.
      **/
     public interface ScrollDelegate {
         /**
          * The scroll position of the content has changed.
          *
@@ -4251,16 +4243,20 @@ public class GeckoSession implements Par
      * permission dialog.
      *
      *
      * When denying an Android app permission, the response is not stored by GeckoView.
      * It is the responsibility of the consumer to store the response state and therefore prevent
      * further requests from being presented to the user.
      **/
     public interface PermissionDelegate {
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({PERMISSION_GEOLOCATION, PERMISSION_DESKTOP_NOTIFICATION})
+        /* package */ @interface Permission {}
+
         /**
          * Permission for using the geolocation API.
          * See: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
          */
         int PERMISSION_GEOLOCATION = 0;
 
         /**
          * Permission for using the notifications API.
@@ -4524,27 +4520,26 @@ public class GeckoSession implements Par
         @UiThread
         default void onMediaPermissionRequest(@NonNull GeckoSession session, @NonNull String uri,
                                               @Nullable MediaSource[] video, @Nullable MediaSource[] audio,
                                               @NonNull MediaCallback callback) {
             callback.reject();
         }
     }
 
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({PermissionDelegate.PERMISSION_GEOLOCATION,
-            PermissionDelegate.PERMISSION_DESKTOP_NOTIFICATION})
-    /* package */ @interface Permission {}
-
     /**
      * Interface that SessionTextInput uses for performing operations such as opening and closing
      * the software keyboard. If the delegate is not set, these operations are forwarded to the
      * system {@link android.view.inputmethod.InputMethodManager} automatically.
      */
     public interface TextInputDelegate {
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({RESTART_REASON_FOCUS, RESTART_REASON_BLUR, RESTART_REASON_CONTENT_CHANGE})
+        /* package */ @interface RestartReason {}
+
         /** Restarting input due to an input field gaining focus. */
         int RESTART_REASON_FOCUS = 0;
         /** Restarting input due to an input field losing focus. */
         int RESTART_REASON_BLUR = 1;
         /**
          * Restarting input due to the content of the input field changing. For example, the
          * input field type may have changed, or the current composition may have been committed
          * outside of the input method.
@@ -4622,16 +4617,23 @@ public class GeckoSession implements Par
          *
          * @param session Session instance.
          * @param info Cursor-anchor information.
          */
         @UiThread
         default void updateCursorAnchorInfo(@NonNull GeckoSession session,
                                             @NonNull CursorAnchorInfo info) {}
 
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef({AUTO_FILL_NOTIFY_STARTED, AUTO_FILL_NOTIFY_COMMITTED, AUTO_FILL_NOTIFY_CANCELED,
+                AUTO_FILL_NOTIFY_VIEW_ADDED, AUTO_FILL_NOTIFY_VIEW_REMOVED,
+                AUTO_FILL_NOTIFY_VIEW_UPDATED, AUTO_FILL_NOTIFY_VIEW_ENTERED,
+                AUTO_FILL_NOTIFY_VIEW_EXITED})
+        /* package */ @interface AutoFillNotification {}
+
         /** An auto-fill session has started, usually as a result of loading a page. */
         int AUTO_FILL_NOTIFY_STARTED = 0;
         /** An auto-fill session has been committed, usually as a result of submitting a form. */
         int AUTO_FILL_NOTIFY_COMMITTED = 1;
         /** An auto-fill session has been canceled, usually as a result of unloading a page. */
         int AUTO_FILL_NOTIFY_CANCELED = 2;
         /** A view within the auto-fill session has been added. */
         int AUTO_FILL_NOTIFY_VIEW_ADDED = 3;
@@ -4658,33 +4660,16 @@ public class GeckoSession implements Par
          *                  with {@link SessionTextInput#autofill}.
          */
         @UiThread
         default void notifyAutoFill(@NonNull GeckoSession session,
                                     @AutoFillNotification int notification,
                                     int virtualId) {}
     }
 
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({TextInputDelegate.RESTART_REASON_FOCUS, TextInputDelegate.RESTART_REASON_BLUR,
-            TextInputDelegate.RESTART_REASON_CONTENT_CHANGE})
-            /* package */ @interface RestartReason {}
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({
-            TextInputDelegate.AUTO_FILL_NOTIFY_STARTED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_COMMITTED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_CANCELED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_VIEW_ADDED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_VIEW_REMOVED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_VIEW_UPDATED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_VIEW_ENTERED,
-            TextInputDelegate.AUTO_FILL_NOTIFY_VIEW_EXITED})
-    /* package */ @interface AutoFillNotification {}
-
     /* package */ void onSurfaceChanged(final Surface surface, final int x, final int y, final int width,
                                         final int height) {
         ThreadUtils.assertOnUiThread();
 
         mOffsetX = x;
         mOffsetY = y;
         mWidth = width;
         mHeight = height;
@@ -4977,16 +4962,24 @@ public class GeckoSession implements Par
              * @return An int representing the current index in browser history.
              */
             @AnyThread
             default int getCurrentIndex() {
                 throw new UnsupportedOperationException("HistoryList.getCurrentIndex() called on invalid object.");
             }
         }
 
+        @Retention(RetentionPolicy.SOURCE)
+        @IntDef(flag = true,
+                value = { VISIT_TOP_LEVEL,
+                          VISIT_REDIRECT_TEMPORARY, VISIT_REDIRECT_PERMANENT,
+                          VISIT_REDIRECT_SOURCE, VISIT_REDIRECT_SOURCE_PERMANENT,
+                          VISIT_UNRECOVERABLE_ERROR })
+        /* package */ @interface VisitFlags {}
+
         // These flags are similar to those in `IHistory::LoadFlags`, but we use
         // different values to decouple GeckoView from Gecko changes. These
         // should be kept in sync with `GeckoViewHistory::GeckoViewVisitFlags`.
 
         /** The URL was visited a top-level window. */
         final int VISIT_TOP_LEVEL = 1 << 0;
         /** The URL is the target of a temporary redirect. */
         final int VISIT_REDIRECT_TEMPORARY = 1 << 1;
@@ -5036,21 +5029,9 @@ public class GeckoSession implements Par
         default @Nullable GeckoResult<boolean[]> getVisited(@NonNull GeckoSession session,
                                                             @NonNull String[] urls) {
             return null;
         }
 
         @UiThread
         default void onHistoryStateChange(@NonNull GeckoSession session, @NonNull HistoryList historyList) {}
     }
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true,
-            value = {
-                HistoryDelegate.VISIT_TOP_LEVEL,
-                HistoryDelegate.VISIT_REDIRECT_TEMPORARY,
-                HistoryDelegate.VISIT_REDIRECT_PERMANENT,
-                HistoryDelegate.VISIT_REDIRECT_SOURCE,
-                HistoryDelegate.VISIT_REDIRECT_SOURCE_PERMANENT,
-                HistoryDelegate.VISIT_UNRECOVERABLE_ERROR
-            })
-    /* package */ @interface VisitFlags {}
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoWebExecutor.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoWebExecutor.java
@@ -50,17 +50,17 @@ public class GeckoWebExecutor {
 
     @WrapForJNI(calledFrom = "gecko", exceptionMode = "nsresult")
     private static ByteBuffer createByteBuffer(final int capacity) {
         return ByteBuffer.allocateDirect(capacity);
     }
 
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({FETCH_FLAGS_NONE, FETCH_FLAGS_ANONYMOUS, FETCH_FLAGS_NO_REDIRECTS})
-    /* package */ @interface FetchFlags {};
+    public @interface FetchFlags {};
 
     /**
      * No special treatment.
      */
     public static final int FETCH_FLAGS_NONE = 0;
 
     /**
      * Don't send cookies or other user data along with the request.
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionTextInput.java
@@ -271,17 +271,17 @@ public final class SessionTextInput {
                 contentRect = getDummyAutoFillRect(session, true, view);
             }
 
             return contentRect;
         }
 
         @Override
         public void notifyAutoFill(@NonNull final GeckoSession session,
-                                   @GeckoSession.AutoFillNotification final int notification,
+                                   @AutoFillNotification final int notification,
                                    final int virtualId) {
             ThreadUtils.assertOnUiThread();
             final View view = session.getTextInput().getView();
             if (Build.VERSION.SDK_INT < 26 || view == null) {
                 return;
             }
 
             final AutofillManager manager =
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtension.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtension.java
@@ -6,18 +6,16 @@ import android.support.annotation.Nullab
 import android.support.annotation.UiThread;
 import android.util.Log;
 
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.mozilla.gecko.EventDispatcher;
 import org.mozilla.gecko.util.GeckoBundle;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
 import java.lang.ref.WeakReference;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
 /**
  * Represents a WebExtension that may be used by GeckoView.
  */
@@ -36,47 +34,26 @@ public class WebExtension {
      * <code>/assets/web_extensions/my_webextension/</code> in the APK.
      */
     public final @NonNull String location;
     /**
      * Unique identifier for this WebExtension
      */
     public final @NonNull String id;
     /**
-     * {@link Flags} for this WebExtension.
+     * Whether content scripts can send messages to the browser or not.
      */
-    public final @WebExtensionFlags long flags;
+    public final boolean allowContentMessaging;
     /**
      * Delegates that handle messaging between this WebExtension and the app.
      */
     /* package */ final @NonNull Map<String, MessageDelegate> messageDelegates;
 
     private final static String LOGTAG = "WebExtension";
 
-    public static class Flags {
-        /*
-         * Default flags for this WebExtension.
-         */
-        public static final long NONE = 0;
-        /**
-         * Set this flag if you want to enable content scripts messaging.
-         * To listen to such messages you can use
-         * {@link WebExtension#setMessageDelegate}.
-         */
-        public static final long ALLOW_CONTENT_MESSAGING = 1 << 0;
-
-        // Do not instantiate this class.
-        protected Flags() {}
-    }
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true,
-            value = { Flags.NONE, Flags.ALLOW_CONTENT_MESSAGING })
-    /* package */ @interface WebExtensionFlags {}
-
     /**
      * Builds a WebExtension instance that can be loaded in GeckoView using
      * {@link GeckoRuntime#registerWebExtension}
      *
      * @param location The WebExtension install location. It must be either a
      *                 <code>resource:</code> URI to a folder inside the APK or
      *                 a <code>file:</code> URL to a <code>.xpi</code> file.
      * @param id Unique identifier for this WebExtension. This identifier must
@@ -113,40 +90,42 @@ public class WebExtension {
      *           See also: <ul>
      *           <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings">
      *                  WebExtensions/manifest.json/browser_specific_settings
      *               </a>
      *           <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/WebExtensions_and_the_Add-on_ID#When_do_you_need_an_add-on_ID">
      *                  WebExtensions/WebExtensions_and_the_Add-on_ID
      *               </a>
      *           </ul>
-     * @param flags {@link Flags} for this WebExtension.
+     * @param allowContentMessaging Whether content scripts are allowed to send
+     *      messages to the browser or not.  To listen to such messages you can
+     *      use {@link #setMessageDelegate(MessageDelegate, String)}.
      */
     public WebExtension(final @NonNull String location, final @NonNull String id,
-                        final @WebExtensionFlags long flags) {
+                        final boolean allowContentMessaging) {
         this.location = location;
         this.id = id;
-        this.flags = flags;
+        this.allowContentMessaging = allowContentMessaging;
         this.messageDelegates = new HashMap<>();
     }
 
     /**
      * Builds a WebExtension instance that can be loaded in GeckoView using
      * {@link GeckoRuntime#registerWebExtension}
      * The <code>id</code> for this web extension will be automatically
      * generated.
      *
      * All messaging from the web extension will be ignored.
      *
      * @param location The WebExtension install location. It must be either a
      *                 <code>resource:</code> URI to a folder inside the APK or
      *                 a <code>file:</code> URL to a <code>.xpi</code> file.
      */
     public WebExtension(final @NonNull String location) {
-        this(location, "{" + UUID.randomUUID().toString() + "}", Flags.NONE);
+        this(location, "{" + UUID.randomUUID().toString() + "}", false);
     }
 
     /**
      * Defines the message delegate for a Native App.
      *
      * This message delegate will receive messages from the background script
      * for the native app specified in <code>nativeApp</code>.
      *
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionEventDispatcher.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebExtensionEventDispatcher.java
@@ -139,17 +139,17 @@ import java.util.Map;
         if (callback != null) {
             callback.sendSuccess(true);
         }
     }
 
     private WebExtension.MessageDelegate getDelegate(
             final String nativeApp, final WebExtension.MessageSender sender,
             final EventCallback callback) {
-        if ((sender.webExtension.flags & WebExtension.Flags.ALLOW_CONTENT_MESSAGING) == 0 &&
+        if (!sender.webExtension.allowContentMessaging &&
                 sender.environmentType == WebExtension.MessageSender.ENV_TYPE_CONTENT_SCRIPT) {
             callback.sendError("This NativeApp can't receive messages from Content Scripts.");
             return null;
         }
 
         WebExtension.MessageDelegate delegate = null;
 
         if (sender.session != null) {
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequest.java
@@ -48,17 +48,17 @@ public class WebRequest extends WebMessa
      * The value of the Referer header for this request.
      */
     public final @Nullable String referrer;
 
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({CACHE_MODE_DEFAULT, CACHE_MODE_NO_STORE,
             CACHE_MODE_RELOAD, CACHE_MODE_NO_CACHE,
             CACHE_MODE_FORCE_CACHE, CACHE_MODE_ONLY_IF_CACHED})
-    /* package */ @interface CacheMode {};
+    public @interface CacheMode {};
 
     /**
      * Default cache mode. Normal caching rules apply.
      */
     public static final int CACHE_MODE_DEFAULT = 1;
 
     /**
      * The response will be fetched from the server without looking in
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequestError.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebRequestError.java
@@ -21,32 +21,32 @@ import java.lang.annotation.RetentionPol
  */
 @AnyThread
 public class WebRequestError extends Exception {
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({ERROR_CATEGORY_UNKNOWN, ERROR_CATEGORY_SECURITY,
             ERROR_CATEGORY_NETWORK, ERROR_CATEGORY_CONTENT,
             ERROR_CATEGORY_URI, ERROR_CATEGORY_PROXY,
             ERROR_CATEGORY_SAFEBROWSING})
-    /* package */ @interface ErrorCategory {}
+    public @interface ErrorCategory {}
 
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({ERROR_UNKNOWN, ERROR_SECURITY_SSL, ERROR_SECURITY_BAD_CERT,
             ERROR_NET_RESET, ERROR_NET_INTERRUPT, ERROR_NET_TIMEOUT,
             ERROR_CONNECTION_REFUSED, ERROR_UNKNOWN_PROTOCOL,
             ERROR_UNKNOWN_HOST, ERROR_UNKNOWN_SOCKET_TYPE,
             ERROR_UNKNOWN_PROXY_HOST, ERROR_MALFORMED_URI,
             ERROR_REDIRECT_LOOP, ERROR_SAFEBROWSING_PHISHING_URI,
             ERROR_SAFEBROWSING_MALWARE_URI, ERROR_SAFEBROWSING_UNWANTED_URI,
             ERROR_SAFEBROWSING_HARMFUL_URI, ERROR_CONTENT_CRASHED,
             ERROR_OFFLINE, ERROR_PORT_BLOCKED,
             ERROR_PROXY_CONNECTION_REFUSED, ERROR_FILE_NOT_FOUND,
             ERROR_FILE_ACCESS_DENIED, ERROR_INVALID_CONTENT_ENCODING,
             ERROR_UNSAFE_CONTENT_TYPE, ERROR_CORRUPTED_CONTENT})
-    /* package */ @interface Error {}
+    public @interface Error {}
 
     /**
      * This is normally used for error codes that don't
      * currently fit into any of the other categories.
      */
     public static final int ERROR_CATEGORY_UNKNOWN = 0x1;
 
     /**
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
@@ -299,9 +299,9 @@ exclude: true
 [65.23]: ../GeckoSession.FinderResult.html
 
 - Update [`CrashReporter#sendCrashReport`][65.24] to return the crash ID as a
   [`GeckoResult<String>`][65.25].
 
 [65.24]: ../CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String-
 [65.25]: ../GeckoResult.html
 
-[api-version]: 3fbf9d92418d270558cefad65cfe00599aeae263
+[api-version]: 3b910c2e6b3df9bd9926cf4e54b37a5a08bdb64a