Skip to content
Snippets Groups Projects
Commit a2ca3530 authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Bug 40006: Expose Security Level interface

parent dcce1390
No related branches found
No related tags found
1 merge request!32Bug 40026 00
......@@ -593,6 +593,14 @@ class GeckoEngine(
override var forceUserScalableContent: Boolean
get() = runtime.settings.forceUserScalableEnabled
set(value) { runtime.settings.forceUserScalableEnabled = value }
override var torSecurityLevel: Int
get() = runtime.settings.torSecurityLevel
set(value) {
value.let {
runtime.settings.torSecurityLevel = it
}
}
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
......@@ -609,6 +617,7 @@ class GeckoEngine(
this.fontSizeFactor = it.fontSizeFactor
this.forceUserScalableContent = it.forceUserScalableContent
this.loginAutofillEnabled = it.loginAutofillEnabled
this.torSecurityLevel = it.torSecurityLevel
}
}
......
......@@ -593,6 +593,14 @@ class GeckoEngine(
override var forceUserScalableContent: Boolean
get() = runtime.settings.forceUserScalableEnabled
set(value) { runtime.settings.forceUserScalableEnabled = value }
override var torSecurityLevel: Int
get() = runtime.settings.torSecurityLevel
set(value) {
value.let {
runtime.settings.torSecurityLevel = it
}
}
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
......@@ -609,6 +617,7 @@ class GeckoEngine(
this.fontSizeFactor = it.fontSizeFactor
this.forceUserScalableContent = it.forceUserScalableContent
this.loginAutofillEnabled = it.loginAutofillEnabled
this.torSecurityLevel = it.torSecurityLevel
}
}
......
......@@ -174,6 +174,11 @@ abstract class Settings {
* Setting to force the ability to scale the content
*/
open var forceUserScalableContent: Boolean by UnsupportedSetting()
/**
* Setting to control the current security level
*/
open var torSecurityLevel: Int by UnsupportedSetting()
}
/**
......@@ -208,7 +213,8 @@ data class DefaultSettings(
override var fontInflationEnabled: Boolean? = null,
override var fontSizeFactor: Float? = null,
override var forceUserScalableContent: Boolean = false,
override var loginAutofillEnabled: Boolean = false
override var loginAutofillEnabled: Boolean = false,
override var torSecurityLevel: Int = 4
) : Settings()
class UnsupportedSetting<T> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment