Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java

Issue 29526696: Issue 5556 - remove WebRequest setter (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: Created Aug. 24, 2017, 5:24 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
index 293176e5571fccbb6a92bde9cdaef1447bcc4091..ea7cb1af195879ed34fc43c449fa58bd47e1abab 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java
@@ -30,14 +30,19 @@ public final class JsEngine implements Disposable
registerNatives();
}
- public JsEngine(final AppInfo appInfo, final LogSystem logSystem)
+ public JsEngine(final AppInfo appInfo, final LogSystem logSystem, final WebRequest webRequest)
{
- this(ctor(appInfo, logSystem));
+ this(ctor(appInfo, logSystem, webRequest != null ? webRequest.ptr : 0));
+ }
+
+ public JsEngine(final AppInfo appInfo, final WebRequest webRequest)
+ {
+ this(appInfo, null, webRequest);
}
public JsEngine(final AppInfo appInfo)
{
- this(appInfo, null);
+ this(appInfo, null, null);
}
protected JsEngine(final long ptr)
@@ -88,11 +93,6 @@ public final class JsEngine implements Disposable
setDefaultFileSystem(this.ptr, basePath);
}
- public void setWebRequest(final WebRequest webRequest)
- {
- setWebRequest(this.ptr, webRequest.ptr);
- }
-
public JsValue newValue(final long value)
{
return newValue(this.ptr, value);
@@ -132,7 +132,7 @@ public final class JsEngine implements Disposable
private final static native void registerNatives();
- private final static native long ctor(AppInfo appInfo, LogSystem logSystem);
+ private final static native long ctor(AppInfo appInfo, LogSystem logSystem, long webRequestPtr);
private final static native void setEventCallback(long ptr, String eventName, long callback);
@@ -144,8 +144,6 @@ public final class JsEngine implements Disposable
private final static native void setDefaultFileSystem(long ptr, String basePath);
- private final static native void setWebRequest(long ptr, long webRequestPtr);
-
private final static native JsValue newValue(long ptr, long value);
private final static native JsValue newValue(long ptr, boolean value);

Powered by Google App Engine
This is Rietveld