Unverified Commit 572a39fa authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Merge branch 'bug_40125_01' into tor-browser-81.0b9-10.0-1

parents 9e380b2e bacf200e
......@@ -577,6 +577,7 @@ package org.mozilla.geckoview {
method @Nullable public GeckoRuntime getRuntime();
method @Nullable public Rect getScreenSizeOverride();
method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
method public int getTorSecurityLevel();
method public boolean getUseMaxScreenDepth();
method @Deprecated public boolean getUseMultiprocess();
method public boolean getWebFontsEnabled();
......@@ -595,6 +596,7 @@ package org.mozilla.geckoview {
method @NonNull public GeckoRuntimeSettings setLoginAutofillEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setPreferredColorScheme(int);
method @NonNull public GeckoRuntimeSettings setRemoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setTorSecurityLevel(int);
method @NonNull public GeckoRuntimeSettings setWebFontsEnabled(boolean);
method @NonNull public GeckoRuntimeSettings setWebManifestEnabled(boolean);
field public static final int COLOR_SCHEME_DARK = 1;
......@@ -630,6 +632,7 @@ package org.mozilla.geckoview {
method @NonNull public GeckoRuntimeSettings.Builder remoteDebuggingEnabled(boolean);
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
method @NonNull public GeckoRuntimeSettings.Builder torSecurityLevel(int);
method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
method @Deprecated @NonNull public GeckoRuntimeSettings.Builder useMultiprocess(boolean);
method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
......
......@@ -457,6 +457,17 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
getSettings().mForceUserScalable.set(flag);
return this;
}
/**
* Set security level.
*
* @param level A value determining the security level. Default is 0.
* @return This Builder instance.
*/
public @NonNull Builder torSecurityLevel(final int level) {
getSettings().mTorSecurityLevel.set(level);
return this;
}
}
private GeckoRuntime mRuntime;
......@@ -507,6 +518,8 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
"browser.tabs.remote.autostart", true);
/* package */ final Pref<Boolean> mAutofillLogins = new Pref<Boolean>(
"signon.autofillForms", true);
/* package */ final Pref<Integer> mTorSecurityLevel = new Pref<>(
"extensions.torbutton.security_slider", 0);
/* package */ int mPreferredColorScheme = COLOR_SCHEME_SYSTEM;
......@@ -1157,6 +1170,26 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
return this;
}
/**
* Gets the current security level.
*
* @return current security protection level
*/
public int getTorSecurityLevel() {
return mTorSecurityLevel.get();
}
/**
* Sets the Tor Security Level.
*
* @param level security protection level
* @return This GeckoRuntimeSettings instance.
*/
public @NonNull GeckoRuntimeSettings setTorSecurityLevel(final int level) {
mTorSecurityLevel.commit(level);
return this;
}
@Override // Parcelable
public void writeToParcel(final Parcel out, final int flags) {
super.writeToParcel(out, flags);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment