Skip to content
Snippets Groups Projects
Commit 402cd6b5 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern: Committed by morgan
Browse files

fixup! Bug 42247: Android helpers for the TorProvider

Bug 42655: Add a backend function for the "New circuit for this site"
functionality.
parent 85ab1dcf
No related branches found
No related tags found
2 merge requests!1202Bug_43099: 2024 YEC Strings,!1136Bug 43085: Rebased alpha onto 128.2.0esr
......@@ -2610,6 +2610,14 @@ public class GeckoSession {
return mEventDispatcher.queryBundle("GeckoView:GetTorCircuit");
}
/**
* Change the circuit for this session.
*/
@UiThread
public void newTorCircuit() {
mEventDispatcher.dispatch("GeckoView:NewTorCircuit");
}
/**
* Set this GeckoSession as active or inactive, which represents if the session is currently
* visible or not. Setting a GeckoSession to inactive will significantly reduce its memory
......
......@@ -40,6 +40,7 @@ export class GeckoViewContent extends GeckoViewModule {
"GeckoView:ZoomToInput",
"GeckoView:IsPdfJs",
"GeckoView:GetTorCircuit",
"GeckoView:NewTorCircuit",
]);
}
......@@ -313,6 +314,9 @@ export class GeckoViewContent extends GeckoViewModule {
case "GeckoView:GetTorCircuit":
this._getTorCircuit(aCallback);
break;
case "GeckoView:NewTorCircuit":
this._newTorCircuit(aCallback);
break;
}
}
......@@ -437,6 +441,11 @@ export class GeckoViewContent extends GeckoViewModule {
}
}
_newTorCircuit(aCallback) {
lazy.TorDomainIsolator.newCircuitForBrowser(this.browser);
aCallback?.onSuccess();
}
async _containsFormData(aCallback) {
aCallback.onSuccess(await this.actor.containsFormData());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment