LEFT | RIGHT |
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 10 matching lines...) Expand all Loading... |
21 { | 21 { |
22 private final Disposer disposer; | 22 private final Disposer disposer; |
23 protected final long ptr; | 23 protected final long ptr; |
24 | 24 |
25 static | 25 static |
26 { | 26 { |
27 System.loadLibrary("adblockplus-jni"); | 27 System.loadLibrary("adblockplus-jni"); |
28 registerNatives(); | 28 registerNatives(); |
29 } | 29 } |
30 | 30 |
31 // If an interface parameter value is null then a default implementation is | 31 /** |
32 // chosen. | 32 * If an interface parameter value is null then a default implementation is |
33 // If basePath is null then paths are not resolved to a full path, thus | 33 * chosen. |
34 // current working directory is used. | 34 * If basePath is null then paths are not resolved to a full path, thus |
| 35 * current working directory is used. |
| 36 */ |
35 public Platform(final LogSystem logSystem, final WebRequest webRequest, final
String basePath) | 37 public Platform(final LogSystem logSystem, final WebRequest webRequest, final
String basePath) |
36 { | 38 { |
37 this(ctor(logSystem, webRequest, basePath)); | 39 this(ctor(logSystem, webRequest, basePath)); |
38 } | 40 } |
39 | 41 |
40 protected Platform(final long ptr) | 42 protected Platform(final long ptr) |
41 { | 43 { |
42 this.ptr = ptr; | 44 this.ptr = ptr; |
43 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); | 45 this.disposer = new Disposer(this, new DisposeWrapper(ptr)); |
44 } | 46 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 private final static native void setUpJsEngine(long ptr, AppInfo appInfo); | 99 private final static native void setUpJsEngine(long ptr, AppInfo appInfo); |
98 | 100 |
99 private final static native long getJsEnginePtr(long ptr); | 101 private final static native long getJsEnginePtr(long ptr); |
100 | 102 |
101 private final static native void setUpFilterEngine(long ptr, IsAllowedConnecti
onCallback isSubscriptionDownloadAllowedCallback); | 103 private final static native void setUpFilterEngine(long ptr, IsAllowedConnecti
onCallback isSubscriptionDownloadAllowedCallback); |
102 | 104 |
103 private final static native void ensureFilterEngine(long ptr); | 105 private final static native void ensureFilterEngine(long ptr); |
104 | 106 |
105 private final static native void dtor(long ptr); | 107 private final static native void dtor(long ptr); |
106 } | 108 } |
LEFT | RIGHT |