Bug 1413698 - 7. Rename GeckoView{Handler,Settings} to GeckoSession{..}; r=jchen
authorJim Chen <nchen@mozilla.com>
Mon, 06 Nov 2017 14:54:10 -0500
changeset 443662 858b513f90acbb754d5e760ed5bd4df81f28ec25
parent 443661 56ee4e33d6ab146d7a4a300ff233b29bbf752d43
child 443663 a0f054fe8d198ca0b507ed96a0b2d590d24a5e8f
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1413698
milestone58.0a1
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
Bug 1413698 - 7. Rename GeckoView{Handler,Settings} to GeckoSession{..}; r=jchen The old GeckoView was renamed to GeckoSession, so the old GeckoViewHandler and GeckoViewSettings should be renamed to GeckoSession.. as well. GeckoView JS files are left alone and may be converted in a future bug. r=me for trivial patch. MozReview-Commit-ID: BJTwugWboKf
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/java/org/mozilla/gecko/RemotePresentationService.java
mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
mobile/android/base/moz.build
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionHandler.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionSettings.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewHandler.java
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java
mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -1045,17 +1045,17 @@ public abstract class GeckoApp extends G
         mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout);
         mMainLayout = (RelativeLayout) findViewById(R.id.main_layout);
         mLayerView = (GeckoView) findViewById(R.id.layer_view);
 
         final GeckoSession session = new GeckoSession();
         mLayerView.setSession(session);
         mLayerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
 
-        session.getSettings().setString(GeckoViewSettings.CHROME_URI,
+        session.getSettings().setString(GeckoSessionSettings.CHROME_URI,
                                         "chrome://browser/content/browser.xul");
         session.setContentListener(this);
 
         GeckoAccessibility.setDelegate(mLayerView);
 
         getAppEventDispatcher().registerGeckoThreadListener(this,
             "Accessibility:Event",
             "Locale:Set",
--- a/mobile/android/base/java/org/mozilla/gecko/RemotePresentationService.java
+++ b/mobile/android/base/java/org/mozilla/gecko/RemotePresentationService.java
@@ -2,18 +2,18 @@
  * vim: ts=4 sw=4 expandtab:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.GeckoSession;
+import org.mozilla.gecko.GeckoSessionSettings;
 import org.mozilla.gecko.GeckoView;
-import org.mozilla.gecko.GeckoViewSettings;
 import org.mozilla.gecko.ScreenManagerHelper;
 
 import com.google.android.gms.cast.CastMediaControlIntent;
 import com.google.android.gms.cast.CastPresentation;
 import com.google.android.gms.cast.CastRemoteDisplayLocalService;
 import com.google.android.gms.common.ConnectionResult;
 import com.google.android.gms.common.GooglePlayServicesUtil;
 
@@ -123,19 +123,19 @@ class VirtualPresentation extends CastPr
          * of the application. Presentaion has its own context to get correct
          * resources.
          */
 
         // Create new GeckoView
         view = new GeckoView(getContext());
 
         final GeckoSession session = new GeckoSession();
-        session.getSettings().setString(GeckoViewSettings.CHROME_URI,
+        session.getSettings().setString(GeckoSessionSettings.CHROME_URI,
                                         PRESENTATION_VIEW_URI + "#" + deviceId);
-        session.getSettings().setInt(GeckoViewSettings.SCREEN_ID, screenId);
+        session.getSettings().setInt(GeckoSessionSettings.SCREEN_ID, screenId);
 
         view.setSession(session);
         view.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
                                               LayoutParams.MATCH_PARENT));
 
         // Create new layout to put the GeckoView
         layout = new RelativeLayout(getContext());
         layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
--- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
@@ -37,18 +37,18 @@ import org.mozilla.gecko.ActivityHandler
 import org.mozilla.gecko.BrowserApp;
 import org.mozilla.gecko.Clipboard;
 import org.mozilla.gecko.DoorHangerPopup;
 import org.mozilla.gecko.EventDispatcher;
 import org.mozilla.gecko.FormAssistPopup;
 import org.mozilla.gecko.GeckoAccessibility;
 import org.mozilla.gecko.GeckoSharedPrefs;
 import org.mozilla.gecko.GeckoSession;
+import org.mozilla.gecko.GeckoSessionSettings;
 import org.mozilla.gecko.GeckoView;
-import org.mozilla.gecko.GeckoViewSettings;
 import org.mozilla.gecko.preferences.GeckoPreferences;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.SnackbarBuilder;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.menu.GeckoMenu;
 import org.mozilla.gecko.menu.GeckoMenuInflater;
 import org.mozilla.gecko.mozglue.SafeIntent;
@@ -141,20 +141,20 @@ public class CustomTabsActivity extends 
         mDoorHangerPopup = new DoorHangerPopup(this, mGeckoView.getEventDispatcher());
 
         mFormAssistPopup = (FormAssistPopup) findViewById(R.id.form_assist_popup);
         mFormAssistPopup.create(mGeckoView);
 
         mTextSelection = TextSelection.Factory.create(mGeckoView, this);
         mTextSelection.create();
 
-        final GeckoViewSettings settings = mGeckoView.getSettings();
-        settings.setBoolean(GeckoViewSettings.USE_MULTIPROCESS, false);
+        final GeckoSessionSettings settings = mGeckoView.getSettings();
+        settings.setBoolean(GeckoSessionSettings.USE_MULTIPROCESS, false);
         settings.setBoolean(
-            GeckoViewSettings.USE_REMOTE_DEBUGGER,
+            GeckoSessionSettings.USE_REMOTE_DEBUGGER,
             GeckoSharedPrefs.forApp(this).getBoolean(
                 GeckoPreferences.PREFS_DEVTOOLS_REMOTE_USB_ENABLED, false));
 
         if (intent != null && !TextUtils.isEmpty(intent.getDataString())) {
             mGeckoSession.loadUri(intent.getDataString());
         } else {
             Log.w(LOGTAG, "No intend found for custom tab");
             finish();
--- a/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
@@ -30,19 +30,19 @@ import android.widget.TextView;
 
 import org.mozilla.gecko.ActivityHandlerHelper;
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.BrowserApp;
 import org.mozilla.gecko.DoorHangerPopup;
 import org.mozilla.gecko.GeckoAccessibility;
 import org.mozilla.gecko.GeckoScreenOrientation;
 import org.mozilla.gecko.GeckoSession;
+import org.mozilla.gecko.GeckoSessionSettings;
 import org.mozilla.gecko.GeckoSharedPrefs;
 import org.mozilla.gecko.GeckoView;
-import org.mozilla.gecko.GeckoViewSettings;
 import org.mozilla.gecko.preferences.GeckoPreferences;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.customtabs.CustomTabsActivity;
 import org.mozilla.gecko.permissions.Permissions;
 import org.mozilla.gecko.prompts.PromptService;
 import org.mozilla.gecko.text.TextSelection;
 import org.mozilla.gecko.util.ActivityUtils;
 import org.mozilla.gecko.util.ColorUtil;
@@ -103,20 +103,20 @@ public class WebAppActivity extends AppC
         GeckoAccessibility.setDelegate(mGeckoView);
 
         mPromptService = new PromptService(this, mGeckoView.getEventDispatcher());
         mDoorHangerPopup = new DoorHangerPopup(this, mGeckoView.getEventDispatcher());
 
         mTextSelection = TextSelection.Factory.create(mGeckoView, this);
         mTextSelection.create();
 
-        final GeckoViewSettings settings = mGeckoView.getSettings();
-        settings.setBoolean(GeckoViewSettings.USE_MULTIPROCESS, false);
+        final GeckoSessionSettings settings = mGeckoView.getSettings();
+        settings.setBoolean(GeckoSessionSettings.USE_MULTIPROCESS, false);
         settings.setBoolean(
-            GeckoViewSettings.USE_REMOTE_DEBUGGER,
+            GeckoSessionSettings.USE_REMOTE_DEBUGGER,
             GeckoSharedPrefs.forApp(this).getBoolean(
                 GeckoPreferences.PREFS_DEVTOOLS_REMOTE_USB_ENABLED, false));
 
         mManifest = WebAppManifest.fromFile(getIntent().getStringExtra(MANIFEST_URL),
                                             getIntent().getStringExtra(MANIFEST_PATH));
 
         if (mManifest == null) {
             Log.w(LOGTAG, "Cannot retrieve manifest, launching in Firefox");
@@ -249,31 +249,31 @@ public class WebAppActivity extends AppC
     private void updateDisplayMode() {
         final String displayMode = mManifest.getDisplayMode();
 
         updateFullScreenMode(displayMode.equals("fullscreen"));
 
         int mode;
         switch (displayMode) {
             case "standalone":
-                mode = GeckoViewSettings.DISPLAY_MODE_STANDALONE;
+                mode = GeckoSessionSettings.DISPLAY_MODE_STANDALONE;
                 break;
             case "fullscreen":
-                mode = GeckoViewSettings.DISPLAY_MODE_FULLSCREEN;
+                mode = GeckoSessionSettings.DISPLAY_MODE_FULLSCREEN;
                 break;
             case "minimal-ui":
-                mode = GeckoViewSettings.DISPLAY_MODE_MINIMAL_UI;
+                mode = GeckoSessionSettings.DISPLAY_MODE_MINIMAL_UI;
                 break;
             case "browser":
             default:
-                mode = GeckoViewSettings.DISPLAY_MODE_BROWSER;
+                mode = GeckoSessionSettings.DISPLAY_MODE_BROWSER;
                 break;
         }
 
-        mGeckoView.getSettings().setInt(GeckoViewSettings.DISPLAY_MODE, mode);
+        mGeckoView.getSettings().setInt(GeckoSessionSettings.DISPLAY_MODE, mode);
     }
 
     @Override // GeckoSession.NavigationListener
     public void onLocationChange(GeckoSession session, String url) {
     }
 
     @Override // GeckoSession.NavigationListener
     public void onCanGoBack(GeckoSession session, boolean canGoBack) {
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -380,21 +380,21 @@ gvjar.sources += [geckoview_source_dir +
     'GeckoEditableListener.java',
     'GeckoHalDefines.java',
     'GeckoInputConnection.java',
     'GeckoNetworkManager.java',
     'GeckoProfile.java',
     'GeckoProfileDirectories.java',
     'GeckoScreenOrientation.java',
     'GeckoSession.java',
+    'GeckoSessionHandler.java',
+    'GeckoSessionSettings.java',
     'GeckoSharedPrefs.java',
     'GeckoThread.java',
     'GeckoView.java',
-    'GeckoViewHandler.java',
-    'GeckoViewSettings.java',
     'gfx/BitmapUtils.java',
     'gfx/BufferedImage.java',
     'gfx/BufferedImageGLInfo.java',
     'gfx/DynamicToolbarAnimator.java',
     'gfx/FloatSize.java',
     'gfx/FullScreenState.java',
     'gfx/GeckoLayerClient.java',
     'gfx/GeckoSurface.java',
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java
@@ -58,18 +58,18 @@ public class GeckoSession implements Par
     }
 
     private final NativeQueue mNativeQueue =
         new NativeQueue(State.INITIAL, State.READY);
 
     private final EventDispatcher mEventDispatcher =
         new EventDispatcher(mNativeQueue);
 
-    private final GeckoViewHandler<ContentListener> mContentHandler =
-        new GeckoViewHandler<ContentListener>(
+    private final GeckoSessionHandler<ContentListener> mContentHandler =
+        new GeckoSessionHandler<ContentListener>(
             "GeckoViewContent", this,
             new String[]{
                 "GeckoView:ContextMenu",
                 "GeckoView:DOMTitleChanged",
                 "GeckoView:FullScreenEnter",
                 "GeckoView:FullScreenExit"
             }
         ) {
@@ -91,18 +91,18 @@ public class GeckoSession implements Par
                 } else if ("GeckoView:FullScreenEnter".equals(event)) {
                     listener.onFullScreen(GeckoSession.this, true);
                 } else if ("GeckoView:FullScreenExit".equals(event)) {
                     listener.onFullScreen(GeckoSession.this, false);
                 }
             }
         };
 
-    private final GeckoViewHandler<NavigationListener> mNavigationHandler =
-        new GeckoViewHandler<NavigationListener>(
+    private final GeckoSessionHandler<NavigationListener> mNavigationHandler =
+        new GeckoSessionHandler<NavigationListener>(
             "GeckoViewNavigation", this,
             new String[]{
                 "GeckoView:LocationChange",
                 "GeckoView:OnLoadUri"
             }
         ) {
             @Override
             public void handleMessage(final NavigationListener listener,
@@ -123,18 +123,18 @@ public class GeckoSession implements Par
                             message.getInt("where"));
                     final boolean result =
                         listener.onLoadUri(GeckoSession.this, uri, where);
                     callback.sendSuccess(result);
                 }
             }
         };
 
-    private final GeckoViewHandler<ProgressListener> mProgressHandler =
-        new GeckoViewHandler<ProgressListener>(
+    private final GeckoSessionHandler<ProgressListener> mProgressHandler =
+        new GeckoSessionHandler<ProgressListener>(
             "GeckoViewProgress", this,
             new String[]{
                 "GeckoView:PageStart",
                 "GeckoView:PageStop",
                 "GeckoView:SecurityChanged"
             }
         ) {
             @Override
@@ -150,18 +150,18 @@ public class GeckoSession implements Par
                                         message.getBoolean("success"));
                 } else if ("GeckoView:SecurityChanged".equals(event)) {
                     final GeckoBundle identity = message.getBundle("identity");
                     listener.onSecurityChange(GeckoSession.this, new ProgressListener.SecurityInformation(identity));
                 }
             }
         };
 
-    private final GeckoViewHandler<ScrollListener> mScrollHandler =
-        new GeckoViewHandler<ScrollListener>(
+    private final GeckoSessionHandler<ScrollListener> mScrollHandler =
+        new GeckoSessionHandler<ScrollListener>(
             "GeckoViewScroll", this,
             new String[]{ "GeckoView:ScrollChanged" }
         ) {
             @Override
             public void handleMessage(final ScrollListener listener,
                                       final String event,
                                       final GeckoBundle message,
                                       final EventCallback callback) {
@@ -169,18 +169,18 @@ public class GeckoSession implements Par
                 if ("GeckoView:ScrollChanged".equals(event)) {
                     listener.onScrollChanged(GeckoSession.this,
                                              message.getInt("scrollX"),
                                              message.getInt("scrollY"));
                 }
             }
         };
 
-    private final GeckoViewHandler<PermissionDelegate> mPermissionHandler =
-        new GeckoViewHandler<PermissionDelegate>(
+    private final GeckoSessionHandler<PermissionDelegate> mPermissionHandler =
+        new GeckoSessionHandler<PermissionDelegate>(
             "GeckoViewPermission", this,
             new String[] {
                 "GeckoView:AndroidPermission",
                 "GeckoView:ContentPermission",
                 "GeckoView:MediaPermission"
             }, /* alwaysListen */ true
         ) {
             @Override
@@ -337,39 +337,39 @@ public class GeckoSession implements Par
 
             if ("GeckoView:Prompt".equals(event)) {
                 handlePromptEvent(GeckoSession.this, message, callback);
             }
         }
     }
 
     protected Window mWindow;
-    private GeckoViewSettings mSettings;
+    private GeckoSessionSettings mSettings;
 
     public GeckoSession() {
         this(/* settings */ null);
     }
 
-    public GeckoSession(final GeckoViewSettings settings) {
+    public GeckoSession(final GeckoSessionSettings settings) {
         if (settings == null) {
-            mSettings = new GeckoViewSettings(this);
+            mSettings = new GeckoSessionSettings(this);
         } else {
-            mSettings = new GeckoViewSettings(settings, this);
+            mSettings = new GeckoSessionSettings(settings, this);
         }
 
         mListener.registerListeners();
     }
 
     /* package */ void transferFrom(final GeckoSession session) {
         if (isOpen()) {
             throw new IllegalStateException("Session is open");
         }
 
         mWindow = session.mWindow;
-        mSettings = new GeckoViewSettings(session.mSettings, this);
+        mSettings = new GeckoSessionSettings(session.mSettings, this);
         session.mWindow = null;
     }
 
     @Override // Parcelable
     public int describeContents() {
         return 0;
     }
 
@@ -389,19 +389,19 @@ public class GeckoSession implements Par
         final IInterface window = (binder != null) ?
                 binder.queryLocalInterface(Window.class.getName()) : null;
         if (window instanceof Window) {
             mWindow = (Window) window;
         } else {
             mWindow = null;
         }
 
-        final GeckoViewSettings settings =
+        final GeckoSessionSettings settings =
                 source.readParcelable(getClass().getClassLoader());
-        mSettings = new GeckoViewSettings(settings, this);
+        mSettings = new GeckoSessionSettings(settings, this);
     }
 
     public static final Creator<GeckoSession> CREATOR = new Creator<GeckoSession>() {
         @Override
         public GeckoSession createFromParcel(final Parcel in) {
             final GeckoSession session = new GeckoSession();
             session.readFromParcel(in);
             return session;
@@ -449,28 +449,28 @@ public class GeckoSession implements Par
 
     public void openWindow(final Context appContext) {
         if (isOpen()) {
             throw new IllegalStateException("Session is open");
         }
 
         if (!GeckoThread.isLaunched()) {
             final boolean multiprocess =
-                    mSettings.getBoolean(GeckoViewSettings.USE_MULTIPROCESS);
+                    mSettings.getBoolean(GeckoSessionSettings.USE_MULTIPROCESS);
             preload(appContext, /* geckoArgs */ null, multiprocess);
         }
 
-        if (mSettings.getString(GeckoViewSettings.DATA_DIR) == null) {
-            mSettings.setString(GeckoViewSettings.DATA_DIR,
+        if (mSettings.getString(GeckoSessionSettings.DATA_DIR) == null) {
+            mSettings.setString(GeckoSessionSettings.DATA_DIR,
                                 appContext.getApplicationInfo().dataDir);
         }
 
-        final String chromeUri = mSettings.getString(GeckoViewSettings.CHROME_URI);
-        final int screenId = mSettings.getInt(GeckoViewSettings.SCREEN_ID);
-        final boolean isPrivate = mSettings.getBoolean(GeckoViewSettings.USE_PRIVATE_MODE);
+        final String chromeUri = mSettings.getString(GeckoSessionSettings.CHROME_URI);
+        final int screenId = mSettings.getInt(GeckoSessionSettings.SCREEN_ID);
+        final boolean isPrivate = mSettings.getBoolean(GeckoSessionSettings.USE_PRIVATE_MODE);
 
         mWindow = new Window(mNativeQueue);
 
         if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
             Window.open(mWindow, mEventDispatcher, mSettings.asBundle(),
                         chromeUri, screenId, isPrivate);
         } else {
             GeckoThread.queueNativeCallUntil(
@@ -566,17 +566,17 @@ public class GeckoSession implements Par
     * @param active A boolean determining whether the GeckoSession is active
     */
     public void setActive(boolean active) {
         final GeckoBundle msg = new GeckoBundle();
         msg.putBoolean("active", active);
         mEventDispatcher.dispatch("GeckoView:SetActive", msg);
     }
 
-    public GeckoViewSettings getSettings() {
+    public GeckoSessionSettings getSettings() {
         return mSettings;
     }
 
     public void importScript(final String url) {
         if (url.startsWith("resource://android/assets/")) {
             final GeckoBundle data = new GeckoBundle(1);
             data.putString("scriptURL", url);
             getEventDispatcher().dispatch("GeckoView:ImportScript", data);
rename from mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewHandler.java
rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionHandler.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewHandler.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionHandler.java
@@ -7,35 +7,35 @@
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.util.BundleEventListener;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.GeckoBundle;
 
 import android.util.Log;
 
-/* package */ abstract class GeckoViewHandler<Listener>
+/* package */ abstract class GeckoSessionHandler<Listener>
     implements BundleEventListener {
 
-    private static final String LOGTAG = "GeckoViewHandler";
+    private static final String LOGTAG = "GeckoSessionHandler";
     private static final boolean DEBUG = false;
 
     private Listener mListener;
     private final boolean mAlwaysListen;
     private final String mModuleName;
     private final String[] mEvents;
 
 
-    GeckoViewHandler(final String module, final GeckoSession session,
-                     final String[] events) {
+    GeckoSessionHandler(final String module, final GeckoSession session,
+                        final String[] events) {
         this(module, session, events, /* alwaysListen */ false);
     }
 
-    GeckoViewHandler(final String module, final GeckoSession session,
-                     final String[] events, final boolean alwaysListen) {
+    GeckoSessionHandler(final String module, final GeckoSession session,
+                        final String[] events, final boolean alwaysListen) {
         mAlwaysListen = alwaysListen;
         mModuleName = module;
         mEvents = events;
 
         if (alwaysListen) {
             register(session.getEventDispatcher());
         }
     }
rename from mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java
rename to mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionSettings.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionSettings.java
@@ -10,18 +10,18 @@ import org.mozilla.gecko.util.GeckoBundl
 
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.util.Log;
 
 import java.util.Arrays;
 import java.util.Collection;
 
-public final class GeckoViewSettings implements Parcelable {
-    private static final String LOGTAG = "GeckoViewSettings";
+public final class GeckoSessionSettings implements Parcelable {
+    private static final String LOGTAG = "GeckoSessionSettings";
     private static final boolean DEBUG = false;
 
     // This needs to match nsIDocShell.idl
     public static final int DISPLAY_MODE_BROWSER = 0;
     public static final int DISPLAY_MODE_MINIMAL_UI = 1;
     public static final int DISPLAY_MODE_STANDALONE = 2;
     public static final int DISPLAY_MODE_FULLSCREEN = 3;
 
@@ -88,36 +88,36 @@ public final class GeckoViewSettings imp
         new Key<String>("debuggerSocketDir");
 
     /* package */ static final Key<String> DATA_DIR =
         new Key<String>("dataDir", /* initOnly */ true, /* values */ null);
 
     private final GeckoSession mSession;
     private final GeckoBundle mBundle;
 
-    public GeckoViewSettings() {
+    public GeckoSessionSettings() {
         this(null);
     }
 
-    /* package */ GeckoViewSettings(final GeckoSession session) {
+    /* package */ GeckoSessionSettings(final GeckoSession session) {
         mSession = session;
         mBundle = new GeckoBundle();
 
         mBundle.putString(CHROME_URI.name, null);
         mBundle.putInt(SCREEN_ID.name, 0);
         mBundle.putBoolean(USE_TRACKING_PROTECTION.name, false);
         mBundle.putBoolean(USE_PRIVATE_MODE.name, false);
         mBundle.putBoolean(USE_MULTIPROCESS.name, true);
         mBundle.putInt(DISPLAY_MODE.name, DISPLAY_MODE_BROWSER);
         mBundle.putBoolean(USE_REMOTE_DEBUGGER.name, false);
         mBundle.putString(DEBUGGER_SOCKET_DIR.name, null);
     }
 
-    /* package */ GeckoViewSettings(final GeckoViewSettings settings,
-                                    final GeckoSession session) {
+    /* package */ GeckoSessionSettings(final GeckoSessionSettings settings,
+                                       final GeckoSession session) {
         mSession = session;
         mBundle = new GeckoBundle(settings.mBundle);
     }
 
     public void setBoolean(final Key<Boolean> key, final boolean value) {
         synchronized (mBundle) {
             if (valueChangedLocked(key, value)) {
                 mBundle.putBoolean(key.name, value);
@@ -193,23 +193,23 @@ public final class GeckoViewSettings imp
         mBundle.writeToParcel(out, flags);
     }
 
     // AIDL code may call readFromParcel even though it's not part of Parcelable.
     public void readFromParcel(final Parcel source) {
         mBundle.readFromParcel(source);
     }
 
-    public static final Parcelable.Creator<GeckoViewSettings> CREATOR
-            = new Parcelable.Creator<GeckoViewSettings>() {
+    public static final Parcelable.Creator<GeckoSessionSettings> CREATOR
+            = new Parcelable.Creator<GeckoSessionSettings>() {
         @Override
-        public GeckoViewSettings createFromParcel(final Parcel in) {
-            final GeckoViewSettings settings = new GeckoViewSettings();
+        public GeckoSessionSettings createFromParcel(final Parcel in) {
+            final GeckoSessionSettings settings = new GeckoSessionSettings();
             settings.readFromParcel(in);
             return settings;
         }
 
         @Override
-        public GeckoViewSettings[] newArray(final int size) {
-            return new GeckoViewSettings[size];
+        public GeckoSessionSettings[] newArray(final int size) {
+            return new GeckoSessionSettings[size];
         }
     };
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
@@ -81,17 +81,17 @@ public class GeckoView extends LayerView
     public GeckoSession getSession() {
         return mSession;
     }
 
     public EventDispatcher getEventDispatcher() {
         return mSession.getEventDispatcher();
     }
 
-    public GeckoViewSettings getSettings() {
+    public GeckoSessionSettings getSettings() {
         return mSession.getSettings();
     }
 
     protected Object getCompositor() {
         return super.getCompositor();
     }
 
     @Override
--- a/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
+++ b/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
@@ -14,18 +14,18 @@ import android.os.Bundle;
 import android.os.SystemClock;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.WindowManager;
 
 import java.util.Locale;
 
 import org.mozilla.gecko.GeckoSession;
+import org.mozilla.gecko.GeckoSessionSettings;
 import org.mozilla.gecko.GeckoView;
-import org.mozilla.gecko.GeckoViewSettings;
 import org.mozilla.gecko.util.GeckoBundle;
 
 public class GeckoViewActivity extends Activity {
     private static final String LOGTAG = "GeckoViewActivity";
     private static final String DEFAULT_URL = "https://mozilla.org";
     private static final String USE_MULTIPROCESS_EXTRA = "use_multiprocess";
     private static final String USE_REMOTE_DEBUGGER_EXTRA = "use_remote_debugger";
 
@@ -74,17 +74,17 @@ public class GeckoViewActivity extends A
         final BasicGeckoViewPrompt prompt = new BasicGeckoViewPrompt(this);
         prompt.filePickerRequestCode = REQUEST_FILE_PICKER;
         mGeckoSession.setPromptDelegate(prompt);
 
         final MyGeckoViewPermission permission = new MyGeckoViewPermission();
         permission.androidPermissionRequestCode = REQUEST_PERMISSIONS;
         mGeckoSession.setPermissionDelegate(permission);
 
-        mGeckoView.getSettings().setBoolean(GeckoViewSettings.USE_MULTIPROCESS,
+        mGeckoView.getSettings().setBoolean(GeckoSessionSettings.USE_MULTIPROCESS,
                                             useMultiprocess);
         loadSettings(getIntent());
         loadFromIntent(getIntent());
     }
 
     @Override
     protected void onNewIntent(final Intent intent) {
         super.onNewIntent(intent);
@@ -98,17 +98,17 @@ public class GeckoViewActivity extends A
 
     private void loadFromIntent(final Intent intent) {
         final Uri uri = intent.getData();
         mGeckoSession.loadUri(uri != null ? uri.toString() : DEFAULT_URL);
     }
 
     private void loadSettings(final Intent intent) {
         mGeckoView.getSettings().setBoolean(
-            GeckoViewSettings.USE_REMOTE_DEBUGGER,
+            GeckoSessionSettings.USE_REMOTE_DEBUGGER,
             intent.getBooleanExtra(USE_REMOTE_DEBUGGER_EXTRA, false));
     }
 
     @Override
     protected void onActivityResult(final int requestCode, final int resultCode,
                                     final Intent data) {
         if (requestCode == REQUEST_FILE_PICKER) {
             final BasicGeckoViewPrompt prompt = (BasicGeckoViewPrompt)