OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 17 matching lines...) Expand all Loading... |
28 { | 28 { |
29 System.loadLibrary("adblockplus-jni"); | 29 System.loadLibrary("adblockplus-jni"); |
30 registerNatives(); | 30 registerNatives(); |
31 } | 31 } |
32 | 32 |
33 public JsEngine(final AppInfo appInfo, final LogSystem logSystem, final WebReq
uest webRequest, final String basePath) | 33 public JsEngine(final AppInfo appInfo, final LogSystem logSystem, final WebReq
uest webRequest, final String basePath) |
34 { | 34 { |
35 this(ctor(appInfo, logSystem, webRequest, basePath)); | 35 this(ctor(appInfo, logSystem, webRequest, basePath)); |
36 } | 36 } |
37 | 37 |
38 public JsEngine(final AppInfo appInfo, final WebRequest webRequest, final Stri
ng basePath) | |
39 { | |
40 this(appInfo, null, webRequest, basePath); | |
41 } | |
42 | |
43 public JsEngine(final AppInfo appInfo) | 38 public JsEngine(final AppInfo appInfo) |
44 { | 39 { |
45 this(appInfo, null, null, null); | 40 this(appInfo, null, null, null); |
46 } | 41 } |
47 | 42 |
48 protected JsEngine(final long ptr) | 43 protected JsEngine(final long ptr) |
49 { | 44 { |
50 this.ptr = ptr; | 45 this.ptr = ptr; |
51 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); | 46 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); |
52 } | 47 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 private final static native void triggerEvent(long ptr, String eventName, long
[] args); | 134 private final static native void triggerEvent(long ptr, String eventName, long
[] args); |
140 | 135 |
141 private final static native JsValue newValue(long ptr, long value); | 136 private final static native JsValue newValue(long ptr, long value); |
142 | 137 |
143 private final static native JsValue newValue(long ptr, boolean value); | 138 private final static native JsValue newValue(long ptr, boolean value); |
144 | 139 |
145 private final static native JsValue newValue(long ptr, String value); | 140 private final static native JsValue newValue(long ptr, String value); |
146 | 141 |
147 private final static native void dtor(long ptr); | 142 private final static native void dtor(long ptr); |
148 } | 143 } |
OLD | NEW |